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.

(cherry picked from commit a5fdc95515)
This commit is contained in:
Fredia Huya-Kouadio 2023-03-05 22:26:19 -08:00 committed by Yuri Sizov
parent bafc6372b2
commit ff15e2384a
3 changed files with 10 additions and 1 deletions

View File

@ -189,6 +189,9 @@ ext.getGodotPublishVersion = { ->
String versionName = ""
int versionCode = 1
(versionName, versionCode) = generateGodotLibraryVersion(requiredKeys)
if (!versionName.endsWith("stable")) {
versionName += "-SNAPSHOT"
}
return versionName
}

View File

@ -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()

View File

@ -4,7 +4,6 @@ plugins {
}
ext {
PUBLISH_VERSION = getGodotPublishVersion()
PUBLISH_ARTIFACT_ID = 'godot'
}