2021-11-21 21:10:47 +01:00
|
|
|
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")
|
2021-11-22 16:18:59 +01:00
|
|
|
id("kotlin-android")
|
2021-11-21 21:10:47 +01:00
|
|
|
}
|
|
|
|
|
2023-02-02 03:43:25 +01:00
|
|
|
java {
|
|
|
|
toolchain {
|
|
|
|
languageVersion.set(JavaLanguageVersion.of(11))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-21 21:10:47 +01:00
|
|
|
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
|
|
|
|
}
|
2022-02-25 18:13:36 +01:00
|
|
|
|
|
|
|
create("play") {
|
|
|
|
storeFile = rootProject.file(keystoreProperties["storeFile"]!!)
|
|
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
|
|
keyAlias = keystoreProperties["uploadKeyAlias"] as String
|
|
|
|
keyPassword = keystoreProperties["uploadKeyPassword"] as String
|
|
|
|
}
|
2021-11-21 21:10:47 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-22 18:01:46 +02:00
|
|
|
compileSdk = 33
|
2023-02-11 11:36:29 +01:00
|
|
|
buildToolsVersion = "33.0.2"
|
2021-11-21 21:10:47 +01:00
|
|
|
|
2022-09-16 01:53:32 +02:00
|
|
|
namespace = "app.grapheneos.pdfviewer"
|
|
|
|
|
2021-11-21 21:10:47 +01:00
|
|
|
defaultConfig {
|
2022-02-23 13:22:58 +01:00
|
|
|
applicationId = "app.grapheneos.pdfviewer"
|
2021-11-21 21:10:47 +01:00
|
|
|
minSdk = 26
|
2022-09-09 16:18:28 +02:00
|
|
|
targetSdk = 33
|
2022-10-04 18:31:21 +02:00
|
|
|
versionCode = 16
|
2021-11-21 21:10:47 +01:00
|
|
|
versionName = versionCode.toString()
|
2022-01-23 02:28:37 +01:00
|
|
|
resourceConfigurations.add("en")
|
2021-11-21 21:10:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
2022-02-18 10:47:26 +01:00
|
|
|
|
2022-02-25 18:13:36 +01:00
|
|
|
create("play") {
|
|
|
|
initWith(getByName("release"))
|
|
|
|
applicationIdSuffix = ".play"
|
|
|
|
if (useKeystoreProperties) {
|
|
|
|
signingConfig = signingConfigs.getByName("play")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-18 10:47:26 +01:00
|
|
|
buildFeatures {
|
|
|
|
viewBinding = true
|
|
|
|
}
|
2021-11-21 21:10:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility(JavaVersion.VERSION_11)
|
|
|
|
targetCompatibility(JavaVersion.VERSION_11)
|
|
|
|
}
|
2021-11-25 05:13:47 +01:00
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
|
|
}
|
2021-11-21 21:10:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-02-08 20:45:45 +01:00
|
|
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
2023-02-02 02:32:35 +01:00
|
|
|
implementation("com.google.android.material:material:1.8.0")
|
2021-11-21 21:10:47 +01:00
|
|
|
}
|