forked from upstream-mirrors/quik
202 lines
7.8 KiB
Groovy
202 lines
7.8 KiB
Groovy
/*
|
|
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
|
*
|
|
* This file is part of QKSMS.
|
|
*
|
|
* QKSMS is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* QKSMS is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'realm-android' // Realm needs to be before Kotlin or the build will fail
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
buildToolsVersion "29.0.2"
|
|
flavorDimensions "analytics"
|
|
|
|
defaultConfig {
|
|
applicationId "com.moez.QKSMS"
|
|
minSdkVersion 21
|
|
targetSdkVersion 29
|
|
versionCode 2209
|
|
versionName "3.7.10"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
setProperty("archivesBaseName", "QKSMS-v${versionName}")
|
|
}
|
|
|
|
signingConfigs {
|
|
release
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility 1.8
|
|
targetCompatibility 1.8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
productFlavors {
|
|
withAnalytics { dimension "analytics" }
|
|
noAnalytics { dimension "analytics" }
|
|
}
|
|
|
|
if (System.getenv("CI") == "true") {
|
|
signingConfigs.release.storeFile = file("../keystore")
|
|
signingConfigs.release.storePassword = System.getenv("keystore_password")
|
|
signingConfigs.release.keyAlias = System.getenv("key_alias")
|
|
signingConfigs.release.keyPassword = System.getenv("key_password")
|
|
}
|
|
}
|
|
|
|
androidExtensions {
|
|
experimental = true
|
|
}
|
|
|
|
configurations {
|
|
noAnalyticsDebug
|
|
noAnalyticsRelease
|
|
withAnalyticsDebug
|
|
withAnalyticsRelease
|
|
}
|
|
|
|
dependencies {
|
|
// lifecycle
|
|
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
|
|
|
// androidx
|
|
implementation "androidx.appcompat:appcompat:$androidx_appcompat_version"
|
|
implementation "androidx.constraintlayout:constraintlayout:$androidx_constraintlayout_version"
|
|
implementation "androidx.core:core-ktx:$androidx_core_version"
|
|
implementation "androidx.emoji:emoji-appcompat:$androidx_emoji_version"
|
|
implementation "androidx.viewpager2:viewpager2:$androidx_viewpager_version"
|
|
implementation "com.google.android.material:material:$material_version"
|
|
|
|
// conductor
|
|
implementation "com.bluelinelabs:conductor:$conductor_version"
|
|
implementation "com.bluelinelabs:conductor-archlifecycle:$conductor_version"
|
|
|
|
// glide
|
|
implementation "com.github.bumptech.glide:glide:$glide_version"
|
|
kapt "com.github.bumptech.glide:compiler:$glide_version"
|
|
|
|
// exoplayer
|
|
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
|
|
implementation("com.google.android.exoplayer:exoplayer-ui:$exoplayer_version", {
|
|
exclude group: "com.android.support", module: "support-media-compat"
|
|
})
|
|
|
|
// rxbinding
|
|
implementation "com.jakewharton.rxbinding2:rxbinding-kotlin:$rxbinding_version"
|
|
implementation "com.jakewharton.rxbinding2:rxbinding-support-v4-kotlin:$rxbinding_version"
|
|
|
|
// autodispose
|
|
implementation "com.uber.autodispose:autodispose-android-archcomponents:$autodispose_version"
|
|
implementation "com.uber.autodispose:autodispose-android-archcomponents-test:$autodispose_version"
|
|
implementation "com.uber.autodispose:autodispose-android:$autodispose_version"
|
|
implementation "com.uber.autodispose:autodispose:$autodispose_version"
|
|
implementation "com.uber.autodispose:autodispose-lifecycle:$autodispose_version"
|
|
|
|
// dagger
|
|
implementation "com.google.dagger:dagger:$dagger_version"
|
|
implementation "com.google.dagger:dagger-android-support:$dagger_version"
|
|
kapt "com.google.dagger:dagger-compiler:$dagger_version"
|
|
kapt "com.google.dagger:dagger-android-processor:$dagger_version"
|
|
compileOnly "javax.annotation:jsr250-api:1.0"
|
|
|
|
// ezvcard
|
|
implementation('com.googlecode.ez-vcard:ez-vcard:0.10.4', {
|
|
exclude group: "org.jsoup", module: "jsoup"
|
|
exclude group: "org.freemarker", module: "freemarker"
|
|
exclude group: "com.fasterxml.jackson.core", module: "jackson-core"
|
|
})
|
|
|
|
// realm
|
|
implementation("io.realm:android-adapters:$realm_adapters_version") { transitive = false }
|
|
kapt "io.realm:realm-annotations:$realm_version"
|
|
kapt "io.realm:realm-annotations-processor:$realm_version"
|
|
|
|
// rxjava
|
|
implementation "io.reactivex.rxjava2:rxandroid:$rxandroid_version"
|
|
implementation "io.reactivex.rxjava2:rxjava:$rxjava_version"
|
|
implementation "io.reactivex.rxjava2:rxkotlin:$rxkotlin_version"
|
|
implementation "com.uber.rxdogtag:rxdogtag:$rxdogtag_version"
|
|
implementation "com.uber.rxdogtag:rxdogtag-autodispose:$rxdogtag_version"
|
|
|
|
|
|
// testing
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:$espresso_version", {
|
|
exclude group: "com.android.support", module: "support-annotations"
|
|
})
|
|
androidTestImplementation "org.mockito:mockito-android:$mockito_version"
|
|
testImplementation "androidx.test:runner:$androidx_testrunner_version"
|
|
testImplementation "junit:junit:$junit_version"
|
|
testImplementation "org.mockito:mockito-core:$mockito_version"
|
|
|
|
// moshi
|
|
implementation "com.squareup.moshi:moshi:$moshi_version"
|
|
debugImplementation "com.squareup.moshi:moshi-kotlin:$moshi_version"
|
|
kaptRelease "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version"
|
|
|
|
// coroutines
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-rx2:$coroutines_version"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-reactive:$coroutines_version"
|
|
|
|
implementation "com.android.billingclient:billing:1.0"
|
|
implementation "com.github.chrisbanes:PhotoView:2.0.0"
|
|
implementation "com.f2prateek.rx.preferences2:rx-preferences:$rx_preferences_version"
|
|
implementation "com.google.android:flexbox:0.3.1"
|
|
implementation "com.jakewharton.timber:timber:$timber_version"
|
|
implementation "com.squareup.moshi:moshi-kotlin:$moshi_version"
|
|
implementation "me.leolin:ShortcutBadger:1.1.21"
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation project(":android-smsmms")
|
|
implementation project(":common")
|
|
implementation project(':data')
|
|
implementation project(':domain')
|
|
|
|
withAnalyticsImplementation 'com.google.firebase:firebase-core:16.0.9'
|
|
withAnalyticsImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
|
|
|
noAnalyticsDebug project(path: ':data', configuration: 'noAnalyticsDebug')
|
|
noAnalyticsRelease project(path: ':data', configuration: 'noAnalyticsRelease')
|
|
withAnalyticsDebug project(path: ':data', configuration: 'withAnalyticsDebug')
|
|
withAnalyticsRelease project(path: ':data', configuration: 'withAnalyticsRelease')
|
|
}
|
|
|
|
if (getGradle().getStartParameter().getTaskRequests().toString().contains("WithAnalytics")) {
|
|
apply plugin: 'io.fabric'
|
|
apply plugin: 'com.google.gms.google-services'
|
|
}
|