-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
62 lines (48 loc) · 1.56 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
53
54
55
56
57
58
59
60
61
62
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
}
group = "tech.poder"
version = "1.0"
repositories {
mavenCentral()
}
dependencies {
implementation(platform(kotlin("bom")))
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:atomicfu:0.18.3")
testImplementation("org.junit.platform:junit-platform-commons:1.9.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation(kotlin("test"))
}
tasks {
compileKotlin.get().destinationDirectory.set(compileJava.get().destinationDirectory.get())
compileTestKotlin.get().destinationDirectory.set(compileTestJava.get().destinationDirectory.get())
val javaVersion = JavaVersion.VERSION_17.toString()
withType<KotlinCompile> {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
kotlinOptions.jvmTarget = javaVersion
//kotlinOptions.freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
}
withType<JavaCompile> {
//modularity.inferModulePath.set(true)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
withType<Test> {
useJUnitPlatform()
jvmArgs("--add-modules=jdk.incubator.foreign", "--enable-native-access=PoderTech.overlay")
}
val sourcesJar by creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
jar {
dependsOn(sourcesJar)
}
artifacts {
archives(sourcesJar)
archives(jar)
}
}