-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
c0db95c
commit cb76185
Showing
56 changed files
with
232 additions
and
150 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,172 +1,53 @@ | ||
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription.Permission.Default | ||
|
||
plugins { | ||
id("org.cadixdev.licenser") version "0.6.1" | ||
id("io.github.goooler.shadow") version "8.1.8" | ||
id("de.chojo.publishdata") version "1.4.0" | ||
id("net.minecrell.plugin-yml.bukkit") version "0.6.0" | ||
java | ||
`maven-publish` | ||
} | ||
|
||
group = "de.eldoria" | ||
group = "de.eldoria.gridselector" | ||
version = "1.3.0" | ||
val shadebase = "de.eldoria." + rootProject.name + ".libs." | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://eldonexus.de/repository/maven-public/") | ||
maven("https://eldonexus.de/repository/maven-proxies/") | ||
} | ||
|
||
dependencies { | ||
compileOnly("de.eldoria", "schematicbrushreborn-api", "2.7.1-DEV") | ||
compileOnly("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT") | ||
compileOnly("com.sk89q.worldedit", "worldedit-bukkit", "7.3.0") | ||
// PlotSquared Core API | ||
compileOnly("com.plotsquared", "PlotSquared-Core", "6.11.1") { | ||
exclude("com.intellectualsites.paster", "Paster") | ||
exclude("org.apache.logging.log4j", "log4j-api") | ||
exclude("com.intellectualsites.informative-annotations", "informative-annotations") | ||
allprojects { | ||
apply { | ||
plugin<JavaPlugin>() | ||
} | ||
compileOnly("com.plotsquared", "PlotSquared-Bukkit", "6.11.1") { isTransitive = false } // PlotSquared Bukkit API | ||
compileOnly("com.sk89q.worldguard", "worldguard-bukkit", "7.0.9") | ||
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core:2.9.2") { | ||
exclude("com.intellectualsites.paster") | ||
exclude("org.yaml") | ||
} | ||
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit:2.9.2") { | ||
isTransitive = false | ||
exclude("org.yaml") | ||
} | ||
|
||
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.11.0") | ||
testImplementation("com.sk89q.worldedit", "worldedit-bukkit", "7.3.0") | ||
testImplementation("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT") | ||
testImplementation("de.eldoria", "eldo-util", "1.14.4") | ||
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine") | ||
} | ||
|
||
license { | ||
header(rootProject.file("HEADER.txt")) | ||
include("**/*.java") | ||
} | ||
|
||
java { | ||
toolchain{ | ||
languageVersion = JavaLanguageVersion.of(21) | ||
} | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
publishData { | ||
addBuildData() | ||
useEldoNexusRepos() | ||
publishComponent("java") | ||
} | ||
|
||
publishing { | ||
publications.create<MavenPublication>("maven") { | ||
publishData.configurePublication(this) | ||
} | ||
group = rootProject.group | ||
version = rootProject.version | ||
|
||
repositories { | ||
maven { | ||
authentication { | ||
credentials(PasswordCredentials::class) { | ||
username = System.getenv("NEXUS_USERNAME") | ||
password = System.getenv("NEXUS_PASSWORD") | ||
} | ||
} | ||
|
||
setUrl(publishData.getRepository()) | ||
name = "EldoNexus" | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
compileJava { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
compileTestJava { | ||
options.encoding = "UTF-8" | ||
mavenCentral() | ||
maven("https://eldonexus.de/repository/maven-public/") | ||
maven("https://eldonexus.de/repository/maven-proxies/") | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(21) | ||
} | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
shadowJar { | ||
relocate("de.eldoria.messageblocker", "de.eldoria.schematicbrush.libs.messageblocker") | ||
mergeServiceFiles() | ||
archiveClassifier.set("all") | ||
archiveBaseName.set("GridSelector") | ||
} | ||
|
||
processResources { | ||
from(sourceSets.main.get().resources.srcDirs) { | ||
filesMatching("plugin.yml") { | ||
expand( | ||
"version" to publishData.getVersion(true) | ||
) | ||
} | ||
duplicatesStrategy = DuplicatesStrategy.INCLUDE | ||
tasks { | ||
compileJava { | ||
options.encoding = "UTF-8" | ||
} | ||
} | ||
|
||
register<Copy>("copyToServer") { | ||
val path = project.property("targetDir") ?: ""; | ||
if (path.toString().isEmpty()) { | ||
println("targetDir is not set in gradle properties") | ||
return@register | ||
compileTestJava { | ||
options.encoding = "UTF-8" | ||
} | ||
println("Copying jar to $path") | ||
from(shadowJar) | ||
destinationDir = File(path.toString()) | ||
} | ||
|
||
build { | ||
dependsOn(shadowJar) | ||
} | ||
} | ||
|
||
bukkit { | ||
name = "GridSelector" | ||
main = "de.eldoria.gridselector.GridSelector" | ||
apiVersion = "1.16" | ||
version = publishData.getVersion(true) | ||
authors = listOf("RainbowDashLabs") | ||
depend = listOf("SchematicBrushReborn") | ||
softDepend = listOf("PlotSquared", "WorldGuard") | ||
|
||
commands { | ||
register("schematicbrushgrid") { | ||
aliases = listOf("sbrg") | ||
permission = "gridselector.use" | ||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
} | ||
} | ||
} | ||
} | ||
|
||
permissions { | ||
register("gridselector.export") { | ||
default = Default.FALSE | ||
} | ||
register("gridselector.export.global") { | ||
default = Default.FALSE | ||
} | ||
register("gridselector.cluster.create") { | ||
default = Default.FALSE | ||
} | ||
register("gridselector.cluster.remove") { | ||
default = Default.FALSE | ||
} | ||
register("gridselector.cluster.repair") { | ||
default = Default.FALSE | ||
} | ||
} | ||
license { | ||
header(rootProject.file("HEADER.txt")) | ||
include("**/*.java") | ||
} |
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,73 @@ | ||
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription.Permission.Default.FALSE | ||
|
||
plugins { | ||
alias(libs.plugins.pluginyml) | ||
alias(libs.plugins.publishdata) | ||
} | ||
|
||
dependencies { | ||
compileOnly("de.eldoria", "schematicbrushreborn-api", "2.7.1") | ||
compileOnly("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT") | ||
compileOnly("com.sk89q.worldedit", "worldedit-bukkit", "7.3.0") | ||
// PlotSquared Core API | ||
compileOnly("com.plotsquared", "PlotSquared-Core", "6.11.1") { | ||
exclude("com.intellectualsites.paster", "Paster") | ||
exclude("org.apache.logging.log4j", "log4j-api") | ||
exclude("com.intellectualsites.informative-annotations", "informative-annotations") | ||
} | ||
compileOnly("com.plotsquared", "PlotSquared-Bukkit", "6.11.1") { isTransitive = false } // PlotSquared Bukkit API | ||
compileOnly("com.sk89q.worldguard", "worldguard-bukkit", "7.0.9") | ||
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core:2.9.2") { | ||
exclude("com.intellectualsites.paster") | ||
exclude("org.yaml") | ||
} | ||
compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit:2.9.2") { | ||
isTransitive = false | ||
exclude("org.yaml") | ||
} | ||
|
||
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.10.2") | ||
testImplementation("com.sk89q.worldedit", "worldedit-bukkit", "7.3.0") | ||
testImplementation("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT") | ||
testImplementation("de.eldoria", "eldo-util", "1.14.4") | ||
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine") | ||
} | ||
|
||
publishData { | ||
useEldoNexusRepos() | ||
} | ||
|
||
bukkit { | ||
name = "GridSelector" | ||
main = "de.eldoria.gridselector.GridSelector" | ||
apiVersion = "1.16" | ||
version = publishData.getVersion(true) | ||
authors = listOf("RainbowDashLabs") | ||
depend = listOf("SchematicBrushReborn") | ||
softDepend = listOf("PlotSquared", "WorldGuard") | ||
|
||
commands { | ||
register("schematicbrushgrid") { | ||
aliases = listOf("sbrg") | ||
permission = "gridselector.use" | ||
} | ||
} | ||
|
||
permissions { | ||
register("gridselector.export") { | ||
default = FALSE | ||
} | ||
register("gridselector.export.global") { | ||
default = FALSE | ||
} | ||
register("gridselector.cluster.create") { | ||
default = FALSE | ||
} | ||
register("gridselector.cluster.remove") { | ||
default = FALSE | ||
} | ||
register("gridselector.cluster.repair") { | ||
default = FALSE | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,58 @@ | ||
plugins { | ||
alias(libs.plugins.publishdata) | ||
alias(libs.plugins.shadow) | ||
`maven-publish` | ||
} | ||
|
||
dependencies { | ||
implementation(project(":core")) | ||
} | ||
|
||
publishData { | ||
addBuildData() | ||
useEldoNexusRepos() | ||
publishComponent("java") | ||
publishTask("shadowJar") | ||
} | ||
|
||
publishing { | ||
publications.create<MavenPublication>("maven") { | ||
publishData.configurePublication(this) | ||
} | ||
|
||
repositories { | ||
maven { | ||
authentication { | ||
credentials(PasswordCredentials::class) { | ||
username = System.getenv("NEXUS_USERNAME") | ||
password = System.getenv("NEXUS_PASSWORD") | ||
} | ||
} | ||
|
||
setUrl(publishData.getRepository()) | ||
name = "EldoNexus" | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
shadowJar { | ||
val shadebase = "de.eldoria.schematicbrush.libs." | ||
relocate("de.eldoria.messageblocker", shadebase + "messageblocker") | ||
} | ||
|
||
build { | ||
dependsOn(shadowJar) | ||
} | ||
|
||
register<Copy>("copyToServer") { | ||
val path = project.property("targetDir") ?: ""; | ||
if (path.toString().isEmpty()) { | ||
println("targetDir is not set in gradle properties") | ||
return@register | ||
} | ||
println("Copying jar to $path") | ||
from(shadowJar) | ||
destinationDir = File(path.toString()) | ||
} | ||
} |
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,56 @@ | ||
plugins { | ||
alias(libs.plugins.publishdata) | ||
alias(libs.plugins.shadow) | ||
`maven-publish` | ||
} | ||
|
||
dependencies { | ||
implementation(project(":core")) | ||
} | ||
|
||
|
||
publishData { | ||
addBuildData() | ||
useEldoNexusRepos() | ||
publishComponent("java") | ||
publishTask("shadowJar") | ||
} | ||
|
||
publishing { | ||
publications.create<MavenPublication>("maven") { | ||
publishData.configurePublication(this) | ||
} | ||
|
||
repositories { | ||
maven { | ||
authentication { | ||
credentials(PasswordCredentials::class) { | ||
username = System.getenv("NEXUS_USERNAME") | ||
password = System.getenv("NEXUS_PASSWORD") | ||
} | ||
} | ||
|
||
setUrl(publishData.getRepository()) | ||
name = "EldoNexus" | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
shadowJar { | ||
val shadebase = "de.eldoria.schematicbrush.libs." | ||
relocate("org.bstats", shadebase + "bstats") | ||
relocate("de.eldoria.eldoutilities", shadebase + "eldoutilities") | ||
relocate("de.eldoria.jacksonbukkit", shadebase + "jacksonbukkit") | ||
relocate("de.eldoria.messageblocker", shadebase + "messageblocker") | ||
relocate("com.fasterxml", shadebase + "fasterxml") | ||
relocate("org.yaml", shadebase + "fasterxml") | ||
relocate("net.kyori", shadebase + "kyori") | ||
mergeServiceFiles() | ||
archiveVersion.set(rootProject.version as String) | ||
} | ||
|
||
build { | ||
dependsOn(shadowJar) | ||
} | ||
} |
Oops, something went wrong.