From af3dabcd4843dc5c5034d6cfa21cf12621cc4510 Mon Sep 17 00:00:00 2001 From: Adrian Skrobacz Date: Tue, 17 Dec 2019 10:02:43 +0100 Subject: [PATCH] Ignore output directory in generator config, so it can be used with gradle cache --- src/main/kotlin/com/revolut/jooq/GenerateJooqClassesTask.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/revolut/jooq/GenerateJooqClassesTask.kt b/src/main/kotlin/com/revolut/jooq/GenerateJooqClassesTask.kt index e2e77b0..c3ae0b7 100644 --- a/src/main/kotlin/com/revolut/jooq/GenerateJooqClassesTask.kt +++ b/src/main/kotlin/com/revolut/jooq/GenerateJooqClassesTask.kt @@ -29,7 +29,7 @@ open class GenerateJooqClassesTask : DefaultTask() { var schemaToPackageMapping = emptyMap() @Input var excludeFlywayTable = false - @Input + @Internal var generatorConfig = project.provider(this::prepareGeneratorConfig) private set @@ -91,6 +91,10 @@ open class GenerateJooqClassesTask : DefaultTask() { @Input fun getReadinessCommand() = getImage().getReadinessCommand() + @Input + fun getCleanedGeneratorConfig() = generatorConfig.get().apply { + target.withDirectory("ignored") + } init { val sourceSets = project.properties["sourceSets"] as SourceSetContainer?