Skip to content

Commit

Permalink
[Build] Fix kotlin version alignment
Browse files Browse the repository at this point in the history
Due to library dependencies depending on different versions of kotlin-stdlib, lib/build.gradle needs to handle kotlin-stdlib version alignment to avoid duplicate class errors. Kotlin-BOM handles this version alignment for us.

PiperOrigin-RevId: 540574560
(cherry picked from commit 7671188)
  • Loading branch information
hunterstich committed Jun 15, 2023
1 parent 797d494 commit fc6f0a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 2 additions & 5 deletions catalog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ apply plugin: 'com.android.application'

dependencies {

constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
// Align kotlin versions
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))

api 'com.google.dagger:dagger:2.46.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.46.1'
Expand Down
3 changes: 3 additions & 0 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ dependencies {

annotationProcessor compatibility("resourceInspectionProcessor")

// Align kotlin versions
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))

implementation "com.google.errorprone:error_prone_annotations:${errorproneVersion}"

testImplementation "androidx.test:core:${testRunnerVersion}"
Expand Down

0 comments on commit fc6f0a2

Please sign in to comment.