From 0e2292f341b531e5854eccefa2cda302520b9970 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Sun, 5 Mar 2023 22:24:24 -0800 Subject: [PATCH] Configure maven central snapshot versions for the Godot Android library A snapshot version is a version that has not yet been released which allows us to deploy the same transient version incrementally, without requiring projects to upgrade the artifact version they're consuming. Those projects can use the same version to get an updated snapshot version. --- platform/android/java/app/config.gradle | 3 +++ platform/android/java/build.gradle | 7 +++++++ platform/android/java/lib/build.gradle | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index 1817811b28d..8ed2f2fa117 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -186,6 +186,9 @@ ext.getGodotPublishVersion = { -> String versionName = "" int versionCode = 1 (versionName, versionCode) = generateGodotLibraryVersion(requiredKeys) + if (!versionName.endsWith("stable")) { + versionName += "-SNAPSHOT" + } return versionName } diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle index 3839e167c91..f05fc8212c6 100644 --- a/platform/android/java/build.gradle +++ b/platform/android/java/build.gradle @@ -20,6 +20,13 @@ plugins { apply from: 'app/config.gradle' apply from: 'scripts/publish-root.gradle' +ext { + PUBLISH_VERSION = getGodotPublishVersion() +} + +group = ossrhGroupId +version = PUBLISH_VERSION + allprojects { repositories { google() diff --git a/platform/android/java/lib/build.gradle b/platform/android/java/lib/build.gradle index 44dd851a406..488d9c008bc 100644 --- a/platform/android/java/lib/build.gradle +++ b/platform/android/java/lib/build.gradle @@ -4,7 +4,6 @@ plugins { } ext { - PUBLISH_VERSION = getGodotPublishVersion() PUBLISH_ARTIFACT_ID = 'godot' }