Skip to content

Commit

Permalink
chore(build): cache changing modules less on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Jan 20, 2024
1 parent e579b88 commit a9ec37f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions gradle/build-logic/src/main/kotlin/conventions.base.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.incendo.cloudbuildlogic.ciBuild

plugins {
id("org.incendo.cloud-build-logic")
id("org.incendo.cloud-build-logic.spotless")
Expand All @@ -18,6 +20,14 @@ cloudSpotless {
ktlintVersion.set(libs.versions.ktlint)
}

if (providers.ciBuild.get() && libs.versions.cloudCore.get().endsWith("-SNAPSHOT")) {
configurations.all {
resolutionStrategy {
cacheChangingModulesFor(1, TimeUnit.MINUTES)
}
}
}

dependencies {
checkstyle(libs.stylecheck)
errorprone(libs.errorproneCore)
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ktlint = "0.50.0"
errorprone = "2.24.1"
run-task = "2.2.2"

cloud = "2.0.0-SNAPSHOT"
cloudCore = "2.0.0-SNAPSHOT"

immutables = "2.10.0"

Expand All @@ -34,9 +34,9 @@ cloud-build-logic = { module = "org.incendo:cloud-build-logic", version.ref = "c
stylecheck = { module = "ca.stellardrift:stylecheck", version.ref = "stylecheck" }
errorproneCore = { group = "com.google.errorprone", name = "error_prone_core", version.ref = "errorprone" }

cloud-bom = { module = "cloud.commandframework:cloud-bom", version.ref = "cloud" }
cloud-core = { module = "cloud.commandframework:cloud-core", version.ref = "cloud" }
cloud-annotations = { module = "cloud.commandframework:cloud-annotations", version.ref = "cloud" }
cloud-bom = { module = "cloud.commandframework:cloud-bom", version.ref = "cloudCore" }
cloud-core = { module = "cloud.commandframework:cloud-core", version.ref = "cloudCore" }
cloud-annotations = { module = "cloud.commandframework:cloud-annotations", version.ref = "cloudCore" }

immutables = { group = "org.immutables", name = "value", version.ref = "immutables" }
immutablesAnnotate = { group = "org.immutables", name = "annotate", version.ref = "immutables" }
Expand Down

0 comments on commit a9ec37f

Please sign in to comment.