Mike
10/24/2021, 4:09 AMdmitriy.novozhilov
10/24/2021, 7:39 AMuseIr = true
(or false
) from your build scriptsMike
10/24/2021, 7:39 AMMike
10/24/2021, 7:40 AMdmitriy.novozhilov
10/24/2021, 7:40 AMbuild.gradle.kts
?Mike
10/24/2021, 7:45 AMplugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.google.gms.google-services' // Must be before com.google.firebase.crashlytics
id 'com.google.firebase.crashlytics'
id 'dagger.hilt.android.plugin'
}
configurations {
all {
// Bug: xpp3 gradle build error
// <https://stackoverflow.com/questions/48488563/gradle-xpp3-error>
exclude group: 'xpp3', module: 'xpp3'
// Bug: Duplicate class
// <https://stackoverflow.com/questions/54717283/program-type-already-present-com-google-common-util-concurrent-listenablefuture>
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude module: 'commons-logging'
exclude module: 'httpclient'
}
}
android {
compileSdkVersion androidCompileSdkVersion
bundle {
density { enableSplit false }
abi { enableSplit true }
language { enableSplit false }
}
defaultConfig {
applicationId androidApplicationId
minSdkVersion androidMinimumSdkVersion
targetSdkVersion androidTargetSdkVersion
versionCode androidMobileVersionCode as Integer
versionName androidMobileVersionName
vectorDrawables { useSupportLibrary true }
javaCompileOptions {
annotationProcessorOptions {
arguments += [
"room.incremental":"true"
]
}
}
}
compileOptions {
sourceCompatibility rootProject.sourceCompatibility
targetCompatibility rootProject.sourceCompatibility
}
kotlinOptions {
jvmTarget = rootProject.sourceCompatibility
}
buildFeatures {
viewBinding true
compose true
}
composeOptions {
kotlinCompilerExtensionVersion composeVersion
kotlinCompilerVersion kotlinVersion
}
// BUG: Expected @HiltAndroidApp to have a value
// <https://stackoverflow.com/questions/62887817/expected-hiltandroidapp-to-have-a-value-did-you-forget-to-apply-the-gradle-plu>
kapt {
javacOptions {
// These options are normally set automatically via the Hilt Gradle plugin, but we
// set them manually to workaround a bug in the Kotlin 1.5.20
option("-Adagger.fastInit=ENABLED")
option("-Adagger.hilt.android.internal.disableAndroidSuperclassValidation=true")
}
}
}
dependencies {
implementation project(':kotlinShared')
kapt "androidx.room:room-compiler:$roomVersion"
// AndroidX
// <https://developer.android.com/jetpack/androidx/versions>
implementation "androidx.annotation:annotation:1.2.0"
implementation "androidx.appcompat:appcompat:1.3.1"
implementation 'androidx.biometric:biometric:1.1.0'
implementation "androidx.browser:browser:1.3.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "androidx.core:core-ktx:1.6.0"
implementation "androidx.activity:activity-ktx:1.3.1"
implementation "androidx.fragment:fragment-ktx:1.3.6"
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"
implementation "androidx.lifecycle:lifecycle-process:2.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"
implementation "androidx.preference:preference-ktx:1.1.1"
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.room:room-ktx:$roomVersion"
implementation "androidx.room:room-runtime:$roomVersion"
implementation "androidx.work:work-runtime-ktx:2.5.0"
implementation "androidx.work:work-rxjava3:2.5.0"
// Compose
implementation "androidx.activity:activity-compose:1.3.1"
implementation "androidx.compose.material:material:$composeVersion"
implementation "androidx.compose.ui:ui:$composeVersion"
implementation "androidx.compose.ui:ui-tooling:$composeVersion"
implementation "androidx.compose.ui:ui-tooling-preview:$composeVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
// Google APIs for Android
// <https://developers.google.com/android/guides/releases>
implementation 'com.google.android.gms:play-services-auth:19.2.0'
api('com.google.apis:google-api-services-drive:v3-rev20200719-1.30.10') {
exclude group: 'org.apache.httpcomponents'
}
// Admob
// <https://developers.google.com/admob/android/rel-notes>
implementation 'com.google.android.gms:play-services-ads:20.4.0'
// UMP
// <https://developers.google.com/admob/ump/android/quick-start>
implementation 'com.google.android.ump:user-messaging-platform:2.0.0'
// Firebase
// <https://firebase.google.com/support/release-notes/android>
// TODO: Use Firebase Android BoM
//implementation platform('com.google.firebase:firebase-bom:27.0.0')
implementation 'com.google.firebase:firebase-analytics-ktx:19.0.2'
// TODO: Memory leak: <https://github.com/firebase/firebase-android-sdk/issues/2387>
implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
implementation 'com.google.firebase:firebase-config-ktx:21.0.1'
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.3'
implementation 'com.google.firebase:firebase-firestore-ktx:23.0.4'
implementation "com.google.firebase:firebase-messaging-ktx:22.0.0"
// Using 1.32.2 due to AssertionError getAlpnSelectedProtocol
// <https://github.com/firebase/firebase-android-sdk/issues/2642>
implementation "io.grpc:grpc-okhttp:1.32.2"
// Infra
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion"
// <https://github.com/JakeWharton/RxRelay/releases>
implementation "com.jakewharton.rxrelay3:rxrelay:$rxAndroidVersion"
implementation "com.squareup.sqldelight:android-driver:$sqldelightVersion"
implementation "com.squareup.sqldelight:android-paging-extensions:$sqldelightVersion"
implementation "io.reactivex.rxjava3:rxandroid:$rxAndroidVersion"
implementation "javax.annotation:javax.annotation-api:1.3.2"
// UI
implementation 'com.afollestad:sectioned-recyclerview:0.4.4'
// <https://github.com/firebase/FirebaseUI-Android/releases>
implementation 'com.firebaseui:firebase-ui-auth:7.1.1'
implementation "com.mikepenz:fastadapter:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-expandable:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-binding:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-diff:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-drag:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-paged:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-scroll:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-swipe:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-ui:$fastAdapterVersion"
implementation "com.mikepenz:fastadapter-extensions-utils:$fastAdapterVersion"
// <https://github.com/square/picasso/releases>
implementation 'com.squareup.picasso:picasso:2.8'
// <https://github.com/grantland/android-autofittextview/releases/tag/0.2.1>
implementation 'me.grantland:autofittextview:0.2.1'
// <https://github.com/material-components/material-components-android/releases>
implementation "com.google.android.material:material:1.4.0"
// Dependency injection
implementation("com.google.dagger:hilt-android:$hiltVersion")
kapt("com.google.dagger:hilt-android-compiler:$hiltVersion")
}
Mike
10/24/2021, 7:47 AMext {
// Market share:
// <https://developer.android.com/about/dashboards>
// <https://source.android.com/setup/start/build-numbers>
androidMinimumSdkVersion = 21
// 31 is not compatible with androidx.work:work-rxjava3:2.5.0 - use 2.6.0+
androidTargetSdkVersion = 30
androidCompileSdkVersion = 30
sourceCompatibility = JavaVersion.VERSION_11
minifyEnabled = true
versionCode = 1
versionName = "1"
documentationFolder = "${rootDir}/outputJavadoc/"
availableProcessors = Runtime.runtime.availableProcessors()
}
buildscript {
// Check for new updates:
// Analyze > "Run Inspection By Name" > "Newer Library Versions Available"
ext.annotationVersion = '1.2.0'
ext.hiltVersion = '2.38.1'
// <https://github.com/mikepenz/FastAdapter/releases>
ext.fastAdapterVersion = '5.4.1'
// <https://github.com/JetBrains/kotlin/releases>
// <https://kotlinlang.org/docs/releases.html#release-details>
ext.kotlinVersion = '1.6.0-RC'
// <https://developer.android.google.cn/jetpack/androidx/releases/compose>
ext.composeVersion = '1.0.4'
ext.retrofitVersion = '2.9.0'
ext.roomVersion = '2.2.6'
// <https://github.com/ReactiveX/RxAndroid/releases>
ext.rxAndroidVersion = '3.0.0'
ext.sqldelightVersion = '1.5.1'
// <https://github.com/square/leakcanary>
ext.leakCanaryVersion = '2.7'
ext.androidXTestRunnerVersion = '1.4.0'
ext.espressoVersion = '3.4.0'
ext.hamcrest = '2.2'
ext.junitVersion = '4.13.2'
ext.mockito = '3.9.0'
ext.mockitoKotlin = '2.2.0'
ext.powerMockVersion = '2.0.9'
ext.roboElectric = '4.3.1'
repositories {
mavenCentral()
maven { url '<https://oss.sonatype.org/content/repositories/snapshots/>' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
// <https://firebase.google.com/support/release-notes/android>
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath "com.google.gms:google-services:4.3.10"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hiltVersion"
}
}
dmitriy.novozhilov
10/24/2021, 7:48 AMMike
10/24/2021, 7:50 AMMike
10/24/2021, 7:50 AMMike
10/24/2021, 7:51 AMdmitriy.novozhilov
10/24/2021, 7:57 AMMike
10/24/2021, 7:59 AMsaket
11/06/2021, 6:35 AM