mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
be1896e53f
modify sms receive interactor to be used by new worker and add more logging. create custom workfactory that supports injection into workers. modify housekeeping worker to use injection.
231 lines
9.3 KiB
Groovy
231 lines
9.3 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 {
|
|
compileSdk 33
|
|
flavorDimensions "analytics"
|
|
|
|
defaultConfig {
|
|
applicationId 'dev.octoshrimpy.quik'
|
|
minSdkVersion 23
|
|
targetSdkVersion 33
|
|
versionCode 2229
|
|
versionName '4.1.1'
|
|
setProperty("archivesBaseName", "QUIK-v${versionName}")
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
setProperty("archivesBaseName", "QUIK-v${versionName}")
|
|
// versionNameSuffix '-beta'
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
def keystoreProps = new Properties()
|
|
def keystorePropsFile = rootProject.file('./.gradle/.gradlerc')
|
|
storeFile file('./my-release-key.keystore')
|
|
keyAlias 'quik_release'
|
|
if (keystorePropsFile.exists()) {
|
|
keystoreProps.load(new FileInputStream(keystorePropsFile))
|
|
} else if (System.getenv("CI") == "true") {
|
|
// do nothing
|
|
} else {
|
|
throw new GradleException("Keystore properties file not found.")
|
|
}
|
|
storePassword keystoreProps['storePassword']
|
|
keyPassword keystoreProps['keyPassword']
|
|
}
|
|
}
|
|
|
|
dependenciesInfo {
|
|
// Disables dependency metadata when building APKs.
|
|
includeInApk = false
|
|
// Disables dependency metadata when building Android App Bundles.
|
|
includeInBundle = false
|
|
}
|
|
|
|
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"
|
|
}
|
|
|
|
|
|
productFlavors {
|
|
withAnalytics { dimension "analytics" }
|
|
noAnalytics {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
namespace 'dev.octoshrimpy.quik'
|
|
if (System.getenv("CI") == "true") {
|
|
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"
|
|
implementation("androidx.work:work-runtime-ktx:$androidx_work_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.github.google.ExoPlayer:exoplayer-core:$exoplayer_version"
|
|
implementation("com.github.google.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"
|
|
//Resolve jdk8+ Generation Annotations - javax annotation does not exist
|
|
implementation 'com.github.pengrad:jdk9-deps:1ffe84c468'
|
|
|
|
// look into jakarta.annotation-api when switching to java 9
|
|
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
|
|
|
// 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 "com.github.realm:realm-android-adapters:$realm_adapters_version"
|
|
// 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"
|
|
kapt "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.github.chrisbanes:photoview:2.1.4"
|
|
implementation "com.f2prateek.rx.preferences2:rx-preferences:$rx_preferences_version"
|
|
implementation "com.github.google:flexbox-layout:0.3.1"
|
|
implementation "com.jakewharton.timber:timber:$timber_version"
|
|
implementation "com.squareup.moshi:moshi-kotlin:$moshi_version"
|
|
implementation "me.leolin:ShortcutBadger:1.1.22"
|
|
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-crashlytics:17.3.0'
|
|
withAnalyticsImplementation "com.android.billingclient:billing:$billing_version"
|
|
withAnalyticsImplementation "com.android.billingclient:billing-ktx:$billing_version"
|
|
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: 'com.google.gms.google-services'
|
|
apply plugin: 'com.google.firebase.crashlytics'
|
|
}
|