build: move app version to gradle.properties (#85)

This commit is contained in:
Naveen Singh
2025-05-26 14:18:52 +05:30
committed by GitHub
parent 8e396fd14f
commit 3e8818ff67
3 changed files with 9 additions and 8 deletions

View File

@@ -25,11 +25,11 @@ android {
compileSdk = project.libs.versions.app.build.compileSDKVersion.get().toInt()
defaultConfig {
applicationId = libs.versions.app.version.appId.get()
applicationId = project.property("APP_ID").toString()
minSdk = project.libs.versions.app.build.minimumSDK.get().toInt()
targetSdk = project.libs.versions.app.build.targetSDK.get().toInt()
versionName = project.libs.versions.app.version.versionName.get()
versionCode = project.libs.versions.app.version.versionCode.get().toInt()
versionName = project.property("VERSION_NAME").toString()
versionCode = project.property("VERSION_CODE").toString().toInt()
setProperty("archivesBaseName", "camera-$versionCode")
vectorDrawables.useSupportLibrary = true
}
@@ -102,7 +102,7 @@ android {
kotlinOptions.jvmTarget = project.libs.versions.app.build.kotlinJVMTarget.get()
}
namespace = "org.fossify.camera"
namespace = project.property("APP_ID").toString()
lint {
checkReleaseBuilds = false

View File

@@ -9,3 +9,8 @@ org.gradle.configureondemand=true
org.gradle.unsafe.configuration-cache=true
org.gradle.unsafe.configuration-cache-problems=warn
android.nonTransitiveRClass=true
# Versioning
VERSION_NAME=1.0.1
VERSION_CODE=2
APP_ID=org.fossify.camera

View File

@@ -19,10 +19,6 @@ app-build-targetSDK = "34"
app-build-minimumSDK = "29"
app-build-javaVersion = "VERSION_17"
app-build-kotlinJVMTarget = "17"
#versioning
app-version-appId = "org.fossify.camera"
app-version-versionCode = "2"
app-version-versionName = "1.0.1"
[libraries]
#Android X
androidx-camera-core = { module = "androidx.camera:camera-core", version.ref = "androidx-camera" }