Skip to content

Commit

Permalink
Activate Gradle configuration cache to improve build performance
Browse files Browse the repository at this point in the history
  • Loading branch information
ryru committed Sep 22, 2024
1 parent 0f25173 commit b74b4ed
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
22 changes: 12 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,19 @@ tasks.withType<CreateStartScripts> {
applicationName = "dga"
}

val cliVersion = property("cliVersion").toString()
val connectorPluginVersion = property("connectorPluginVersion").toString()

tasks.withType<Jar> {
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
)
)
)
}
}
}
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
10 changes: 6 additions & 4 deletions importer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ dependencies {
runtimeOnly("org.slf4j:slf4j-simple:1.7.36")
}

val connectorPluginVersion = property("connectorPluginVersion").toString()

tasks.withType<Jar> {
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))
}
}
}

0 comments on commit b74b4ed

Please sign in to comment.