mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-25 13:30:08 +00:00
dd
This commit is contained in:
1 parent
6111b5670a
commit
402bcb04fe
112 files changed
+5610
-733
No files matched your search
+62
-125
@@ -71,36 +71,14 @@ String bukkitArtifactName = irisArtifactName('CraftBukkit', minecraftVersion)
|
||||
String fabricArtifactName = irisArtifactName('Fabric', "${minecraftVersion}+${loaderDisplayVersion(fabricLoaderVersion)}")
|
||||
String forgeArtifactName = irisArtifactName('Forge', "${minecraftVersion}+${loaderDisplayVersion(forgeVersion)}")
|
||||
String neoForgeArtifactName = irisArtifactName('NeoForge', "${minecraftVersion}+${loaderDisplayVersion(neoForgeVersion)}")
|
||||
extensions.extraProperties.set('bukkitArtifactName', bukkitArtifactName)
|
||||
extensions.extraProperties.set('fabricArtifactName', fabricArtifactName)
|
||||
extensions.extraProperties.set('forgeArtifactName', forgeArtifactName)
|
||||
extensions.extraProperties.set('neoForgeArtifactName', neoForgeArtifactName)
|
||||
|
||||
apply plugin: ApiGenerator
|
||||
|
||||
// ADD YOURSELF AS A NEW LINE IF YOU WANT YOUR OWN BUILD TASK GENERATED
|
||||
// ======================== WINDOWS =============================
|
||||
registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins')
|
||||
registerCustomOutputTask('Psycho', 'C://Dan/MinecraftDevelopment/Server/plugins')
|
||||
registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/server/plugins')
|
||||
registerCustomOutputTask('Coco', 'D://mcsm/plugins')
|
||||
registerCustomOutputTask('Strange', 'D://Servers/1.17 Test Server/plugins')
|
||||
registerCustomOutputTask('Vatuu', 'D://Minecraft/Servers/1.19.4/plugins')
|
||||
registerCustomOutputTask('CrazyDev22', 'C://Users/Julian/Desktop/server/plugins')
|
||||
registerCustomOutputTask('PixelFury', 'C://Users/repix/workplace/Iris/1.21.3 - Development-Public-v3/plugins')
|
||||
registerCustomOutputTask('PixelFuryDev', 'C://Users/repix/workplace/Iris/1.21 - Development-v3/plugins')
|
||||
// ========================== UNIX ==============================
|
||||
registerCustomOutputTaskUnix('CyberpwnLT', '/Users/danielmills/development/server/plugins')
|
||||
registerCustomOutputTaskUnix(
|
||||
'PsychoLT',
|
||||
'/Users/brianfopiano/Developer/RemoteGit/[Minecraft Server]/consumers/plugin-consumers/dropins/plugins',
|
||||
'/Users/brianfopiano/Developer/RemoteGit/[Minecraft Server]/consumers/fabric-mod-consumers/dropins/mods',
|
||||
'/Users/brianfopiano/Developer/RemoteGit/[Minecraft Server]/consumers/forge-mod-consumers/dropins/mods',
|
||||
'/Users/brianfopiano/Developer/RemoteGit/[Minecraft Server]/consumers/neoforge-mod-consumers/dropins/mods'
|
||||
)
|
||||
registerCustomOutputTaskUnix('PixelMac', '/Users/test/Desktop/mcserver/plugins')
|
||||
registerCustomOutputTaskUnix('CrazyDev22LT', '/home/julian/Desktop/server/plugins')
|
||||
// ==============================================================
|
||||
String consumerLocation = providers.gradleProperty('location')
|
||||
.getOrElse('/Users/brianfopiano/Developer/RemoteGit/[Minecraft Server]/consumers')
|
||||
String bukkitConsumerPath = "${consumerLocation}/plugin-consumers/dropins/plugins"
|
||||
String fabricConsumerPath = "${consumerLocation}/fabric-mod-consumers/dropins/mods"
|
||||
String forgeConsumerPath = "${consumerLocation}/forge-mod-consumers/dropins/mods"
|
||||
String neoForgeConsumerPath = "${consumerLocation}/neoforge-mod-consumers/dropins/mods"
|
||||
|
||||
def nmsBindings = [
|
||||
v26_2_R1: '26.2.build.25-alpha',
|
||||
@@ -272,14 +250,14 @@ tasks.named('neoforgeJar').configure {
|
||||
mustRunAfter(tasks.named('forgeJar'))
|
||||
}
|
||||
|
||||
tasks.register('buildAll') {
|
||||
tasks.register('buildAllToOut') {
|
||||
group = 'iris'
|
||||
dependsOn('buildBukkit', 'buildFabric', 'buildForge', 'buildNeoforge', ':spi:jar')
|
||||
doLast {
|
||||
File dist = layout.projectDirectory.dir('dist').asFile
|
||||
File[] jars = dist.listFiles((java.io.FileFilter) { File f -> f.name.endsWith('.jar') })
|
||||
println('')
|
||||
println('=== Iris buildAll -> dist/ ===')
|
||||
println('=== Iris buildAllToOut -> dist/ ===')
|
||||
if (jars != null) {
|
||||
jars.sort { it.name }.each { File f ->
|
||||
println(String.format(' %-60s %8d KB', f.name, (long) (f.length() / 1024)))
|
||||
@@ -288,6 +266,60 @@ tasks.register('buildAll') {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('buildAll') {
|
||||
group = 'iris'
|
||||
outputs.upToDateWhen { false }
|
||||
dependsOn('iris', 'fabricJar', 'forgeJar', 'neoforgeJar')
|
||||
doLast {
|
||||
delete(
|
||||
file("${bukkitConsumerPath}/Iris-Fabric.jar"),
|
||||
file("${bukkitConsumerPath}/Iris-Forge.jar"),
|
||||
file("${bukkitConsumerPath}/Iris-Neoforge.jar")
|
||||
)
|
||||
copy {
|
||||
from(layout.buildDirectory.file(bukkitArtifactName))
|
||||
into(bukkitConsumerPath)
|
||||
rename { String ignored -> 'Iris.jar' }
|
||||
}
|
||||
delete(
|
||||
file("${fabricConsumerPath}/Iris.jar"),
|
||||
file("${fabricConsumerPath}/Iris-Forge.jar"),
|
||||
file("${fabricConsumerPath}/Iris-Neoforge.jar")
|
||||
)
|
||||
copy {
|
||||
from(layout.projectDirectory.file("adapters/fabric/build/libs/${fabricArtifactName}"))
|
||||
into(fabricConsumerPath)
|
||||
rename { String ignored -> 'Iris-Fabric.jar' }
|
||||
}
|
||||
delete(
|
||||
file("${forgeConsumerPath}/Iris.jar"),
|
||||
file("${forgeConsumerPath}/Iris-Fabric.jar"),
|
||||
file("${forgeConsumerPath}/Iris-Neoforge.jar")
|
||||
)
|
||||
copy {
|
||||
from(layout.projectDirectory.file("adapters/forge/build/libs/${forgeArtifactName}"))
|
||||
into(forgeConsumerPath)
|
||||
rename { String ignored -> 'Iris-Forge.jar' }
|
||||
}
|
||||
delete(
|
||||
file("${neoForgeConsumerPath}/Iris.jar"),
|
||||
file("${neoForgeConsumerPath}/Iris-Fabric.jar"),
|
||||
file("${neoForgeConsumerPath}/Iris-Forge.jar")
|
||||
)
|
||||
copy {
|
||||
from(layout.projectDirectory.file("adapters/neoforge/build/libs/${neoForgeArtifactName}"))
|
||||
into(neoForgeConsumerPath)
|
||||
rename { String ignored -> 'Iris-Neoforge.jar' }
|
||||
}
|
||||
println('')
|
||||
println("=== Iris buildAll -> ${consumerLocation} ===")
|
||||
println(" ${bukkitConsumerPath}/Iris.jar")
|
||||
println(" ${fabricConsumerPath}/Iris-Fabric.jar")
|
||||
println(" ${forgeConsumerPath}/Iris-Forge.jar")
|
||||
println(" ${neoForgeConsumerPath}/Iris-Neoforge.jar")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('irisDev', Copy) {
|
||||
group = 'iris'
|
||||
from(project(':core').layout.buildDirectory.files('libs/core-javadoc.jar', 'libs/core-sources.jar'))
|
||||
@@ -409,98 +441,3 @@ if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_25)) {
|
||||
System.err.println()
|
||||
System.exit(69)
|
||||
}
|
||||
|
||||
void registerCustomOutputTask(String name, String path) {
|
||||
if (!System.getProperty('os.name').toLowerCase().contains('windows')) {
|
||||
return
|
||||
}
|
||||
|
||||
createCustomOutputTasks(name, path)
|
||||
}
|
||||
|
||||
void registerCustomOutputTask(String name, String path, String fabricPath, String forgePath, String neoForgePath) {
|
||||
if (!System.getProperty('os.name').toLowerCase().contains('windows')) {
|
||||
return
|
||||
}
|
||||
|
||||
createCustomOutputTasks(name, path, fabricPath, forgePath, neoForgePath)
|
||||
}
|
||||
|
||||
void registerCustomOutputTaskUnix(String name, String path) {
|
||||
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
|
||||
return
|
||||
}
|
||||
|
||||
createCustomOutputTasks(name, path)
|
||||
}
|
||||
|
||||
void registerCustomOutputTaskUnix(String name, String path, String fabricPath, String forgePath, String neoForgePath) {
|
||||
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
|
||||
return
|
||||
}
|
||||
|
||||
createCustomOutputTasks(name, path, fabricPath, forgePath, neoForgePath)
|
||||
}
|
||||
|
||||
void createCustomOutputTasks(String name, String path) {
|
||||
createBukkitOutputTask(name, path)
|
||||
|
||||
tasks.register("buildAll${name}") {
|
||||
group = 'development'
|
||||
dependsOn("build${name}")
|
||||
}
|
||||
}
|
||||
|
||||
void createCustomOutputTasks(String name, String path, String fabricPath, String forgePath, String neoForgePath) {
|
||||
createBukkitOutputTask(name, path)
|
||||
createPlatformOutputTask(name, fabricPath, 'Fabric', 'buildFabric', "adapters/fabric/build/libs/${String.valueOf(project.ext.fabricArtifactName)}")
|
||||
createPlatformOutputTask(name, forgePath, 'Forge', 'buildForge', "adapters/forge/build/libs/${String.valueOf(project.ext.forgeArtifactName)}")
|
||||
createPlatformOutputTask(name, neoForgePath, 'Neoforge', 'buildNeoforge', "adapters/neoforge/build/libs/${String.valueOf(project.ext.neoForgeArtifactName)}")
|
||||
|
||||
tasks.register("buildAll${name}") {
|
||||
group = 'development'
|
||||
dependsOn(
|
||||
"build${name}",
|
||||
"build${name}Fabric",
|
||||
"build${name}Forge",
|
||||
"build${name}Neoforge"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
void createBukkitOutputTask(String name, String path) {
|
||||
tasks.register("build${name}", Copy) {
|
||||
group = 'development'
|
||||
outputs.upToDateWhen { false }
|
||||
dependsOn('iris')
|
||||
from(layout.buildDirectory.file((String) project.ext.bukkitArtifactName))
|
||||
into(file(path))
|
||||
rename { String ignored -> 'Iris.jar' }
|
||||
doFirst {
|
||||
delete(
|
||||
file("${path}/Iris-Fabric.jar"),
|
||||
file("${path}/Iris-Forge.jar"),
|
||||
file("${path}/Iris-Neoforge.jar")
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void createPlatformOutputTask(String name, String path, String platform, String buildTask, String sourcePath) {
|
||||
tasks.register("build${name}${platform}", Copy) {
|
||||
group = 'development'
|
||||
outputs.upToDateWhen { false }
|
||||
dependsOn(buildTask)
|
||||
from(layout.projectDirectory.file(sourcePath))
|
||||
into(file(path))
|
||||
rename { String ignored -> "Iris-${platform}.jar" }
|
||||
doFirst {
|
||||
delete(
|
||||
file("${path}/Iris.jar"),
|
||||
file("${path}/Iris-Fabric.jar"),
|
||||
file("${path}/Iris-Forge.jar"),
|
||||
file("${path}/Iris-Neoforge.jar")
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user