wulkanowy-mod/app/build.gradle

267 lines
9.3 KiB
Groovy
Raw Normal View History

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