Skip to content

Commit d8e0a92

Browse files
committed
allow the project.version to be overridden by external builders
This allows an external build to override using -Pversion=X.Y.Z for their own purposes. That said, using an init script is preferred because it allows for overriding in a project agnostic manner.
1 parent 0e46d22 commit d8e0a92

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

caffeine/src/main/java/com/github/benmanes/caffeine/cache/LocalAsyncCache.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ default void handleCompletion(K key, CompletableFuture<? extends V> valueFuture,
209209
} else if (!Async.isReady(valueFuture)) {
210210
logger.log(Level.ERROR, String.format(Locale.US, "An invalid state was detected, occurring "
211211
+ "when the future's dependent action has completed successfully with a value, but the "
212-
+ "future's state remains either in-flight or in a failed completion state. This may "
213-
+ "occur when using a custom future that does not abide by the CompletableFuture "
214-
+ "contract (key: %s, key type: %s, value type: %s, future: %s, cache type: %s).",
212+
+ "future remains either in-flight or in a failed completion state. This may occur "
213+
+ "when using a custom future that does not abide by the CompletableFuture contract "
214+
+ "(key: %s, key type: %s, value type: %s, future: %s, cache type: %s).",
215215
key, key.getClass().getName(), value.getClass().getName(), valueFuture,
216216
cache().getClass().getSimpleName()), new IllegalStateException());
217217
cache().statsCounter().recordLoadFailure(loadTime);

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ versions = "0.53.0"
9696
xz = "1.10"
9797
ycsb = "0.17.0"
9898
zero-allocation-hashing = "0.27ea1"
99-
zstd = "1.5.7-5"
99+
zstd = "1.5.7-6"
100100

101101
[libraries]
102102
asm-bom = { module = "org.ow2.asm:asm-bom", version.ref = "asm" }

gradle/plugins/src/main/kotlin/ProjectExtensions.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ val Project.libs
88
get() = the<LibrariesForLibs>()
99

1010
fun Project.version(major: Int, minor: Int, patch: Int, releaseBuild: Boolean) {
11-
version = "$major.$minor.$patch" + if (releaseBuild) "" else "-SNAPSHOT"
11+
if (version == Project.DEFAULT_VERSION) {
12+
version = "$major.$minor.$patch" + if (releaseBuild) "" else "-SNAPSHOT"
13+
}
1214
}
1315

1416
fun Project.defaultJvmArgs(): ListProperty<String> {

0 commit comments

Comments
 (0)