libpdfviewer/app/build.gradle.kts
2021-11-21 17:42:53 -05:00

64 lines
1.8 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")
}
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
}
}
}
compileSdk = 31
buildToolsVersion("31.0.0")
defaultConfig {
applicationId = "org.grapheneos.pdfviewer"
minSdk = 26
targetSdk = 31
versionCode = 7
versionName = versionCode.toString()
resConfigs("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")
}
}
}
compileOptions {
sourceCompatibility(JavaVersion.VERSION_11)
targetCompatibility(JavaVersion.VERSION_11)
}
}
dependencies {
implementation("androidx.appcompat:appcompat:1.4.0")
implementation("com.google.android.material:material:1.4.0")
}