This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
forked from Minestom/Minestom
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
433 additions
and
1,325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
val indraVersion = "2.0.6" | ||
implementation("org.jetbrains.kotlin", "kotlin-gradle-plugin", "1.6.10") | ||
implementation("net.kyori", "indra-common", indraVersion) | ||
implementation("net.kyori", "indra-publishing-sonatype", indraVersion) | ||
implementation("org.graalvm.buildtools", "native-gradle-plugin", "0.9.9") | ||
} |
25 changes: 25 additions & 0 deletions
25
build-logic/src/main/kotlin/minestom.common-conventions.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
plugins { | ||
java | ||
} | ||
|
||
// Always exclude checker-qual. This is the single most annoying thing that always reappears. | ||
configurations.all { | ||
// We only use Jetbrains Annotations | ||
exclude("org.checkerframework", "checker-qual") | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(17)) | ||
} | ||
} | ||
|
||
tasks { | ||
withType<JavaCompile> { | ||
// We are fully aware, that we should be suppressing these instead of ignoring them here, but man keep my terminal clean. | ||
options.compilerArgs.addAll(listOf("-Xlint:none", "-Xlint:-deprecation", "-Xlint:-unchecked")) | ||
} | ||
withType<Test> { | ||
useJUnitPlatform() | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
build-logic/src/main/kotlin/minestom.native-conventions.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
plugins { | ||
id("minestom.common-conventions") | ||
id("org.graalvm.buildtools.native") | ||
} | ||
|
||
graalvmNative { | ||
binaries { | ||
named("main") { | ||
buildArgs.add("--allow-incomplete-classpath") | ||
// One day toolchains will support getting this automagically, but that day is not today. | ||
toolchainDetection.set(false) | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
build-logic/src/main/kotlin/minestom.publishing-conventions.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
plugins { | ||
id("net.kyori.indra") | ||
id("net.kyori.indra.publishing") | ||
id("net.kyori.indra.publishing.sonatype") | ||
} | ||
|
||
indra { | ||
javaVersions { | ||
target(17) | ||
testWith(17) | ||
} | ||
|
||
github("Minestom", "Minestom") { | ||
ci(true) | ||
} | ||
apache2License() | ||
|
||
configurePublications { | ||
pom { | ||
developers { | ||
developer { | ||
id.set("TheMode") | ||
name.set("TheMode") | ||
} | ||
developer { | ||
id.set("jglrxavpok") | ||
name.set("jglrxavpok") | ||
} | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
plugins { | ||
`java-library` | ||
id("minestom.publishing-conventions") | ||
id("minestom.native-conventions") | ||
} | ||
|
||
allprojects { | ||
group = "net.minestom.server" | ||
version = "1.0" | ||
description = "Lightweight and multi-threaded Minecraft server implementation" | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java { | ||
srcDir(file("src/autogenerated/java")) | ||
} | ||
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
tasks { | ||
withType<Javadoc> { | ||
(options as? StandardJavadocDocletOptions)?.apply { | ||
encoding = "UTF-8" | ||
|
||
// Custom options | ||
addBooleanOption("html5", true) | ||
addStringOption("-release", "17") | ||
// Links to external javadocs | ||
links("https://docs.oracle.com/en/java/javase/17/docs/api/") | ||
links("https://jd.adventure.kyori.net/api/${libs.versions.adventure.get()}/") | ||
} | ||
} | ||
withType<Zip> { | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} | ||
} | ||
|
||
dependencies { | ||
// Junit Testing Framework | ||
testImplementation(libs.junit.api) | ||
testRuntimeOnly(libs.junit.engine) | ||
// Only here to ensure J9 module support for extensions and our classloaders | ||
testCompileOnly(libs.mockito.core) | ||
|
||
|
||
// Logging | ||
implementation(libs.bundles.logging) | ||
// Libraries required for the terminal | ||
implementation(libs.bundles.terminal) | ||
|
||
// Performance improving libraries | ||
implementation(libs.caffeine) | ||
api(libs.fastutil) | ||
implementation(libs.bundles.flare) | ||
|
||
// Libraries | ||
api(libs.guava) | ||
api(libs.gson) | ||
implementation(libs.jcTools) | ||
// Path finding | ||
api(libs.hydrazine) | ||
|
||
// Adventure, for user-interface | ||
api(libs.bundles.adventure) | ||
|
||
// Kotlin Libraries | ||
api(libs.bundles.kotlin) | ||
|
||
// Extension Management System dependency handler. | ||
api(libs.dependencyGetter) | ||
|
||
// Minestom Data (From MinestomDataGenerator) | ||
implementation(libs.minestomData) | ||
|
||
// NBT parsing/manipulation/saving | ||
api("io.github.jglrxavpok.hephaistos:common:${libs.versions.hephaistos.get()}") | ||
api("io.github.jglrxavpok.hephaistos:gson:${libs.versions.hephaistos.get()}") | ||
} |
Oops, something went wrong.