Description
Hello added dependencies to project AndroidX
and get a
Duplicate class org.antlr.runtime.ANTLRFileStream found in modules jetified-antlr-runtime-3.5.2.jar (org.antlr:antlr-runtime:3.5.2) and jetified-antlr4-4.5.3.jar (org.antlr:antlr4:4.5.3)
......
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.1'
classpath 'com.github.gfx.ribbonizer:ribbonizer-plugin:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
.....
`apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.github.gfx.ribbonizer'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "Myproject"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
firebaseCrashlytics {
nativeSymbolUploadEnabled true
strippedNativeLibsDir ' path/to/stripped/parent/dir'
unstrippedNativeLibsDir 'path/to/unstripped/parent/dir'
}
}
debug {
debuggable true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
configurations {
ktlint
}
ribbonizer {
iconNames "@mipmap/ic_launcher", "@mipmap/ic_launcher_foreground", "@mipmap/ic_launcher_round"
builder { variant, iconFile ->
if (variant.buildType.name == "debug") {
def filter = customColorRibbonFilter(variant, iconFile, "#FF3700")
filter.label = variant.buildType.name.toUpperCase()
return filter
}
return null
}
forcedVariantsNames "release"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'org.jetbrains.anko:anko:0.10.8'
implementation 'com.jakewharton.timber:timber:4.7.1'
ktlint "com.pinterest:ktlint:0.36.0"
implementation 'com.google.firebase:firebase-analytics:17.5.0'
implementation 'com.google.firebase:firebase-crashlytics-ktx:17.2.1'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.jakewharton:butterknife:10.2.3'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "com.github.gfx.ribbonizer:ribbonizer-plugin:2.1.0"
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "src/**/*.kt"
}
check.dependsOn ktlint
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
main = "com.pinterest.ktlint.Main"
args "-F", "src/**/*.kt"
}
`