|
|
@ -1,6 +1,10 @@
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'com.bugsnag.android.gradle'
|
|
|
|
apply plugin: 'com.bugsnag.android.gradle'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getVersionCode = { -> return 1362 }
|
|
|
|
|
|
|
|
def getReleaseName = { -> return "\"Xiyunykus\"" }
|
|
|
|
|
|
|
|
// https://en.wikipedia.org/wiki/List_of_dinosaur_genera
|
|
|
|
|
|
|
|
|
|
|
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
|
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
|
|
def keystoreProperties = new Properties()
|
|
|
|
def keystoreProperties = new Properties()
|
|
|
|
|
|
|
|
|
|
|
@ -13,12 +17,11 @@ android {
|
|
|
|
applicationId "eu.faircode.email"
|
|
|
|
applicationId "eu.faircode.email"
|
|
|
|
minSdkVersion 21
|
|
|
|
minSdkVersion 21
|
|
|
|
targetSdkVersion 30
|
|
|
|
targetSdkVersion 30
|
|
|
|
versionCode 1362
|
|
|
|
versionCode getVersionCode()
|
|
|
|
versionName "1.1362"
|
|
|
|
versionName "1." + getVersionCode()
|
|
|
|
archivesBaseName = "FairEmail-v$versionName"
|
|
|
|
archivesBaseName = "FairEmail-v$versionName"
|
|
|
|
|
|
|
|
|
|
|
|
// https://en.wikipedia.org/wiki/List_of_dinosaur_genera
|
|
|
|
buildConfigField "String", "RELEASE_NAME", getReleaseName()
|
|
|
|
buildConfigField "String", "RELEASE_NAME", "\"Xiyunykus\""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
javaCompileOptions {
|
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
@ -36,39 +39,6 @@ android {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// https://stackoverflow.com/questions/28948538/
|
|
|
|
|
|
|
|
// $JAVA_HOME/bin/java -jar ~/Android/Sdk/tools/proguard/lib/retrace.jar ~/email/app/schemas/mapping/FairEmail-v1.nnn-github-release-mapping.txt
|
|
|
|
|
|
|
|
applicationVariants.all { variant ->
|
|
|
|
|
|
|
|
if (variant.getBuildType().isMinifyEnabled())
|
|
|
|
|
|
|
|
variant.assembleProvider.get().doLast {
|
|
|
|
|
|
|
|
for (file in variant.getMappingFileProvider().get().files)
|
|
|
|
|
|
|
|
if (file != null && file.exists()) {
|
|
|
|
|
|
|
|
def dir = "${rootDir}/app/schemas/mapping"
|
|
|
|
|
|
|
|
def name = "$archivesBaseName-$variant.baseName-$file.name"
|
|
|
|
|
|
|
|
def target = new File(dir, name)
|
|
|
|
|
|
|
|
if (!target.exists())
|
|
|
|
|
|
|
|
copy {
|
|
|
|
|
|
|
|
from file
|
|
|
|
|
|
|
|
into dir
|
|
|
|
|
|
|
|
rename { String fileName -> name }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
|
|
|
buildConfig = true
|
|
|
|
|
|
|
|
viewBinding = false
|
|
|
|
|
|
|
|
dataBinding = false
|
|
|
|
|
|
|
|
aidl = true
|
|
|
|
|
|
|
|
renderScript = false
|
|
|
|
|
|
|
|
resValues = false
|
|
|
|
|
|
|
|
shaders = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
sourceSets {
|
|
|
|
github {
|
|
|
|
github {
|
|
|
|
java.srcDirs = ['src/main/java', 'src/play/java']
|
|
|
|
java.srcDirs = ['src/main/java', 'src/play/java']
|
|
|
@ -81,12 +51,6 @@ android {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
main.res.srcDirs += 'src/main/resExtra'
|
|
|
|
main.res.srcDirs += 'src/main/resExtra'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dependenciesInfo {
|
|
|
|
|
|
|
|
includeInApk = false
|
|
|
|
|
|
|
|
includeInBundle = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
lintOptions {
|
|
|
|
disable 'MissingTranslation'
|
|
|
|
disable 'MissingTranslation'
|
|
|
@ -104,6 +68,11 @@ android {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dependenciesInfo {
|
|
|
|
|
|
|
|
includeInApk = false
|
|
|
|
|
|
|
|
includeInBundle = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'LICENSES'
|
|
|
|
exclude 'LICENSES'
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
@ -127,6 +96,19 @@ android {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
|
|
|
buildConfig = true
|
|
|
|
|
|
|
|
viewBinding = false
|
|
|
|
|
|
|
|
dataBinding = false
|
|
|
|
|
|
|
|
aidl = true
|
|
|
|
|
|
|
|
renderScript = false
|
|
|
|
|
|
|
|
resValues = false
|
|
|
|
|
|
|
|
shaders = false
|
|
|
|
|
|
|
|
compose = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
buildTypes {
|
|
|
|
// https://developer.android.com/studio/build/shrink-code
|
|
|
|
// https://developer.android.com/studio/build/shrink-code
|
|
|
|
release {
|
|
|
|
release {
|
|
|
@ -186,6 +168,26 @@ android {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// https://stackoverflow.com/questions/28948538/
|
|
|
|
|
|
|
|
// $JAVA_HOME/bin/java -jar ~/Android/Sdk/tools/proguard/lib/retrace.jar ~/email/app/schemas/mapping/FairEmail-v1.nnn-github-release-mapping.txt
|
|
|
|
|
|
|
|
applicationVariants.all { variant ->
|
|
|
|
|
|
|
|
if (variant.getBuildType().isMinifyEnabled())
|
|
|
|
|
|
|
|
variant.assembleProvider.get().doLast {
|
|
|
|
|
|
|
|
for (file in variant.getMappingFileProvider().get().files)
|
|
|
|
|
|
|
|
if (file != null && file.exists()) {
|
|
|
|
|
|
|
|
def dir = "${rootDir}/app/schemas/mapping"
|
|
|
|
|
|
|
|
def name = "$archivesBaseName-$variant.baseName-$file.name"
|
|
|
|
|
|
|
|
def target = new File(dir, name)
|
|
|
|
|
|
|
|
if (!target.exists())
|
|
|
|
|
|
|
|
copy {
|
|
|
|
|
|
|
|
from file
|
|
|
|
|
|
|
|
into dir
|
|
|
|
|
|
|
|
rename { String fileName -> name }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bugsnag {
|
|
|
|
bugsnag {
|
|
|
|
// https://docs.bugsnag.com/build-integrations/gradle/
|
|
|
|
// https://docs.bugsnag.com/build-integrations/gradle/
|
|
|
|
uploadJvmMappings = false // disables upload of ProGuard/DexGuard/R8 mapping files
|
|
|
|
uploadJvmMappings = false // disables upload of ProGuard/DexGuard/R8 mapping files
|
|
|
|