2018-07-14 13:09:58 -05:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'kotlin-android'
|
2021-10-04 10:13:31 -05:00
|
|
|
apply plugin: 'kotlinx-serialization'
|
2021-04-12 14:43:52 -05:00
|
|
|
apply plugin: 'kotlin-parcelize'
|
2018-10-03 14:28:23 -05:00
|
|
|
apply plugin: 'kotlin-kapt'
|
2020-08-02 11:29:41 -05:00
|
|
|
apply plugin: 'dagger.hilt.android.plugin'
|
2021-08-25 13:49:44 -05:00
|
|
|
apply plugin: 'com.google.gms.google-services'
|
2020-05-01 12:00:42 -05:00
|
|
|
apply plugin: 'com.google.firebase.crashlytics'
|
2018-10-03 14:28:23 -05:00
|
|
|
apply plugin: 'com.github.triplet.play'
|
2021-03-29 10:37:26 -05:00
|
|
|
apply plugin: 'ru.cian.huawei-publish'
|
2020-03-29 11:55:00 -05:00
|
|
|
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
|
2021-03-13 13:13:48 -06:00
|
|
|
apply plugin: 'com.huawei.agconnect'
|
2018-07-14 13:09:58 -05:00
|
|
|
apply from: 'jacoco.gradle'
|
2018-08-25 17:18:31 -05:00
|
|
|
apply from: 'sonarqube.gradle'
|
2019-06-03 18:53:20 -05:00
|
|
|
apply from: 'hooks.gradle'
|
2018-07-14 13:09:58 -05:00
|
|
|
|
2017-03-09 14:29:23 -06:00
|
|
|
android {
|
2021-11-11 08:23:20 -06:00
|
|
|
compileSdkVersion 31
|
2018-05-07 12:11:28 -05:00
|
|
|
|
2017-03-09 14:29:23 -06:00
|
|
|
defaultConfig {
|
2017-04-19 13:36:27 -05:00
|
|
|
applicationId "io.github.wulkanowy"
|
2017-09-17 11:04:28 -05:00
|
|
|
testApplicationId "io.github.tests.wulkanowy"
|
2021-04-03 04:56:07 -05:00
|
|
|
minSdkVersion 21
|
2021-11-11 08:23:20 -06:00
|
|
|
targetSdkVersion 31
|
2021-12-19 15:25:47 -06:00
|
|
|
versionCode 102
|
|
|
|
versionName "1.4.4"
|
2018-10-20 13:59:46 -05:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2021-01-31 10:12:38 -06:00
|
|
|
|
|
|
|
resValue "string", "app_name", "Wulkanowy"
|
|
|
|
|
2021-10-21 03:51:00 -05:00
|
|
|
manifestPlaceholders = [
|
|
|
|
firebase_enabled: project.hasProperty("enableFirebase"),
|
|
|
|
admob_project_id: ""
|
|
|
|
]
|
2019-03-30 12:28:37 -05:00
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
2020-08-02 11:29:41 -05:00
|
|
|
arguments += [
|
2019-10-03 07:00:07 -05:00
|
|
|
"room.schemaLocation": "$projectDir/schemas".toString(),
|
|
|
|
"room.incremental" : "true"
|
|
|
|
]
|
2019-03-30 12:28:37 -05:00
|
|
|
}
|
|
|
|
}
|
2021-10-09 11:37:27 -05:00
|
|
|
|
2021-10-21 03:51:00 -05:00
|
|
|
buildConfigField "String", "SINGLE_SUPPORT_AD_ID", "null"
|
|
|
|
|
2021-10-09 11:37:27 -05:00
|
|
|
if (System.env.SET_BUILD_TIMESTAMP) {
|
|
|
|
buildConfigField "long", "BUILD_TIMESTAMP", String.valueOf(System.currentTimeMillis())
|
|
|
|
} else {
|
|
|
|
buildConfigField "long", "BUILD_TIMESTAMP", "1486235849000"
|
|
|
|
}
|
2019-03-30 12:28:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
2021-03-06 08:34:07 -06:00
|
|
|
// https://github.com/robolectric/robolectric/issues/3928#issuecomment-395309991
|
|
|
|
debug.assets.srcDirs += files("$projectDir/schemas".toString())
|
2017-03-09 14:29:23 -06:00
|
|
|
}
|
2017-12-27 14:49:09 -06:00
|
|
|
|
2018-05-07 12:11:28 -05:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
storeFile file("upload-key.jks")
|
|
|
|
storePassword System.getenv("PLAY_STORE_PASSWORD")
|
|
|
|
keyAlias System.getenv("PLAY_KEY_ALIAS")
|
|
|
|
keyPassword System.getenv("PLAY_KEY_PASSWORD")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-09 14:29:23 -06:00
|
|
|
buildTypes {
|
|
|
|
release {
|
2018-12-15 14:29:57 -06:00
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
2021-03-16 06:49:17 -05:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2018-05-07 12:11:28 -05:00
|
|
|
signingConfig signingConfigs.release
|
2021-10-13 16:58:24 -05:00
|
|
|
buildConfigField "String", "MESSAGES_BASE_URL", "\"https://messages.wulkanowy.net.pl\""
|
2017-03-09 14:29:23 -06:00
|
|
|
}
|
2017-07-20 10:37:55 -05:00
|
|
|
debug {
|
2021-10-29 13:30:27 -05:00
|
|
|
resValue "string", "app_name", "Wulkanowy DEV"
|
2018-03-10 06:08:01 -06:00
|
|
|
applicationIdSuffix ".dev"
|
|
|
|
versionNameSuffix "-dev"
|
2020-05-01 12:00:42 -05:00
|
|
|
ext.enableCrashlytics = project.hasProperty("enableFirebase")
|
2021-10-13 16:58:24 -05:00
|
|
|
buildConfigField "String", "MESSAGES_BASE_URL", "\"https://messages.wulkanowy.net.pl\""
|
2017-07-20 10:37:55 -05:00
|
|
|
}
|
2017-03-09 14:29:23 -06:00
|
|
|
}
|
2018-11-01 13:27:02 -05:00
|
|
|
|
2019-06-03 07:12:48 -05:00
|
|
|
flavorDimensions "platform"
|
2019-08-26 13:54:20 -05:00
|
|
|
|
2019-06-03 07:12:48 -05:00
|
|
|
productFlavors {
|
2020-10-29 07:58:56 -05:00
|
|
|
hms {
|
|
|
|
dimension "platform"
|
2021-10-21 03:51:00 -05:00
|
|
|
manifestPlaceholders = [install_channel: "AppGallery"]
|
2020-10-29 07:58:56 -05:00
|
|
|
}
|
|
|
|
|
2019-06-03 07:12:48 -05:00
|
|
|
play {
|
|
|
|
dimension "platform"
|
2020-10-29 07:58:56 -05:00
|
|
|
manifestPlaceholders = [
|
2021-10-21 03:51:00 -05:00
|
|
|
install_channel : "Google Play",
|
|
|
|
admob_project_id: System.getenv("ADMOB_PROJECT_ID") ?: "ca-app-pub-3940256099942544~3347511713"
|
2020-10-29 07:58:56 -05:00
|
|
|
]
|
2021-10-21 03:51:00 -05:00
|
|
|
buildConfigField "String", "SINGLE_SUPPORT_AD_ID", "\"${System.getenv("SINGLE_SUPPORT_AD_ID") ?: "ca-app-pub-3940256099942544/5354046379"}\""
|
2019-06-03 07:12:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fdroid {
|
|
|
|
dimension "platform"
|
2021-10-21 03:51:00 -05:00
|
|
|
manifestPlaceholders = [install_channel: "F-Droid"]
|
2019-06-03 07:12:48 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-20 04:38:13 -05:00
|
|
|
playConfigs {
|
|
|
|
play { enabled.set(true) }
|
|
|
|
}
|
|
|
|
|
2020-06-11 07:38:04 -05:00
|
|
|
buildFeatures {
|
2021-08-25 13:49:44 -05:00
|
|
|
viewBinding true
|
2020-05-01 10:38:19 -05:00
|
|
|
}
|
|
|
|
|
2021-09-22 02:25:16 -05:00
|
|
|
bundle {
|
|
|
|
language {
|
|
|
|
enableSplit = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-06 08:34:07 -06:00
|
|
|
testOptions.unitTests {
|
|
|
|
includeAndroidResources = true
|
|
|
|
}
|
|
|
|
|
2019-03-10 14:18:40 -05:00
|
|
|
compileOptions {
|
2020-07-27 04:44:30 -05:00
|
|
|
coreLibraryDesugaringEnabled true
|
2021-08-25 13:49:44 -05:00
|
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
|
|
targetCompatibility JavaVersion.VERSION_11
|
2019-03-10 14:18:40 -05:00
|
|
|
}
|
2019-08-26 13:54:20 -05:00
|
|
|
|
2019-09-01 06:24:21 -05:00
|
|
|
kotlinOptions {
|
2021-08-25 13:49:44 -05:00
|
|
|
jvmTarget = "11"
|
2020-08-29 06:12:27 -05:00
|
|
|
freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn", "-Xjvm-default=all"]
|
2019-09-01 06:24:21 -05:00
|
|
|
}
|
|
|
|
|
2019-08-26 13:54:20 -05:00
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/library_release.kotlin_module'
|
|
|
|
exclude 'META-INF/library-core_release.kotlin_module'
|
|
|
|
}
|
2020-03-29 11:55:00 -05:00
|
|
|
|
|
|
|
aboutLibraries {
|
|
|
|
configPath = "app/src/main/res/raw"
|
|
|
|
}
|
2017-03-09 14:29:23 -06:00
|
|
|
}
|
|
|
|
|
2021-06-12 07:31:59 -05:00
|
|
|
kapt {
|
|
|
|
correctErrorTypes true
|
|
|
|
}
|
|
|
|
|
2018-05-07 12:11:28 -05:00
|
|
|
play {
|
2019-05-15 12:26:25 -05:00
|
|
|
defaultToAppBundles = false
|
2021-11-16 15:40:30 -06:00
|
|
|
track = 'beta'
|
2021-12-19 15:25:47 -06:00
|
|
|
updatePriority = 4
|
2021-09-20 04:38:13 -05:00
|
|
|
enabled.set(false)
|
2018-05-07 12:11:28 -05:00
|
|
|
}
|
|
|
|
|
2021-03-29 10:37:26 -05:00
|
|
|
huaweiPublish {
|
|
|
|
instances {
|
|
|
|
hmsRelease {
|
2021-05-02 06:49:28 -05:00
|
|
|
credentialsPath = "$rootDir/app/src/release/agconnect-credentials.json"
|
2021-09-05 20:27:54 -05:00
|
|
|
buildFormat = "aab"
|
2021-03-29 10:37:26 -05:00
|
|
|
deployType = "draft"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-09 06:33:36 -05:00
|
|
|
ext {
|
2021-11-17 18:36:00 -06:00
|
|
|
work_manager = "2.7.1"
|
2021-05-17 08:19:39 -05:00
|
|
|
android_hilt = "1.0.0"
|
2021-12-20 17:36:59 -06:00
|
|
|
room = "2.4.0"
|
2021-08-02 08:26:33 -05:00
|
|
|
chucker = "3.5.2"
|
2021-11-17 18:40:59 -06:00
|
|
|
mockk = "1.12.1"
|
2021-12-25 02:38:27 -06:00
|
|
|
coroutines = "1.6.0"
|
2019-07-09 06:33:36 -05:00
|
|
|
}
|
|
|
|
|
2017-03-09 14:29:23 -06:00
|
|
|
dependencies {
|
2021-12-19 15:25:47 -06:00
|
|
|
implementation "io.github.wulkanowy:sdk:1.4.4"
|
2020-07-27 04:44:30 -05:00
|
|
|
|
2021-02-26 12:50:58 -06:00
|
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
2018-10-14 15:16:58 -05:00
|
|
|
|
2021-12-24 23:54:17 -06:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2"
|
2021-10-04 10:13:31 -05:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines"
|
2020-06-20 08:07:57 -05:00
|
|
|
|
2021-11-11 08:33:01 -06:00
|
|
|
implementation "androidx.core:core-ktx:1.7.0"
|
2021-11-11 08:23:20 -06:00
|
|
|
implementation 'androidx.core:core-splashscreen:1.0.0-alpha02'
|
2021-11-12 21:15:14 -06:00
|
|
|
implementation "androidx.activity:activity-ktx:1.4.0"
|
2021-11-17 19:02:12 -06:00
|
|
|
implementation "androidx.appcompat:appcompat:1.4.0"
|
2021-11-17 18:36:18 -06:00
|
|
|
implementation "androidx.fragment:fragment-ktx:1.4.0"
|
2021-11-11 08:32:19 -06:00
|
|
|
implementation "androidx.annotation:annotation:1.3.0"
|
2019-06-07 07:12:52 -05:00
|
|
|
|
2020-04-17 15:35:24 -05:00
|
|
|
implementation "androidx.preference:preference-ktx:1.1.1"
|
2021-06-08 05:02:09 -05:00
|
|
|
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
2021-11-24 02:53:16 -06:00
|
|
|
implementation "androidx.viewpager2:viewpager2:1.1.0-beta01"
|
2020-07-02 05:15:34 -05:00
|
|
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
2021-11-17 18:37:26 -06:00
|
|
|
implementation "androidx.constraintlayout:constraintlayout:2.1.2"
|
2019-12-07 06:51:09 -06:00
|
|
|
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
|
2021-07-12 14:44:04 -05:00
|
|
|
implementation "com.google.android.material:material:1.4.0"
|
2021-09-08 02:13:52 -05:00
|
|
|
implementation "com.github.wulkanowy:material-chips-input:2.3.1"
|
2019-06-07 07:12:52 -05:00
|
|
|
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0"
|
2021-05-28 03:57:25 -05:00
|
|
|
implementation 'com.github.lopspower:CircularImageView:4.2.0'
|
2018-08-25 17:18:31 -05:00
|
|
|
|
2019-09-01 06:24:21 -05:00
|
|
|
implementation "androidx.work:work-runtime-ktx:$work_manager"
|
2021-01-11 02:52:44 -06:00
|
|
|
playImplementation "androidx.work:work-gcm:$work_manager"
|
2019-03-24 10:03:51 -05:00
|
|
|
|
2021-11-12 20:25:38 -06:00
|
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.0"
|
2020-04-05 09:46:49 -05:00
|
|
|
|
2019-07-09 06:33:36 -05:00
|
|
|
implementation "androidx.room:room-runtime:$room"
|
2019-09-01 06:24:21 -05:00
|
|
|
implementation "androidx.room:room-ktx:$room"
|
2019-07-09 06:33:36 -05:00
|
|
|
kapt "androidx.room:room-compiler:$room"
|
2019-03-09 03:13:36 -06:00
|
|
|
|
2020-08-02 11:29:41 -05:00
|
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
|
|
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
|
2021-05-17 08:19:39 -05:00
|
|
|
kapt "androidx.hilt:hilt-compiler:$android_hilt"
|
|
|
|
implementation "androidx.hilt:hilt-work:$android_hilt"
|
2018-08-25 17:18:31 -05:00
|
|
|
|
2021-05-28 03:57:25 -05:00
|
|
|
implementation 'com.github.ncapdevi:FragNav:3.3.0'
|
2021-01-31 15:38:30 -06:00
|
|
|
implementation "com.github.YarikSOffice:lingver:1.3.0"
|
2018-06-06 12:38:54 -05:00
|
|
|
|
2021-10-13 16:58:24 -05:00
|
|
|
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
|
|
|
implementation "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0"
|
2021-11-22 19:55:10 -06:00
|
|
|
implementation "com.squareup.okhttp3:logging-interceptor:4.9.3"
|
2021-10-13 16:58:24 -05:00
|
|
|
|
2021-08-17 08:44:06 -05:00
|
|
|
implementation "com.jakewharton.timber:timber:5.0.1"
|
2018-08-25 17:18:31 -05:00
|
|
|
implementation "at.favre.lib:slf4j-timber:1.0.1"
|
2021-10-11 10:44:03 -05:00
|
|
|
implementation 'com.github.bastienpaulfr:Treessence:1.0.5'
|
2020-03-29 11:55:00 -05:00
|
|
|
implementation "com.mikepenz:aboutlibraries-core:$about_libraries"
|
2021-11-11 08:32:04 -06:00
|
|
|
implementation "io.coil-kt:coil:1.4.0"
|
2020-05-20 17:59:05 -05:00
|
|
|
implementation "io.github.wulkanowy:AppKillerManager:3.0.0"
|
2020-06-14 07:05:24 -05:00
|
|
|
implementation 'me.xdrop:fuzzywuzzy:1.3.1'
|
2021-11-17 18:40:38 -06:00
|
|
|
implementation 'com.fredporciuncula:flow-preferences:1.6.0'
|
2018-12-13 17:20:54 -06:00
|
|
|
|
2021-12-20 14:22:56 -06:00
|
|
|
playImplementation platform('com.google.firebase:firebase-bom:29.0.3')
|
2021-01-03 17:21:25 -06:00
|
|
|
playImplementation 'com.google.firebase:firebase-analytics-ktx'
|
|
|
|
playImplementation 'com.google.firebase:firebase-messaging:'
|
|
|
|
playImplementation 'com.google.firebase:firebase-crashlytics:'
|
2021-09-27 10:51:06 -05:00
|
|
|
playImplementation 'com.google.android.play:core:1.10.2'
|
2020-10-14 18:00:41 -05:00
|
|
|
playImplementation 'com.google.android.play:core-ktx:1.8.1'
|
2021-11-22 20:02:03 -06:00
|
|
|
playImplementation 'com.google.android.gms:play-services-ads:20.5.0'
|
2018-01-11 14:57:41 -06:00
|
|
|
|
2021-11-25 16:46:30 -06:00
|
|
|
hmsImplementation 'com.huawei.hms:hianalytics:6.3.2.300'
|
2021-12-24 23:54:34 -06:00
|
|
|
hmsImplementation 'com.huawei.agconnect:agconnect-crash:1.6.3.200'
|
2020-10-29 07:58:56 -05:00
|
|
|
|
2020-03-28 05:44:09 -05:00
|
|
|
releaseImplementation "com.github.ChuckerTeam.Chucker:library-no-op:$chucker"
|
2019-01-10 10:10:10 -06:00
|
|
|
|
2020-03-28 05:44:09 -05:00
|
|
|
debugImplementation "com.github.ChuckerTeam.Chucker:library:$chucker"
|
2021-10-13 16:58:24 -05:00
|
|
|
debugImplementation 'com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:1.0.6'
|
2017-09-23 15:17:13 -05:00
|
|
|
|
2021-02-14 06:14:28 -06:00
|
|
|
testImplementation "junit:junit:4.13.2"
|
2019-07-09 06:33:36 -05:00
|
|
|
testImplementation "io.mockk:mockk:$mockk"
|
2021-10-04 10:13:31 -05:00
|
|
|
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines"
|
2021-01-29 14:53:46 -06:00
|
|
|
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
2017-11-18 15:17:18 -06:00
|
|
|
|
2021-12-08 04:04:10 -06:00
|
|
|
testImplementation 'org.robolectric:robolectric:4.7.3'
|
2021-07-12 14:45:36 -05:00
|
|
|
testImplementation "androidx.test:runner:1.4.0"
|
2021-07-12 14:52:25 -05:00
|
|
|
testImplementation "androidx.test.ext:junit:1.1.3"
|
2021-07-12 14:39:02 -05:00
|
|
|
testImplementation "androidx.test:core:1.4.0"
|
2021-03-06 08:34:07 -06:00
|
|
|
testImplementation "androidx.room:room-testing:$room"
|
|
|
|
testImplementation "com.google.dagger:hilt-android-testing:$hilt_version"
|
|
|
|
kaptTest "com.google.dagger:hilt-android-compiler:$hilt_version"
|
|
|
|
|
2021-07-30 11:49:19 -05:00
|
|
|
androidTestImplementation "androidx.test:core:1.4.0"
|
|
|
|
androidTestImplementation "androidx.test:runner:1.4.0"
|
|
|
|
androidTestImplementation "androidx.test.ext:junit:1.1.3"
|
2019-07-09 06:33:36 -05:00
|
|
|
androidTestImplementation "io.mockk:mockk-android:$mockk"
|
2018-07-18 14:13:57 -05:00
|
|
|
androidTestImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
2017-03-09 14:29:23 -06:00
|
|
|
}
|