-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
67 lines (55 loc) · 2.02 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
plugins {
kotlin("jvm") version "1.4.30-M1"
id("com.github.johnrengelman.shadow") version "6.1.0"
`maven-publish`
}
allprojects.forEach {
it.group = "io.github.openminigameserver.Replay"
it.version = "1.0-SNAPSHOT"
it.apply(plugin = "kotlin")
it.apply(plugin = "maven-publish")
it.apply(plugin = "com.github.johnrengelman.shadow")
it.repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://libraries.minecraft.net")
maven("https://repo.spongepowered.org/maven")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://kotlin.bintray.com/kotlinx/")
}
it.dependencies {
api(kotlin("stdlib"))
api("org.jetbrains.kotlinx:kotlinx-datetime:0.1.1")
api("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.4.2")
}
it.java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by it.tasks
compileKotlin.kotlinOptions {
jvmTarget = "11"
freeCompilerArgs =
freeCompilerArgs + "-Xjvm-default=enable" + "-Xopt-in=kotlin.RequiresOptIn" + "-Xopt-in=kotlin.time.ExperimentalTime" + "-Xopt-in=kotlin.contracts.ExperimentalContracts"
}
val compileTestKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by it.tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "11"
}
it.publishing {
publications {
create<MavenPublication>(it.project.name) {
groupId = it.project.group.toString()
artifactId = it.project.name
version = it.project.version.toString()
from(it.components["java"])
}
}
}
if (it.tasks.findByName("install") != null)
it.tasks.replace("install").dependsOn("publishToMavenLocal")
}
dependencies {
api(project(":impl-minestom"))
}