From a2c01b1c5b041e317bc976e00953b6eeb386b2e9 Mon Sep 17 00:00:00 2001 From: Florian Buenzli Date: Mon, 14 Oct 2024 20:31:20 +0200 Subject: [PATCH] upload app's version code --- .../src/main/java/ch/ubique/gradle/alpaka/AlpakaPlugin.kt | 3 ++- .../main/java/ch/ubique/gradle/alpaka/model/UploadRequest.kt | 2 ++ .../java/ch/ubique/gradle/alpaka/network/dto/UploadDataDto.kt | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/AlpakaPlugin.kt b/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/AlpakaPlugin.kt index 4ad690a..4d633ef 100644 --- a/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/AlpakaPlugin.kt +++ b/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/AlpakaPlugin.kt @@ -61,7 +61,7 @@ abstract class AlpakaPlugin : Plugin { buildConfigField("String", "BRANCH", "\"$buildBranch\"") } - //specify extra properties per flavor and defaultConfig for groovy dsl + // Specify extra properties per flavor and defaultConfig for groovy dsl (androidExtension.defaultConfig as ExtensionAware).apply { extraProperties.set("launcherIconLabel", null) extraProperties.set("alpakaUploadKey", null) @@ -198,6 +198,7 @@ abstract class AlpakaPlugin : Plugin { changelog = "", // Will be set inside the task signature = "", // Will be set inside the task version = versionName, + versionCode = variant.versionCode.toLong() ) uploadTask.uploadRequest = uploadRequest diff --git a/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/model/UploadRequest.kt b/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/model/UploadRequest.kt index 38e55f6..2fbf0c6 100644 --- a/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/model/UploadRequest.kt +++ b/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/model/UploadRequest.kt @@ -17,6 +17,7 @@ data class UploadRequest( val changelog: String, val signature: String, val version: String, + val versionCode: Long, ) { fun toUploadDataJson(uploadKey: String) = UploadDataDto( @@ -25,6 +26,7 @@ data class UploadRequest( packageName = packageName, flavor = flavor, version = version, + versionCode = versionCode, signature = signature, minSdk = minSdk, targetSdk = targetSdk, diff --git a/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/network/dto/UploadDataDto.kt b/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/network/dto/UploadDataDto.kt index ce976ca..aab31fd 100644 --- a/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/network/dto/UploadDataDto.kt +++ b/alpaka/plugin/src/main/java/ch/ubique/gradle/alpaka/network/dto/UploadDataDto.kt @@ -9,6 +9,7 @@ data class UploadDataDto( val packageName: String, val flavor: String, val version: String, + val versionCode: Long, val signature: String, val minSdk: Int, val targetSdk: Int,