-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
220 changed files
with
3,006 additions
and
3,726 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
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 |
---|---|---|
@@ -1,108 +1,124 @@ | ||
import com.diffplug.gradle.spotless.SpotlessPlugin | ||
import de.chojo.PublishData | ||
|
||
plugins { | ||
id("com.github.johnrengelman.shadow") version "8.1.0" | ||
java | ||
`maven-publish` | ||
`java-library` | ||
id("de.chojo.publishdata") version "1.2.3" | ||
id("com.diffplug.spotless") version "6.16.0" | ||
id("de.chojo.publishdata") version "1.2.4" | ||
id("com.diffplug.spotless") version "6.18.0" | ||
} | ||
group = "de.eldoria" | ||
group = "de.eldoria.util" | ||
var mainPackage = "eldoutilities" | ||
val shadebase = group as String? + "." + mainPackage + "." | ||
version = "1.14.4" | ||
version = "2.0.1" | ||
description = "Utility Library for spigot plugins used by the eldoria team." | ||
|
||
javaToolchains { | ||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
allprojects { | ||
apply { | ||
plugin<JavaLibraryPlugin>() | ||
plugin<SpotlessPlugin>() | ||
plugin<JavaPlugin>() | ||
plugin<MavenPublishPlugin>() | ||
plugin<PublishData>() | ||
} | ||
testing{ | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://eldonexus.de/repository/maven-public") | ||
maven("https://eldonexus.de/repository/maven-proxies") | ||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots") | ||
maven("https://repo.papermc.io/repository/maven-public/") | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://eldonexus.de/repository/maven-proxies") | ||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots") | ||
maven("https://repo.papermc.io/repository/maven-public/") | ||
|
||
} | ||
|
||
dependencies { | ||
implementation("org.bstats", "bstats-bukkit", "3.0.1") | ||
compileOnly("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT") | ||
compileOnly("org.jetbrains", "annotations", "24.0.1") | ||
|
||
testImplementation("org.jetbrains", "annotations", "24.0.1") | ||
testImplementation("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT") | ||
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.9.2") | ||
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.9.2") | ||
testImplementation("org.mockito", "mockito-core", "5.2.0") | ||
testImplementation("com.github.seeseemelk", "MockBukkit-v1.19", "2.145.0") | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
dependencies { | ||
compileOnly("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT") | ||
compileOnly("org.jetbrains", "annotations", "24.0.1") | ||
|
||
publishData { | ||
useEldoNexusRepos() | ||
publishTask("shadowJar") | ||
publishTask("sourcesJar") | ||
publishTask("javadocJar") | ||
} | ||
testImplementation("org.jetbrains", "annotations", "24.0.1") | ||
testImplementation("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT") | ||
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.9.2") | ||
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.9.2") | ||
testImplementation("org.mockito", "mockito-core", "5.2.0") | ||
testImplementation("com.github.seeseemelk", "MockBukkit-v1.19", "2.145.0") | ||
} | ||
|
||
spotless { | ||
java { | ||
licenseHeaderFile(rootProject.file("HEADER.txt")) | ||
target("**/*.java") | ||
java { | ||
withSourcesJar() | ||
withJavadocJar() | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(17)) | ||
} | ||
} | ||
|
||
publishing { | ||
publications.create<MavenPublication>("maven") { | ||
publishData.configurePublication(this); | ||
publishData{ | ||
useEldoNexusRepos() | ||
publishComponent("java") | ||
} | ||
|
||
repositories { | ||
maven { | ||
authentication { | ||
credentials(PasswordCredentials::class) { | ||
username = System.getenv("NEXUS_USERNAME") | ||
password = System.getenv("NEXUS_PASSWORD") | ||
publishing { | ||
publications.create<MavenPublication>("maven") { | ||
publishData.configurePublication(this); | ||
} | ||
|
||
repositories { | ||
maven { | ||
authentication { | ||
credentials(PasswordCredentials::class) { | ||
username = System.getenv("NEXUS_USERNAME") | ||
password = System.getenv("NEXUS_PASSWORD") | ||
} | ||
} | ||
} | ||
|
||
name = "EldoNexus" | ||
setUrl(publishData.getRepository()) | ||
name = "EldoNexus" | ||
setUrl(publishData.getRepository()) | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
compileJava { | ||
options.encoding = "UTF-8" | ||
spotless { | ||
java { | ||
licenseHeaderFile(rootProject.file("HEADER.txt")) | ||
target("**/*.java") | ||
} | ||
} | ||
|
||
javadoc { | ||
options.encoding = "UTF-8" | ||
} | ||
tasks { | ||
compileJava { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
compileTestJava { | ||
options.encoding = "UTF-8" | ||
} | ||
javadoc { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
compileTestJava { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
} | ||
} | ||
} | ||
shadowJar { | ||
relocate("org.bstats", shadebase + "bstats") | ||
mergeServiceFiles() | ||
archiveClassifier.set("") | ||
} | ||
} | ||
|
||
dependencies{ | ||
api(project(":commands")) | ||
api(project(":configuration")) | ||
api(project(":core")) | ||
api(project(":crossversion")) | ||
api(project(":debugging")) | ||
api(project(":entities")) | ||
api(project(":inventory")) | ||
api(project(":items")) | ||
api(project(":legacy-serialization")) | ||
api(project(":localization")) | ||
api(project(":messaging")) | ||
api(project(":metrics")) | ||
api(project(":plugin")) | ||
api(project(":threading")) | ||
api(project(":updater")) | ||
} |
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,6 @@ | ||
dependencies { | ||
api(project(":core")) | ||
api(project(":messaging")) | ||
api(project(":debugging")) | ||
api(project(":localization")) | ||
} |
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
Oops, something went wrong.