Skip to content

Commit

Permalink
convert to KTS
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Aug 2, 2024
1 parent 7ce7983 commit 3c58392
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 29 deletions.
29 changes: 0 additions & 29 deletions maestro-utils/build.gradle

This file was deleted.

41 changes: 41 additions & 0 deletions maestro-utils/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs.add("-Xjdk-release=$javaVersion")
}
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
}

tasks.named<Test>("test") {
useJUnitPlatform()
}

0 comments on commit 3c58392

Please sign in to comment.