-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ce7983
commit 3c58392
Showing
2 changed files
with
41 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} |