Skip to content

Commit

Permalink
Fix building in Android Studio Ladybug
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcreaser committed Dec 2, 2024
1 parent bb75503 commit 8ba5c32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 4 additions & 0 deletions build-logic/plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ ktlint {
android.set(true)
}

kotlin {
jvmToolchain(17)
}

dependencies {
compileOnly(libs.plugin.android.gradle)
compileOnly(libs.plugin.binary.compatibility)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.extra
import org.gradle.kotlin.dsl.provideDelegate
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

/**
Expand Down Expand Up @@ -57,10 +58,8 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
maxHeapSize = "4g"
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
configure<KotlinProjectExtension> {
jvmToolchain(17)
}
}
}
Expand Down Expand Up @@ -105,16 +104,11 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
disable += listOf("GradleDependency", "NewerVersionAvailable", "AndroidGradlePluginVersion")
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

// Needed when running integration tests. The oauth2 library uses relies on two
// dependencies (Apache's httpcore and httpclient), both of which include
// META-INF/DEPENDENCIES. Tried a couple other options to no avail.
packaging {
resources.excludes.add("META-INF/DEPENDENCIES")
resources.excludes += setOf("META-INF/DEPENDENCIES", "META-INF/LICENSE*")
}

buildFeatures {
Expand Down

0 comments on commit 8ba5c32

Please sign in to comment.