Skip to content

Instantly share code, notes, and snippets.

ext {
origImagesPath = "$rootDir/../images"
thumbOutputPath = "$buildDir/thumb"
listFilePath = "$buildDir/files.txt"
}
abstract class IncrementalConvertTask extends DefaultTask {
@Incremental
@PathSensitive(PathSensitivity.NAME_ONLY)
@patrikturi
patrikturi / Makefile
Last active September 17, 2019 21:41
Makefile to create thumbnails and store the list of created images in out/files.txt
SRC_DIR_PATH = ../images
DEST_FILES_PATH = $(shell find $(SRC_DIR_PATH) -type f -iname "*.png" | sed 's/..\/images/out\/thumb/g')
IMAGE_CONVERT_CMD = magick $(SRC_DIR_PATH)/$*.png -resize "100x100" $@
all: out/files.txt
out/files.txt: ${DEST_FILES_PATH}
@echo -e "Updating files.txt"
-rm out/files.txt