Skip to content

Commit

Permalink
chore: Fix building in Android Studio Ladybug (#2961)
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Roach <[email protected]>
  • Loading branch information
mattcreaser and tylerjroach authored Dec 18, 2024
1 parent efa5e69 commit 5082c00
Show file tree
Hide file tree
Showing 19 changed files with 9 additions and 77 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ __pycache__/
**/credentials.json
**/google_client_creds.json
**/amplifyconfiguration*.json
**/amplify_outputs.json
**/amplify_outputs*.json

# IDE files
.idea/**
Expand All @@ -103,7 +103,6 @@ dist/
node_modules/
aws-exports.js
awsconfiguration.json
amplifyconfiguration.json

test-results/
build-artifacts/
Expand Down
4 changes: 0 additions & 4 deletions apollo/apollo-appsync-amplify/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,3 @@ dependencies {
androidTestImplementation(libs.test.kotlin.coroutines)
androidTestImplementation(libs.test.turbine)
}

android.kotlinOptions {
jvmTarget = "11"
}
4 changes: 0 additions & 4 deletions aws-analytics-pinpoint/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,3 @@ dependencies {
androidTestImplementation(libs.test.androidx.junit)
androidTestImplementation(project(":aws-analytics-pinpoint"))
}

android.kotlinOptions {
jvmTarget = "11"
}
4 changes: 0 additions & 4 deletions aws-api-appsync/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,3 @@ dependencies {
testImplementation(project(":testmodels"))
testImplementation(project(":testutils"))
}

android.kotlinOptions {
jvmTarget = "11"
}
4 changes: 0 additions & 4 deletions aws-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,3 @@ dependencies {

androidTestUtil(libs.test.androidx.orchestrator)
}

android.kotlinOptions {
jvmTarget = "11"
}
4 changes: 0 additions & 4 deletions aws-auth-cognito/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,3 @@ dependencies {
androidTestImplementation(project(":aws-api-appsync"))
androidTestImplementation(project(":testutils"))
}

android.kotlinOptions {
jvmTarget = "11"
}
3 changes: 0 additions & 3 deletions aws-auth-plugins-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ group = properties["POM_GROUP"].toString()

android {
namespace = "com.amplifyframework.plugins.core"
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}

dependencies {
Expand Down
4 changes: 0 additions & 4 deletions aws-datastore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,3 @@ dependencies {
androidTestImplementation(libs.okhttp)
androidTestImplementation(libs.oauth2)
}

afterEvaluate {
android.kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
}
4 changes: 0 additions & 4 deletions aws-geo-location/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,3 @@ dependencies {
androidTestImplementation(libs.test.androidx.runner)
androidTestImplementation(libs.test.androidx.junit)
}

afterEvaluate {
android.kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
}
4 changes: 0 additions & 4 deletions aws-logging-cloudwatch/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,3 @@ dependencies {
androidTestImplementation(project(":aws-logging-cloudwatch"))
androidTestImplementation(project(":testutils"))
}

android.kotlinOptions {
jvmTarget = "11"
}
4 changes: 0 additions & 4 deletions aws-pinpoint-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,3 @@ dependencies {
androidTestImplementation(libs.test.androidx.runner)
androidTestImplementation(libs.test.androidx.junit)
}

android.kotlinOptions {
jvmTarget = "11"
}
4 changes: 0 additions & 4 deletions aws-predictions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,3 @@ dependencies {
androidTestImplementation(libs.test.mockk.android)
androidTestImplementation(libs.rxjava)
}

android.kotlinOptions {
jvmTarget = "11"
}
3 changes: 0 additions & 3 deletions aws-push-notifications-pinpoint-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ group = properties["POM_GROUP"].toString()

android {
namespace = "com.amplifyframework.pushnotifications.pinpoint.common"
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}

dependencies {
Expand Down
4 changes: 0 additions & 4 deletions aws-storage-s3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,3 @@ dependencies {

androidTestUtil(libs.test.androidx.orchestrator)
}

android.kotlinOptions {
jvmTarget = "11"
}
17 changes: 8 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import app.cash.licensee.LicenseeExtension
import com.android.build.gradle.LibraryExtension
import kotlinx.validation.ApiValidationExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
Expand Down Expand Up @@ -47,7 +48,7 @@ allprojects {
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.apply {
add("-Xlint:all")
add("-Werror")
//add("-Werror")
}
}
tasks.withType<Test>().configureEach {
Expand Down Expand Up @@ -110,6 +111,12 @@ subprojects {
}
}
}

pluginManager.withPlugin("kotlin-android") {
configure<KotlinProjectExtension> {
jvmToolchain(17)
}
}
}

@Suppress("ExpiredTargetSdkVersion")
Expand Down Expand Up @@ -158,14 +165,6 @@ fun Project.configureAndroid() {

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

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}

// Needed when running integration tests. The oauth2 library uses relies on two
Expand Down
5 changes: 0 additions & 5 deletions core-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,3 @@ dependencies {
testImplementation(project(":testmodels"))
testImplementation(libs.test.kotest.assertions)
}

android.kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn"
}
4 changes: 0 additions & 4 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ dependencies {
androidTestImplementation(libs.test.androidx.fragment)
}

android.kotlinOptions {
jvmTarget = "11"
}

afterEvaluate {
// Disables this warning:
// warning: listOf(classfile) MethodParameters attribute
Expand Down
3 changes: 0 additions & 3 deletions maplibre-adapter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ group = properties["POM_GROUP"].toString()

android {
namespace = "com.amplifyframework.geo.maplibre"
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
lint {
disable += "GradleDependency"
}
Expand Down
4 changes: 0 additions & 4 deletions rxbindings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,3 @@ dependencies {
testImplementation(libs.test.robolectric)
testImplementation(project(":rxbindings"))
}

android.kotlinOptions {
jvmTarget = "11"
}

0 comments on commit 5082c00

Please sign in to comment.