generated from Nlkomaru/PluginTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
91 lines (77 loc) · 2.22 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
java
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.dokka)
}
val projectVersion: String by project
group = "party.morino"
version = projectVersion
buildscript {
repositories {
mavenCentral()
}
}
allprojects {
apply(plugin = "java")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "org.jetbrains.kotlin.jvm")
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://jitpack.io")
maven("https://plugins.gradle.org/m2/")
maven("https://repo.incendo.org/content/repositories/snapshots")
maven("https://repo.codemc.io/repository/maven-public/")
maven("https://repo.codemc.io/repository/maven-public/")
}
dependencies {
compileOnly(kotlin("stdlib"))
compileOnly("org.jetbrains:annotations:24.1.0")
}
kotlin {
jvmToolchain {
(this).languageVersion.set(JavaLanguageVersion.of(21))
}
jvmToolchain(21)
}
tasks.register("hello") {
doLast {
println("I'm ${this.project.name}")
}
}
tasks {
test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
events("passed", "skipped", "failed")
exceptionFormat = TestExceptionFormat.FULL
}
}
compileKotlin {
compilerOptions.jvmTarget.set(JvmTarget.JVM_21)
compilerOptions.javaParameters = true
compilerOptions.languageVersion.set(KotlinVersion.KOTLIN_2_0)
}
compileTestKotlin {
compilerOptions.jvmTarget.set(JvmTarget.JVM_21)
}
withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
}
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
repositories {
mavenCentral()
}
kotlin {
jvmToolchain(21)
}