2016-03-03 17:46:31 +01:00
|
|
|
apply plugin: 'com.android.application'
|
2017-11-18 20:04:59 +01:00
|
|
|
if (enable_plugin_kotlin) {
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
apply plugin: 'kotlin-kapt'
|
2017-08-04 05:42:43 +02:00
|
|
|
}
|
2016-03-03 17:46:31 +01:00
|
|
|
|
|
|
|
android {
|
2019-01-11 02:38:30 +01:00
|
|
|
buildToolsVersion rootProject.ext.version_buildTools
|
|
|
|
compileSdkVersion rootProject.ext.version_compileSdk
|
2016-03-03 17:46:31 +01:00
|
|
|
|
|
|
|
defaultConfig {
|
2019-08-24 14:54:25 +02:00
|
|
|
resValue "string", "manifest_package_id", "com.github.dfa.diaspora_android"
|
|
|
|
applicationId "com.github.dfa.diaspora_android"
|
2020-02-09 13:12:59 +01:00
|
|
|
versionName "1.3.4"
|
|
|
|
versionCode 45
|
2019-08-24 14:54:25 +02:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
|
|
|
|
2019-01-11 02:38:30 +01:00
|
|
|
minSdkVersion rootProject.ext.version_minSdk
|
|
|
|
targetSdkVersion rootProject.ext.version_compileSdk
|
2017-10-29 11:01:27 +01:00
|
|
|
buildConfigField "boolean", "IS_TEST_BUILD", "false"
|
|
|
|
buildConfigField "boolean", "IS_GPLAY_BUILD", "false"
|
2018-03-05 23:37:24 +01:00
|
|
|
buildConfigField "String[]", "DETECTED_ANDROID_LOCALES", "${findUsedAndroidLocales()}"
|
2017-10-29 11:01:27 +01:00
|
|
|
buildConfigField "String", "GITHASH", "\"${getGitHash()}\""
|
2019-08-24 14:54:25 +02:00
|
|
|
setProperty("archivesBaseName", applicationId + "-v" + versionCode + "-" + versionName)
|
2017-10-29 11:01:27 +01:00
|
|
|
}
|
2017-05-03 23:48:22 +02:00
|
|
|
|
2019-01-11 02:38:30 +01:00
|
|
|
flavorDimensions "default"
|
2016-12-22 04:07:30 +01:00
|
|
|
productFlavors {
|
2017-03-19 23:32:18 +01:00
|
|
|
flavorDefault {
|
2016-12-22 04:07:30 +01:00
|
|
|
}
|
2017-10-29 14:47:00 +01:00
|
|
|
|
|
|
|
/*
|
2017-11-18 20:04:59 +01:00
|
|
|
flavorGplay {
|
2017-05-03 23:48:22 +02:00
|
|
|
buildConfigField "boolean", "IS_GPLAY_BUILD", "true"
|
2017-10-29 11:01:27 +01:00
|
|
|
}*/
|
2018-03-05 23:37:24 +01:00
|
|
|
|
2018-07-22 14:03:29 +02:00
|
|
|
flavorDandelior {
|
|
|
|
applicationId "net.gsantner.dandelior"
|
|
|
|
}
|
|
|
|
|
2019-08-24 14:54:25 +02:00
|
|
|
flavorAtest {
|
2018-07-22 14:03:29 +02:00
|
|
|
applicationId "net.gsantner.secondlion"
|
2017-02-24 22:46:17 +01:00
|
|
|
versionCode = Integer.parseInt(new Date().format('yyMMdd'))
|
|
|
|
versionName = new Date().format('yyMMdd')
|
2017-03-19 23:32:18 +01:00
|
|
|
buildConfigField "boolean", "IS_TEST_BUILD", "true"
|
2016-12-22 04:07:30 +01:00
|
|
|
}
|
2017-03-19 23:32:18 +01:00
|
|
|
}
|
2019-01-11 02:38:30 +01:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main { assets.srcDirs = ['src/main/assets'] }
|
|
|
|
if (enable_plugin_kotlin) {
|
|
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
|
|
}
|
|
|
|
main.java.srcDirs += 'thirdparty/java'
|
|
|
|
main.res.srcDirs += 'thirdparty/res'
|
|
|
|
main.assets.srcDirs += 'thirdparty/assets'
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy {
|
|
|
|
eachDependency { details ->
|
|
|
|
if (details.requested.group == 'com.android.support') {
|
|
|
|
if (details.requested.name != 'multidex' && details.requested.name != 'multidex-instrumentation') {
|
|
|
|
details.useVersion "${rootProject.ext.version_library_appcompat}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/LICENSE-LGPL-2.1.txt'
|
|
|
|
exclude 'META-INF/LICENSE-LGPL-3.txt'
|
|
|
|
exclude 'META-INF/LICENSE-W3C-TEST'
|
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
encoding = 'UTF-8'
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
2016-07-27 21:54:54 +02:00
|
|
|
lintOptions {
|
|
|
|
disable 'MissingTranslation'
|
2019-01-11 02:38:30 +01:00
|
|
|
disable 'InvalidPackage'
|
|
|
|
abortOnError false
|
2016-07-27 21:54:54 +02:00
|
|
|
}
|
2016-03-03 17:46:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2016-05-05 17:42:29 +02:00
|
|
|
// Sub-Projects
|
2017-10-29 11:01:27 +01:00
|
|
|
//implementation project(':subprojectFromRoot')
|
2016-05-05 17:42:29 +02:00
|
|
|
|
|
|
|
// Jars
|
2017-10-29 11:01:27 +01:00
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2020-02-09 12:46:29 +01:00
|
|
|
testImplementation 'junit:junit:4.13'
|
2016-05-05 17:42:29 +02:00
|
|
|
|
|
|
|
// Android standard libs
|
2017-11-18 20:04:59 +01:00
|
|
|
implementation "com.android.support:appcompat-v7:${version_library_appcompat}"
|
|
|
|
implementation "com.android.support:design:${version_library_appcompat}"
|
|
|
|
implementation "com.android.support:support-v4:${version_library_appcompat}"
|
|
|
|
implementation "com.android.support:customtabs:${version_library_appcompat}"
|
|
|
|
implementation "com.android.support:cardview-v7:${version_library_appcompat}"
|
2019-07-26 03:19:28 +02:00
|
|
|
implementation "com.android.support:preference-v7:${version_library_appcompat}"
|
2016-05-05 17:42:29 +02:00
|
|
|
|
2017-08-05 12:26:04 +02:00
|
|
|
// UI libraries
|
2017-10-29 11:01:27 +01:00
|
|
|
implementation "com.github.DASAR:ShiftColorPicker:v0.5"
|
2017-08-05 12:26:04 +02:00
|
|
|
|
|
|
|
// Tool libraries
|
2019-07-26 03:19:28 +02:00
|
|
|
implementation 'commons-io:commons-io:2.6'
|
2017-11-18 20:04:59 +01:00
|
|
|
implementation "info.guardianproject.netcipher:netcipher:${version_library_netcipher}"
|
|
|
|
implementation "info.guardianproject.netcipher:netcipher-webkit:${version_library_netcipher}"
|
|
|
|
implementation "com.jakewharton:butterknife:${version_library_butterknife}"
|
|
|
|
if (enable_plugin_kotlin) {
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$version_plugin_kotlin"
|
|
|
|
}
|
2017-08-04 05:42:43 +02:00
|
|
|
|
2017-11-18 20:04:59 +01:00
|
|
|
// Processors
|
|
|
|
def anpros = ["com.jakewharton:butterknife-compiler:${version_library_butterknife}"]
|
|
|
|
for (anpro in anpros) {
|
|
|
|
if (enable_plugin_kotlin) {
|
|
|
|
kapt anpro
|
|
|
|
} else {
|
|
|
|
annotationProcessor anpro
|
|
|
|
}
|
|
|
|
}
|
2016-08-27 15:17:02 +02:00
|
|
|
}
|