diff --git a/maestro-utils/build.gradle b/maestro-utils/build.gradle deleted file mode 100644 index 590d31cae5..0000000000 --- a/maestro-utils/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'maven-publish' - id "kotlin" - id "idea" - id "com.vanniktech.maven.publish" -} - -dependencies { - api(libs.square.okio) - - testImplementation(libs.junit.jupiter.api) - testRuntimeOnly(libs.junit.jupiter.engine) - testImplementation(libs.google.truth) -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -plugins.withId("com.vanniktech.maven.publish") { - mavenPublish { - sonatypeHost = "S01" - } -} - -test { - useJUnitPlatform() -} diff --git a/maestro-utils/build.gradle.kts b/maestro-utils/build.gradle.kts new file mode 100644 index 0000000000..98cf82ba65 --- /dev/null +++ b/maestro-utils/build.gradle.kts @@ -0,0 +1,41 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import com.vanniktech.maven.publish.SonatypeHost + +@Suppress("DSL_SCOPE_VIOLATION") +plugins { + alias(libs.plugins.kotlin.jvm) + `maven-publish` + alias(libs.plugins.vanniktech.publish) +} + +dependencies { + api(libs.square.okio) + + testImplementation(libs.junit.jupiter.api) + testRuntimeOnly(libs.junit.jupiter.engine) + testImplementation(libs.google.truth) +} + +// From https://jakewharton.com/kotlins-jdk-release-compatibility-flag + +val javaVersion = JavaVersion.VERSION_1_8 +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion +} + +tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_1_8) + freeCompilerArgs.add("-Xjdk-release=$javaVersion") + } +} + +mavenPublishing { + publishToMavenCentral(SonatypeHost.S01) +} + +tasks.named("test") { + useJUnitPlatform() +}