-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
45 lines (35 loc) · 1.31 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.31"
id("org.jmailen.kotlinter") version "3.6.0"
`java-library`
`maven-publish`
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
val githubRepo = project.property("github.repo") as String
tasks.withType<KotlinCompile> {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}
tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
dependencies {
// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
// Use the Kotlin JDK 8 standard library.
implementation(group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8")
// Use the Kotlin test library.
testImplementation(group = "org.jetbrains.kotlin", name = "kotlin-test")
// Use the Kotlin JUnit integration.
testImplementation(group = "org.jetbrains.kotlin", name = "kotlin-test-junit")
}
val sourcesJar by tasks.registering(Jar::class) {
from(sourceSets["main"].allSource)
archiveClassifier.set("sources")
}