Browse Source

Include desugaring lib also in library modules (#1604)

## Type of change

- [ ] Feature
- [ ] Bugfix
- [x] Technical
- [ ] Other :

## Content

Includes the `coreLibraryDesugaring(libs.android.desugar)` dependency in all modules which use one of our gradle plugins.

## Motivation and context

Right now desugaring is enabled also in library modules but the desugar dependency is not included in those.
This causes some unwanted side effects such as being unable to run compose previews in an emu.

This change will also include the desugar dependency in those libraries.
pull/1607/head
Marco Romano 11 months ago committed by GitHub
parent
commit
79d2941fe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      app/build.gradle.kts
  2. 2
      libraries/pushstore/impl/build.gradle.kts
  3. 2
      libraries/session-storage/impl/build.gradle.kts
  4. 1
      plugins/src/main/kotlin/extension/CommonExtension.kt
  5. 4
      plugins/src/main/kotlin/io.element.android-compose-application.gradle.kts
  6. 4
      plugins/src/main/kotlin/io.element.android-compose-library.gradle.kts
  7. 4
      plugins/src/main/kotlin/io.element.android-library.gradle.kts
  8. 1
      samples/minimal/build.gradle.kts

1
app/build.gradle.kts

@ -203,7 +203,6 @@ dependencies { @@ -203,7 +203,6 @@ dependencies {
implementation(projects.appnav)
anvil(projects.anvilcodegen)
coreLibraryDesugaring(libs.android.desugar)
implementation(libs.appyx.core)
implementation(libs.androidx.splash)
implementation(libs.androidx.core)

2
libraries/pushstore/impl/build.gradle.kts

@ -55,6 +55,4 @@ dependencies { @@ -55,6 +55,4 @@ dependencies {
androidTestImplementation(libs.test.truth)
androidTestImplementation(libs.test.runner)
androidTestImplementation(projects.libraries.sessionStorage.test)
coreLibraryDesugaring(libs.android.desugar)
}

2
libraries/session-storage/impl/build.gradle.kts

@ -45,8 +45,6 @@ dependencies { @@ -45,8 +45,6 @@ dependencies {
testImplementation(libs.test.turbine)
testImplementation(libs.coroutines.test)
testImplementation(libs.sqldelight.driver.jvm)
coreLibraryDesugaring(libs.android.desugar)
}
sqldelight {

1
plugins/src/main/kotlin/extension/CommonExtension.kt

@ -31,7 +31,6 @@ fun CommonExtension<*, *, *, *, *>.androidConfig(project: Project) { @@ -31,7 +31,6 @@ fun CommonExtension<*, *, *, *, *>.androidConfig(project: Project) {
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

4
plugins/src/main/kotlin/io.element.android-compose-application.gradle.kts

@ -32,9 +32,13 @@ plugins { @@ -32,9 +32,13 @@ plugins {
android {
androidConfig(project)
composeConfig(libs)
compileOptions {
isCoreLibraryDesugaringEnabled = true
}
}
dependencies {
commonDependencies(libs)
composeDependencies(libs)
coreLibraryDesugaring(libs.android.desugar)
}

4
plugins/src/main/kotlin/io.element.android-compose-library.gradle.kts

@ -32,9 +32,13 @@ plugins { @@ -32,9 +32,13 @@ plugins {
android {
androidConfig(project)
composeConfig(libs)
compileOptions {
isCoreLibraryDesugaringEnabled = true
}
}
dependencies {
commonDependencies(libs)
composeDependencies(libs)
coreLibraryDesugaring(libs.android.desugar)
}

4
plugins/src/main/kotlin/io.element.android-library.gradle.kts

@ -29,8 +29,12 @@ plugins { @@ -29,8 +29,12 @@ plugins {
android {
androidConfig(project)
compileOptions {
isCoreLibraryDesugaringEnabled = true
}
}
dependencies {
commonDependencies(libs)
coreLibraryDesugaring(libs.android.desugar)
}

1
samples/minimal/build.gradle.kts

@ -65,5 +65,4 @@ dependencies { @@ -65,5 +65,4 @@ dependencies {
implementation(projects.services.toolbox.impl)
implementation(projects.libraries.featureflag.impl)
implementation(libs.coroutines.core)
coreLibraryDesugaring(libs.android.desugar)
}

Loading…
Cancel
Save