-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle.kts
74 lines (63 loc) · 1.93 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
import org.gradle.api.JavaVersion.VERSION_1_8
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version Kotlin.version
id("org.jetbrains.dokka") version Dokka.version
id("maven-publish")
}
group = "com.creeperface.nukkit.placeholderapi"
version = "1.4-SNAPSHOT"
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven("https://repo.opencollab.dev/maven-snapshots/")
maven("https://repo.opencollab.dev/maven-releases/")
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions.apply {
jvmTarget = "1.8"
freeCompilerArgs = listOf(
"-Xjvm-default=enable",
"-Xopt-in=kotlin.RequiresOptIn",
"-Xenable-builder-inference",
"-Xjvm-default=all-compatibility"
)
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
java {
sourceCompatibility = VERSION_1_8
targetCompatibility = VERSION_1_8
}
afterEvaluate {
publishing {
publications {
create<MavenPublication>("snapshot") {
from(components["kotlin"])
pom {
name.set("PlaceholderAPI")
description.set("Placeholder API for nukkit")
licenses {
license {
name.set("GNU GENERAL PUBLIC LICENSE v3.0")
url.set("https://www.gnu.org/licenses/gpl-3.0.en.html")
}
}
}
}
}
repositories {
mavenLocal()
}
}
}
dependencies {
compileOnly(kotlin("stdlib-jdk8", Kotlin.version))
compileOnly(kotlin("reflect", Kotlin.version))
compileOnly("cn.nukkit:nukkit:${Nukkit.version}")
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:${Dokka.version}")
testImplementation("junit:junit:${JUnit.version}")
testCompileOnly("cn.nukkit:nukkit:${Nukkit.version}")
}