fb59568765
fix: update JDK to 17 for AGP 8.0 fix: enable buildConfig build feature refactor: remove unnecessary android.enableR8.fullMode
97 lines
2.7 KiB
Plaintext
97 lines
2.7 KiB
Plaintext
import java.util.Properties
|
|
import java.io.FileInputStream
|
|
|
|
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
val useKeystoreProperties = keystorePropertiesFile.canRead()
|
|
val keystoreProperties = Properties()
|
|
if (useKeystoreProperties) {
|
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("kotlin-android")
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(17))
|
|
}
|
|
}
|
|
|
|
android {
|
|
if (useKeystoreProperties) {
|
|
signingConfigs {
|
|
create("release") {
|
|
storeFile = rootProject.file(keystoreProperties["storeFile"]!!)
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
keyAlias = keystoreProperties["keyAlias"] as String
|
|
keyPassword = keystoreProperties["keyPassword"] as String
|
|
}
|
|
|
|
create("play") {
|
|
storeFile = rootProject.file(keystoreProperties["storeFile"]!!)
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
keyAlias = keystoreProperties["uploadKeyAlias"] as String
|
|
keyPassword = keystoreProperties["uploadKeyPassword"] as String
|
|
}
|
|
}
|
|
}
|
|
|
|
compileSdk = 33
|
|
buildToolsVersion = "33.0.2"
|
|
|
|
namespace = "app.grapheneos.pdfviewer"
|
|
|
|
defaultConfig {
|
|
applicationId = "app.grapheneos.pdfviewer"
|
|
minSdk = 26
|
|
targetSdk = 33
|
|
versionCode = 16
|
|
versionName = versionCode.toString()
|
|
resourceConfigurations.add("en")
|
|
}
|
|
|
|
buildTypes {
|
|
getByName("debug") {
|
|
applicationIdSuffix = ".debug"
|
|
}
|
|
|
|
getByName("release") {
|
|
isShrinkResources = true
|
|
isMinifyEnabled = true
|
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
|
if (useKeystoreProperties) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
}
|
|
|
|
create("play") {
|
|
initWith(getByName("release"))
|
|
applicationIdSuffix = ".play"
|
|
if (useKeystoreProperties) {
|
|
signingConfig = signingConfigs.getByName("play")
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding = true
|
|
buildConfig = true
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility(JavaVersion.VERSION_17)
|
|
targetCompatibility(JavaVersion.VERSION_17)
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
|
implementation("com.google.android.material:material:1.8.0")
|
|
}
|