Skip to content

Commit 10719e6

Browse files
authored
chore(all): Fix building in Android Studio Ladybug (#204)
1 parent bb75503 commit 10719e6

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

build-logic/plugins/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ ktlint {
2727
android.set(true)
2828
}
2929

30+
kotlin {
31+
jvmToolchain(17)
32+
}
33+
3034
dependencies {
3135
compileOnly(libs.plugin.android.gradle)
3236
compileOnly(libs.plugin.binary.compatibility)

build-logic/plugins/src/main/kotlin/AndroidLibraryConventionPlugin.kt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import org.gradle.kotlin.dsl.configure
2323
import org.gradle.kotlin.dsl.extra
2424
import org.gradle.kotlin.dsl.provideDelegate
2525
import org.gradle.kotlin.dsl.withType
26+
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
2627
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2728

2829
/**
@@ -57,10 +58,8 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
5758
maxHeapSize = "4g"
5859
}
5960

60-
tasks.withType<KotlinCompile>().configureEach {
61-
kotlinOptions {
62-
jvmTarget = JavaVersion.VERSION_11.toString()
63-
}
61+
configure<KotlinProjectExtension> {
62+
jvmToolchain(17)
6463
}
6564
}
6665
}
@@ -105,16 +104,11 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
105104
disable += listOf("GradleDependency", "NewerVersionAvailable", "AndroidGradlePluginVersion")
106105
}
107106

108-
compileOptions {
109-
sourceCompatibility = JavaVersion.VERSION_11
110-
targetCompatibility = JavaVersion.VERSION_11
111-
}
112-
113107
// Needed when running integration tests. The oauth2 library uses relies on two
114108
// dependencies (Apache's httpcore and httpclient), both of which include
115109
// META-INF/DEPENDENCIES. Tried a couple other options to no avail.
116110
packaging {
117-
resources.excludes.add("META-INF/DEPENDENCIES")
111+
resources.excludes += setOf("META-INF/DEPENDENCIES", "META-INF/LICENSE*")
118112
}
119113

120114
buildFeatures {

0 commit comments

Comments
 (0)