From 384b351fbcbf93862f7de3023fc028856fa5e13c Mon Sep 17 00:00:00 2001 From: William Petit Date: Mon, 29 Apr 2024 19:11:50 +0200 Subject: [PATCH] fix(android): versionName/versionCode injection --- android/app/build.gradle | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9bf7879..551c221 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -3,13 +3,8 @@ plugins { id 'org.jetbrains.kotlin.android' } -def versionCode() { - return System.env.VERSION_CODE ? System.env.VERSION_CODE.toInteger() : 0 -} - -def versionName() { - return System.env.VERSION_NAME ? System.env.VERSION_NAME : "0.0.0" -} +def appVersionCode = Integer.valueOf(System.env.VERSION_CODE ?: 1) +def appVersionName = System.env.VERSION_NAME ?: "0.0.0" android { namespace 'com.cadoles.arcast_player' @@ -19,8 +14,8 @@ android { applicationId "com.cadoles.arcast_player" minSdk 24 targetSdk 34 - versionCode versionCode() - versionName versionName() + versionCode appVersionCode + versionName appVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables {