Minimum Android API 21
Compiled Android API 29
- Add JitPack to your project build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add the dependency in the application build.gradle
dependencies {
implementation 'com.github.CraZyLegenD:Set-Of-Useful-Kotlin-Extensions-and-Helpers:version'
}
- To not run into any issues in your application build.gradle add
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
kotlinOptions {
jvmTarget = "1.8"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
}
viewBinding {
enabled = true
}
androidExtensions {
experimental = true
}
- Additionally you can include
kapt {
correctErrorTypes = true
useBuildCache = true
}
buildTypes {
debug {
// useful if you're using crashlytics
ext.enableCrashlytics = false
ext.alwaysUpdateBuildId = false
firebaseCrashlytics {
mappingFileUploadEnabled false
}
FirebasePerformance {
instrumentationEnabled false
}
manifestPlaceholders = [crashlytics: "false"]
// end of crashlytics region
crunchPngs false
}
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
- Inside gradle.properties
kapt.incremental.apt=true
org.gradle.parallel=true
org.gradle.caching=true
Informational
- Proguard configs
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-keep class com.google.firebase.crashlytics.** { *; }
-dontwarn com.google.firebase.crashlytics.**
-dontwarn org.jetbrains.annotations.**
-dontwarn okhttp3.**
-dontwarn retrofit2.Platform$Java8
-dontwarn okio.**
-dontwarn javax.annotation.**
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
-keepclasseswithmembers class * {
@com.squareup.moshi.* <methods>;
}
-keep @com.squareup.moshi.JsonQualifier interface *
-dontwarn org.jetbrains.annotations.**
-keep class kotlin.Metadata { *; }
-keepclassmembers class kotlin.Metadata {
public <methods>;
}
-keepclassmembers class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator CREATOR;
}
-keepclassmembers class * {
@com.squareup.moshi.FromJson <methods>;
@com.squareup.moshi.ToJson <methods>;
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.