소스 검색

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 a5fdc955158502d99fca4865aa2dffa4d832312d)
Fredia Huya-Kouadio 2 년 전
부모
커밋
ff15e2384a
3개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      platform/android/java/app/config.gradle
  2. 7 0
      platform/android/java/build.gradle
  3. 0 1
      platform/android/java/lib/build.gradle

+ 3 - 0
platform/android/java/app/config.gradle

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

+ 7 - 0
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()

+ 0 - 1
platform/android/java/lib/build.gradle

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