diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e53028e4..f60b97b5 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,4 +1,5 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties +import java.util.Properties plugins { alias(libs.plugins.android.application) @@ -8,7 +9,20 @@ plugins { alias(libs.plugins.ksp) } +val properties = Properties().apply { + load(rootProject.file("local.properties").inputStream()) +} + android { + signingConfigs { + create("release") { + keyAlias = properties.getProperty("release.keyAlias") + keyPassword = properties.getProperty("release.keyPassword") + storeFile = file(properties.getProperty("release.storeFile") + "/terning/terning.jks") + storePassword = properties.getProperty("release.storePassword") + } + } + namespace = "com.terning.point" compileSdk = libs.versions.compileSdk.get().toInt() @@ -27,10 +41,10 @@ android { buildConfigField( "String", "NATIVE_APP_KEY", - gradleLocalProperties(rootDir, providers).getProperty("native.app.key"), + properties.getProperty("native.app.key"), ) manifestPlaceholders["NATIVE_APP_KEY"] = - gradleLocalProperties(rootDir, providers).getProperty("nativeAppKey") + properties.getProperty("nativeAppKey") } buildTypes { @@ -38,20 +52,21 @@ android { buildConfigField( "String", "BASE_URL", - gradleLocalProperties(rootDir, providers).getProperty("test.base.url") + properties.getProperty("test.base.url") ) } release { buildConfigField( "String", "BASE_URL", - gradleLocalProperties(rootDir, providers).getProperty("base.url") + properties.getProperty("base.url") ) isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) + signingConfig = signingConfigs.getByName("release") } } compileOptions { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6bfbedc9..2794f609 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ kotlinCompilerExtensionVersion = "1.5.0" jvmTarget = "1.8" ## Android gradle plugin -androidGradlePlugin = "8.5.0" +androidGradlePlugin = "8.6.0" androidDesugarJdkLibs = "2.0.4" ## AndroidX