apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' apply plugin: 'com.getkeepsafe.dexcount' apply plugin: 'com.gladed.androidgitversion' android { compileSdkVersion kau.targetSdk buildToolsVersion kau.buildTools androidGitVersion { codeFormat = 'MMNNPPXX' format = '%tag%%-count%%-commit%' prefix 'v' } defaultConfig { applicationId "${project.APP_GROUP}." + project.APP_ID.toLowerCase(Locale.CANADA) minSdkVersion kau.minSdk targetSdkVersion kau.targetSdk versionCode androidGitVersion.code() versionName androidGitVersion.name() multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } applicationVariants.all { variant -> variant.outputs.all { outputFileName = "${project.APP_ID}-${variant.buildType.name}.apk" } } lintOptions { warningsAsErrors true disable 'TrustAllX509TrustManager', 'UnusedResources', 'ContentDescription', 'RtlSymmetry', 'MissingTranslation' xmlReport false textReport true textOutput 'stdout' } def testKeystoreFile = file('../files/test.keystore') def testPropFile = file('../files/test.properties') def withTestSigning = testKeystoreFile.exists() && testPropFile.exists() def releaseKeystoreFile = file('../files/release.keystore') def releasePropFile = file('../files/release.properties') def withReleaseSigning = releaseKeystoreFile.exists() && releasePropFile.exists() signingConfigs { debug { storeFile file("../files/debug.keystore") storePassword "debugKey" keyAlias "debugKey" keyPassword "debugKey" } if (withTestSigning) { def testProps = new Properties() testPropFile.withInputStream { testProps.load(it) } test { storeFile testKeystoreFile storePassword testProps.getProperty('storePassword') keyAlias testProps.getProperty('keyAlias') keyPassword testProps.getProperty('keyPassword') } } if (withReleaseSigning) { def releaseProps = new Properties() releasePropFile.withInputStream { releaseProps.load(it) } release { storeFile releaseKeystoreFile storePassword releaseProps.getProperty('storePassword') keyAlias releaseProps.getProperty('keyAlias') keyPassword releaseProps.getProperty('keyPassword') } } } buildTypes { debug { minifyEnabled false shrinkResources false applicationIdSuffix ".debug" versionNameSuffix "-debug" signingConfig signingConfigs.debug resValue "string", "frost_name", "Frost Debug" resValue "string", "frost_web", "Frost Web Debug" ext.enableBugsnag = false } releaseTest { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' applicationIdSuffix ".test" versionNameSuffix "-test" if (withTestSigning) signingConfig signingConfigs.test resValue "string", "frost_name", "Frost Test" resValue "string", "frost_web", "Frost Web Test" } release { minifyEnabled true shrinkResources true if (withReleaseSigning) signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' resValue "string", "frost_name", "Frost" resValue "string", "frost_web", "Frost Web" } } sourceSets { main.java.srcDirs += 'src/main/kotlin' test.java.srcDirs += 'src/test/kotlin' androidTest.java.srcDirs += 'src/androidTest/kotlin' } packagingOptions { pickFirst 'META-INF/library_release.kotlin_module' } } repositories { google() jcenter() maven { url "https://jitpack.io" } } dependencies { androidTestImplementation("com.android.support.test:runner:${kau.testRunner}") { exclude group: 'com.android.support', module: 'support-annotations' } implementation "com.android.support:exifinterface:${kau.supportLibs}" androidTestImplementation kauDependency.kotlinTest androidTestImplementation "com.android.support.test:rules:${TEST_RULE}" testImplementation kauDependency.kotlinTest testImplementation "org.jetbrains.kotlin:kotlin-reflect:${KOTLIN}" testImplementation kauDependency.junit implementation "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN}" //noinspection GradleDependency implementation "ca.allanwang.kau:adapter:$KAU" //noinspection GradleDependency implementation "ca.allanwang.kau:about:$KAU" //noinspection GradleDependency implementation "ca.allanwang.kau:colorpicker:$KAU" //noinspection GradleDependency implementation "ca.allanwang.kau:mediapicker:$KAU" //noinspection GradleDependency implementation "ca.allanwang.kau:kpref-activity:$KAU" //noinspection GradleDependency implementation "ca.allanwang.kau:searchview:$KAU" //noinspection GradleDependency implementation "ca.allanwang.kau:core:$KAU" //noinspection GradleDependency implementation "ca.allanwang.kau:core-ui:$KAU" implementation "org.apache.commons:commons-text:${COMMONS_TEXT}" implementation "com.devbrackets.android:exomedia:${EXOMEDIA}" implementation "com.mikepenz:fastadapter-extensions:${kau.fastAdapter}@aar" //noinspection GradleDependency implementation "com.github.bumptech.glide:okhttp3-integration:${kau.glide}" //noinspection GradleDependency kapt "com.github.bumptech.glide:compiler:${kau.glide}" implementation "com.fasterxml.jackson.core:jackson-databind:${JACKSON}" //noinspection GradleDependency releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${LEAK_CANARY}" //noinspection GradleDependency releaseTestImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${LEAK_CANARY}" //noinspection GradleDependency debugImplementation "com.squareup.leakcanary:leakcanary-android:${LEAK_CANARY}" // testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${LEAK_CANARY}" implementation "com.github.Raizlabs.DBFlow:dbflow:${DBFLOW}" implementation "com.github.Raizlabs.DBFlow:dbflow-core:${DBFLOW}" kapt "com.github.Raizlabs.DBFlow:dbflow-processor:${DBFLOW}" implementation "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${DBFLOW}" //Icons implementation "com.mikepenz:material-design-iconic-typeface:${kau.iconicsMaterial}@aar" implementation "com.mikepenz:community-material-typeface:${kau.iconicsCommunity}@aar" implementation "org.jsoup:jsoup:${JSOUP}" implementation "com.squareup.okhttp3:okhttp:${OKHTTP}" implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP}" implementation "co.zsmb:materialdrawer-kt:${MATERIAL_DRAWER_KT}" implementation "nz.bradcampbell:paperparcel:${PAPER_PARCEL}" implementation "nz.bradcampbell:paperparcel-kotlin:${PAPER_PARCEL}" kapt "nz.bradcampbell:paperparcel-compiler:${PAPER_PARCEL}" implementation "com.bugsnag:bugsnag-android:${BUGSNAG}" implementation "com.davemorrissey.labs:subsampling-scale-image-view:${SCALE_IMAGE_VIEW}" implementation "com.sothree.slidinguppanel:library:${SLIDING_PANEL}" //Reactive Libs implementation "io.reactivex.rxjava2:rxjava:${RX_JAVA}" implementation "io.reactivex.rxjava2:rxkotlin:${RX_KOTLIN}" implementation "io.reactivex.rxjava2:rxandroid:${RX_ANDROID}" implementation "com.github.pwittchen:reactivenetwork-rx2:${RX_NETWORK}" } apply plugin: 'com.bugsnag.android.gradle'