Skip to content

Commit

Permalink
try to fix NoSuchMethodError
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Jul 30, 2024
1 parent 32f23ed commit 1db1e29
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions maestro-utils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id 'maven-publish'
id "kotlin"
Expand All @@ -13,9 +16,19 @@ dependencies {
testImplementation(libs.google.truth)
}

// From https://jakewharton.com/kotlins-jdk-release-compatibility-flag

def javaVersion = JavaVersion.VERSION_1_8
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = javaVersion.toString()
targetCompatibility = javaVersion.toString()
}

tasks.withType(KotlinCompile).configureEach {
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
freeCompilerArgs.add("-Xjdk-release=$javaVersion")
}
}

plugins.withId("com.vanniktech.maven.publish") {
Expand Down

0 comments on commit 1db1e29

Please sign in to comment.