1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2024-11-24 13:22:08 +01:00
dandelion/app/build.gradle

136 lines
4.5 KiB
Groovy
Raw Permalink Normal View History

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 {
resValue "string", "manifest_package_id", "com.github.dfa.diaspora_android"
applicationId "com.github.dfa.diaspora_android"
2019-08-25 14:19:19 +02:00
versionName "1.3.2"
versionCode 43
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()}\""
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 {
flavorDefault {
2016-12-22 04:07:30 +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
flavorDandelior {
applicationId "net.gsantner.dandelior"
}
flavorAtest {
applicationId "net.gsantner.secondlion"
2017-02-24 22:46:17 +01:00
versionCode = Integer.parseInt(new Date().format('yyMMdd'))
versionName = new Date().format('yyMMdd')
buildConfigField "boolean", "IS_TEST_BUILD", "true"
2016-12-22 04:07:30 +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'])
testImplementation 'junit:junit:4.12'
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
// UI libraries
2017-10-29 11:01:27 +01:00
implementation "com.github.DASAR:ShiftColorPicker:v0.5"
// 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
}
}
}