apply plugin: 'com.android.application' if (enable_plugin_kotlin) { apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' } android { buildToolsVersion rootProject.ext.version_buildTools compileSdkVersion rootProject.ext.version_compileSdk defaultConfig { resValue "string", "manifest_package_id", "com.github.dfa.diaspora_android" applicationId "com.github.dfa.diaspora_android" versionName "1.3.5" versionCode 46 vectorDrawables.useSupportLibrary = true minSdkVersion rootProject.ext.version_minSdk targetSdkVersion rootProject.ext.version_compileSdk buildConfigField "boolean", "IS_TEST_BUILD", "false" buildConfigField "boolean", "IS_GPLAY_BUILD", "false" buildConfigField "String[]", "DETECTED_ANDROID_LOCALES", "${findUsedAndroidLocales()}" buildConfigField "String", "BUILD_DATE", "\"${getBuildDate()}\"" buildConfigField "String", "GITHASH", "\"${getGitHash()}\"" setProperty("archivesBaseName", applicationId + "-v" + versionCode + "-" + versionName) } flavorDimensions "default" productFlavors { flavorDefault { } /* flavorGplay { buildConfigField "boolean", "IS_GPLAY_BUILD", "true" }*/ flavorDandelior { applicationId "net.gsantner.dandelior" } flavorAtest { applicationId "net.gsantner.secondlion" versionCode = Integer.parseInt(new Date().format('yyMMdd')) versionName = new Date().format('yyMMdd') buildConfigField "boolean", "IS_TEST_BUILD", "true" } } 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 } lintOptions { disable 'MissingTranslation', 'InvalidPackage', 'ObsoleteLintCustomCheck', 'DefaultLocale', 'UnusedAttribute', 'VectorRaster', 'InflateParams', 'IconLocation', 'UnusedResources', 'TypographyEllipsis' abortOnError false } } dependencies { // Sub-Projects //implementation project(':subprojectFromRoot') // Jars implementation fileTree(dir: 'libs', include: ['*.jar']) testImplementation 'junit:junit:4.13' // Android standard libs 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}" implementation "com.android.support:preference-v7:${version_library_appcompat}" // UI libraries implementation "com.github.DASAR:ShiftColorPicker:v0.5" // Tool libraries implementation 'commons-io:commons-io:2.6' implementation "info.guardianproject.netcipher:netcipher:${version_library_netcipher}" implementation "info.guardianproject.netcipher:netcipher-webkit:${version_library_netcipher}" //noinspection AnnotationProcessorOnCompilePath implementation "com.jakewharton:butterknife:${version_library_butterknife}" if (enable_plugin_kotlin) { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${version_plugin_kotlin}" } // Processors def anpros = ["com.jakewharton:butterknife-compiler:${version_library_butterknife}"] for (anpro in anpros) { if (enable_plugin_kotlin) { kapt anpro } else { annotationProcessor anpro } } }