diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index e831304b..ec87fd2b 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -12,8 +12,8 @@ android { applicationId = "org.nxemu" minSdk = 28 targetSdk = 36 - versionCode = 1 - versionName = "0.1" + versionCode = (project.findProperty("nxemuVersionCode") as String?)?.toInt() ?: 1 + versionName = project.findProperty("nxemuVersionName") as String? ?: "0.1" ndk { abiFilters += "arm64-v8a" @@ -27,10 +27,22 @@ android { } } + val releaseKeystore = System.getenv("NXEMU_KEYSTORE_FILE") + signingConfigs { + if (releaseKeystore != null) { + create("release") { + storeFile = file(releaseKeystore) + storePassword = System.getenv("NXEMU_KEYSTORE_PASSWORD") + keyAlias = System.getenv("NXEMU_KEY_ALIAS") + keyPassword = System.getenv("NXEMU_KEY_PASSWORD") + } + } + } + buildTypes { release { isMinifyEnabled = false - signingConfig = signingConfigs.getByName("debug") + signingConfig = signingConfigs.getByName(if (releaseKeystore != null) "release" else "debug") } } diff --git a/src/script/set_git_properties.cmd b/src/script/set_git_properties.cmd index 9651d2f9..154201a0 100644 --- a/src/script/set_git_properties.cmd +++ b/src/script/set_git_properties.cmd @@ -16,6 +16,7 @@ set VERSION=%VERSION_PREFIX%%VERSION_MAJOR%.%VERSION_MINOR%.%VERSION_REVISION%-% echo %VERSION% echo GIT_DESCRIBE=%VERSION%>"%base_dir%\git.properties" +echo GIT_BUILD_VERSION=%GIT_BUILD_VERSION%>>"%base_dir%\git.properties" goto :EOF :process_version diff --git a/src/script/website-upload.ps1 b/src/script/website-upload.ps1 index 82602789..1fdfac2e 100644 --- a/src/script/website-upload.ps1 +++ b/src/script/website-upload.ps1 @@ -108,7 +108,7 @@ function Upload-FilesToWebsite { exit 1 } - $validExtensions = @('.zip') + $validExtensions = @('.zip', '.apk') $files = Get-ChildItem -Path $Directory -File | Where-Object { $validExtensions -contains $_.Extension.ToLower() }