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.
This commit is contained in:
Marco Romano
2023-10-19 11:00:32 +02:00
committed by GitHub
parent 643fe1a5e5
commit fb02f698d7
8 changed files with 12 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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