mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-11 19:14:11 +00:00
Updated Iris packaging
- Version is 4.1.2-26.2 across platform builds - Plugin builds use shared automatic jar selection - Native adapters remain bundled in selected artifacts - Plugin export tasks copy the selected artifact - The previous plugin packer is removed - The agent tracks primary storage closure during Spigot shutdown
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
import org.gradle.api.tasks.compile.JavaCompile
|
||||
import org.gradle.api.artifacts.component.ComponentIdentifier
|
||||
|
||||
configurations {
|
||||
packedXz
|
||||
}
|
||||
|
||||
dependencies {
|
||||
packedXz('org.tukaani:xz:1.10')
|
||||
}
|
||||
|
||||
def originalJar = tasks.named('jar', Jar)
|
||||
sourceSets {
|
||||
packedBootstrap {
|
||||
java.srcDir('packaging/xz/src/main/java')
|
||||
compileClasspath = files(originalJar.flatMap { it.archiveFile }) + configurations.packedXz
|
||||
}
|
||||
packedBootstrapTest {
|
||||
java.srcDir('packaging/xz/src/test/java')
|
||||
compileClasspath += sourceSets.packedBootstrap.output + sourceSets.packedBootstrap.compileClasspath
|
||||
runtimeClasspath += sourceSets.packedBootstrap.output + sourceSets.packedBootstrap.compileClasspath
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
packedBootstrapTestImplementation('junit:junit:4.13.2')
|
||||
}
|
||||
|
||||
tasks.named('compilePackedBootstrapJava', JavaCompile).configure {
|
||||
dependsOn(originalJar)
|
||||
}
|
||||
|
||||
tasks.register('packedBootstrapTest', Test) {
|
||||
group = 'verification'
|
||||
testClassesDirs = sourceSets.packedBootstrapTest.output.classesDirs
|
||||
classpath = sourceSets.packedBootstrapTest.runtimeClasspath
|
||||
}
|
||||
|
||||
tasks.register('packedJar', PackedJar) {
|
||||
group = 'build'
|
||||
description = 'Builds a Bukkit jar with an embedded XZ runtime payload.'
|
||||
dependsOn(tasks.named('verifyBukkitArtifact'), tasks.named('packedBootstrapClasses'), configurations.nativeRuntime)
|
||||
inputJar.set(originalJar.flatMap { it.archiveFile })
|
||||
bootstrapClasses.from(sourceSets.packedBootstrap.output.classesDirs)
|
||||
decoderJars.from(configurations.packedXz)
|
||||
nativeArtifacts.set(providers.provider {
|
||||
Map<ComponentIdentifier, File> resolved = new LinkedHashMap<>()
|
||||
configurations.nativeRuntime.incoming.artifacts.artifacts.each { artifact ->
|
||||
resolved.put(artifact.id.componentIdentifier, artifact.file)
|
||||
}
|
||||
PackedJar.resolveNativeArtifacts(resolved)
|
||||
})
|
||||
outputJar.set(layout.buildDirectory.file(originalJar.flatMap { it.archiveFileName }
|
||||
.map { String name -> "libs/${name.replaceFirst(/\.jar$/, '-xz.jar')}" }))
|
||||
}
|
||||
|
||||
tasks.named('check').configure {
|
||||
dependsOn(tasks.named('packedBootstrapTest'))
|
||||
}
|
||||
Reference in New Issue
Block a user