-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
52 lines (41 loc) · 1.38 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
46
47
48
49
50
51
52
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.api.JavaVersion
plugins {
kotlin("jvm") version "1.5.31"
id("org.beryx.jar") version "2.0.0-rc-4"
}
repositories {
mavenCentral()
}
val jvmVersion = "${findProperty("javaCompatibility") ?: "11"}".toInt()
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "${JavaVersion.toVersion(jvmVersion)}"
}
group = "org.beryx.jar.example"
val version: String by project
val compileKotlin: KotlinCompile by tasks
val compileJava: JavaCompile by tasks
compileJava.destinationDirectory.set(compileKotlin.destinationDirectory)
val test by tasks.getting(Test::class) {
useJUnitPlatform { }
}
dependencies {
implementation(kotlin("reflect"))
implementation(kotlin("stdlib"))
implementation("org.beryx:streamplify:1.1.1")
testImplementation(platform("org.junit:junit-bom:5.8.1"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("org.junit.jupiter:junit-jupiter-engine")
}
tasks.withType<Jar> {
manifest {
attributes(mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version
))
}
}
moduleConfig.version.set("$version")
moduleConfig.neverCompileModuleInfo.set(true)
compileJava.options.release.set (jvmVersion)