diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f13bffb..c96dd42 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -32,17 +32,19 @@ tasks.withType { applicationName = "dga" } -val cliVersion = property("cliVersion").toString() -val connectorPluginVersion = property("connectorPluginVersion").toString() - tasks.withType { - filesMatching("versions.txt") { - filter( - ReplaceTokens::class, - "tokens" to mapOf( - "cliVersion" to cliVersion, - "pluginVersion" to connectorPluginVersion + val cliVersion = project.findProperty("cliVersion").toString() + val connectorPluginVersion = findProperty("connectorPluginVersion").toString() + + doFirst { + filesMatching("versions.txt") { + filter( + ReplaceTokens::class, + "tokens" to mapOf( + "cliVersion" to cliVersion, + "pluginVersion" to connectorPluginVersion + ) ) - ) + } } } diff --git a/gradle.properties b/gradle.properties index 1c8a7aa..81f4180 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,5 @@ -# This file was generated by the Gradle 'init' task. -# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties org.gradle.parallel=true org.gradle.caching=true +org.gradle.configuration-cache=true cliVersion=0.2.0-SNAPSHOT connectorPluginVersion=0.1.5 diff --git a/importer/build.gradle.kts b/importer/build.gradle.kts index 42dd9a3..46e6f76 100644 --- a/importer/build.gradle.kts +++ b/importer/build.gradle.kts @@ -17,10 +17,12 @@ dependencies { runtimeOnly("org.slf4j:slf4j-simple:1.7.36") } -val connectorPluginVersion = property("connectorPluginVersion").toString() - tasks.withType { - filesMatching("init.gradle.kts") { - filter(ReplaceTokens::class, "tokens" to mapOf("version" to connectorPluginVersion)) + val connectorPluginVersion = project.findProperty("connectorPluginVersion").toString() + + doFirst { + filesMatching("init.gradle.kts") { + filter(ReplaceTokens::class, "tokens" to mapOf("version" to connectorPluginVersion)) + } } }