2022-02-21 18:09:52 -05:00
|
|
|
import cloud.kubelet.foundation.gradle.FoundationProjectPlugin
|
|
|
|
import cloud.kubelet.foundation.gradle.isFoundationPlugin
|
2021-12-21 21:32:34 +00:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
2021-12-23 07:02:31 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
2021-12-21 21:32:34 +00:00
|
|
|
|
2021-12-19 02:05:59 +00:00
|
|
|
plugins {
|
2021-12-21 08:58:44 +00:00
|
|
|
java
|
2022-01-15 14:43:24 -05:00
|
|
|
id("cloud.kubelet.foundation.gradle")
|
2021-12-19 02:05:59 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 08:58:44 +00:00
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven {
|
2022-02-21 18:09:52 -05:00
|
|
|
name = "papermc"
|
2021-12-21 08:58:44 +00:00
|
|
|
url = uri("https://papermc.io/repo/repository/maven-public/")
|
|
|
|
}
|
2022-01-13 18:25:35 -05:00
|
|
|
|
2021-12-21 08:58:44 +00:00
|
|
|
maven {
|
|
|
|
name = "sonatype"
|
|
|
|
url = uri("https://oss.sonatype.org/content/groups/public/")
|
|
|
|
}
|
2021-12-19 02:05:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-22 06:55:47 +00:00
|
|
|
tasks.assemble {
|
|
|
|
dependsOn("updateManifests")
|
|
|
|
}
|
|
|
|
|
2022-02-21 18:09:52 -05:00
|
|
|
version = "0.2"
|
|
|
|
|
2021-12-21 08:58:44 +00:00
|
|
|
subprojects {
|
|
|
|
plugins.apply("org.jetbrains.kotlin.jvm")
|
2021-12-22 01:38:22 +00:00
|
|
|
plugins.apply("org.jetbrains.kotlin.plugin.serialization")
|
2021-12-21 08:58:44 +00:00
|
|
|
plugins.apply("com.github.johnrengelman.shadow")
|
2022-02-21 18:09:52 -05:00
|
|
|
plugins.apply(FoundationProjectPlugin::class)
|
2021-12-21 00:58:22 +00:00
|
|
|
|
2021-12-21 08:58:44 +00:00
|
|
|
group = "io.gorence"
|
2021-12-22 05:52:10 +00:00
|
|
|
|
2021-12-21 08:58:44 +00:00
|
|
|
dependencies {
|
|
|
|
// Kotlin dependencies
|
|
|
|
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
2021-12-19 02:05:59 +00:00
|
|
|
|
2022-01-29 06:01:50 +00:00
|
|
|
// Core libraries.
|
2021-12-23 22:44:02 +00:00
|
|
|
implementation("io.insert-koin:koin-core:3.1.4")
|
|
|
|
testImplementation("io.insert-koin:koin-test:3.1.4")
|
|
|
|
|
2021-12-22 01:38:22 +00:00
|
|
|
// Serialization
|
|
|
|
implementation("com.charleskorn.kaml:kaml:0.38.0")
|
2021-12-22 08:11:22 +00:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1")
|
2021-12-22 01:38:22 +00:00
|
|
|
|
2021-12-22 19:53:27 -05:00
|
|
|
// Persistence
|
|
|
|
implementation("org.jetbrains.xodus:xodus-openAPI:1.3.232")
|
|
|
|
implementation("org.jetbrains.xodus:xodus-entity-store:1.3.232")
|
|
|
|
|
2021-12-21 08:58:44 +00:00
|
|
|
// Paper API
|
2022-03-06 03:21:00 +00:00
|
|
|
compileOnly("io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT")
|
2021-12-21 08:58:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
val javaVersion = JavaVersion.toVersion(17)
|
|
|
|
sourceCompatibility = javaVersion
|
|
|
|
targetCompatibility = javaVersion
|
|
|
|
}
|
2021-12-19 02:05:59 +00:00
|
|
|
|
2021-12-23 07:02:31 +00:00
|
|
|
tasks.withType<KotlinCompile> {
|
|
|
|
kotlinOptions {
|
|
|
|
freeCompilerArgs =
|
|
|
|
freeCompilerArgs + "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-21 08:58:44 +00:00
|
|
|
tasks.processResources {
|
|
|
|
val props = mapOf("version" to version)
|
|
|
|
inputs.properties(props)
|
|
|
|
filteringCharset = "UTF-8"
|
|
|
|
filesMatching("plugin.yml") {
|
|
|
|
expand(props)
|
|
|
|
}
|
2021-12-19 02:05:59 +00:00
|
|
|
}
|
2021-12-21 21:32:34 +00:00
|
|
|
|
2022-01-08 01:08:42 +00:00
|
|
|
if (project.isFoundationPlugin()) {
|
2021-12-26 03:33:23 -05:00
|
|
|
tasks.withType<ShadowJar> {
|
|
|
|
archiveClassifier.set("plugin")
|
|
|
|
}
|
2021-12-21 21:32:34 +00:00
|
|
|
}
|
2021-12-22 06:55:47 +00:00
|
|
|
|
|
|
|
tasks.assemble {
|
|
|
|
dependsOn("shadowJar")
|
|
|
|
}
|
2021-12-19 02:05:59 +00:00
|
|
|
}
|
2022-01-13 18:25:35 -05:00
|
|
|
|
2022-01-13 23:19:07 -05:00
|
|
|
foundation {
|
|
|
|
minecraftServerPath.set("server")
|
|
|
|
paperVersionGroup.set("1.18")
|
2022-01-13 18:25:35 -05:00
|
|
|
}
|