-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
76 lines (63 loc) · 1.68 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("java")
kotlin("jvm") version "2.1.10"
`maven-publish`
id("com.gradleup.shadow") version "8.3.6"
id("com.xpdustry.kotlin-shadow-relocator") version "2.0.0"
}
repositories {
mavenCentral()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.test {
useJUnitPlatform()
}
allprojects {
group = "io.github.rothes.esu"
project.version = rootProject.property("versionName").toString()
}
subprojects {
apply(plugin = "java")
apply(plugin = "kotlin")
apply(plugin = "maven-publish")
apply(plugin = "com.gradleup.shadow")
apply(plugin = "com.xpdustry.kotlin-shadow-relocator")
val javaVer = JavaVersion.VERSION_17
java {
disableAutoTargetJvm()
sourceCompatibility = javaVer
targetCompatibility = javaVer
withSourcesJar()
withJavadocJar()
}
tasks.compileJava {
options.encoding = "UTF-8"
sourceCompatibility = javaVer.toString()
targetCompatibility = javaVer.toString()
}
kotlin {
compilerOptions {
jvmTarget.value(JvmTarget.fromTarget(javaVer.toString()))
}
}
tasks.javadoc {
options.encoding = "UTF-8"
}
publishing {
repositories {
mavenLocal()
}
publications {
create<MavenPublication>("mavenJar") {
from(components["java"])
artifactId = project.name
groupId = project.group as String?
version = project.version as String?
}
}
}
}