2021-09-21 20:04:38 +02:00
|
|
|
plugins {
|
2021-09-21 20:07:36 +02:00
|
|
|
id "com.android.application"
|
2021-09-21 20:04:38 +02:00
|
|
|
}
|
2019-06-28 05:22:08 +02:00
|
|
|
|
|
|
|
android {
|
2021-09-22 15:20:32 +02:00
|
|
|
compileSdkVersion 31
|
2021-09-22 15:20:59 +02:00
|
|
|
buildToolsVersion "31.0.0"
|
2019-06-28 05:22:08 +02:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "org.grapheneos.pdfviewer"
|
2021-01-27 22:33:13 +01:00
|
|
|
minSdkVersion 26
|
2021-09-29 15:37:16 +02:00
|
|
|
targetSdkVersion 31
|
2020-05-28 20:42:52 +02:00
|
|
|
versionCode 6
|
2019-06-28 05:22:08 +02:00
|
|
|
versionName versionCode.toString()
|
|
|
|
resConfigs "en"
|
|
|
|
}
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
release
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
}
|
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2021-09-21 20:07:36 +02:00
|
|
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
2019-06-28 05:22:08 +02:00
|
|
|
signingConfig signingConfigs.release
|
|
|
|
}
|
|
|
|
}
|
|
|
|
compileOptions {
|
2021-09-30 18:15:34 +02:00
|
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
|
|
targetCompatibility JavaVersion.VERSION_11
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-09-21 20:07:36 +02:00
|
|
|
implementation fileTree(include: ["*.jar"], dir: "libs")
|
|
|
|
implementation "androidx.appcompat:appcompat:1.3.1"
|
|
|
|
implementation "com.google.android.material:material:1.4.0"
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
def props = new Properties()
|
2021-09-21 20:07:36 +02:00
|
|
|
def propFile = new File("signing.properties")
|
2019-06-28 05:22:08 +02:00
|
|
|
|
|
|
|
if (propFile.canRead()) {
|
|
|
|
props.load(new FileInputStream(propFile))
|
|
|
|
|
|
|
|
if (props != null &&
|
2021-09-21 20:07:36 +02:00
|
|
|
props.containsKey("STORE_FILE") &&
|
|
|
|
props.containsKey("STORE_PASSWORD") &&
|
|
|
|
props.containsKey("KEY_ALIAS") &&
|
|
|
|
props.containsKey("KEY_PASSWORD")) {
|
|
|
|
android.signingConfigs.release.storeFile = rootProject.file(props["STORE_FILE"])
|
|
|
|
android.signingConfigs.release.storePassword = props["STORE_PASSWORD"]
|
|
|
|
android.signingConfigs.release.keyAlias = props["KEY_ALIAS"]
|
|
|
|
android.signingConfigs.release.keyPassword = props["KEY_PASSWORD"]
|
2019-06-28 05:22:08 +02:00
|
|
|
} else {
|
2021-09-21 20:07:36 +02:00
|
|
|
println "signing.properties found but some entries are missing"
|
2019-06-28 05:22:08 +02:00
|
|
|
android.buildTypes.release.signingConfig = null
|
|
|
|
}
|
|
|
|
} else {
|
2021-09-21 20:07:36 +02:00
|
|
|
println "signing.properties not found"
|
2019-06-28 05:22:08 +02:00
|
|
|
android.buildTypes.release.signingConfig = null
|
|
|
|
}
|