Files
Iris/adapters/bukkit/plugin/build.gradle
T
Brian Neumann-Fopiano 0d76d81dab Downloaded LWJGL libraries
- LWJGL is no longer shaded into the Bukkit jar
- plugin.yml lists the LWJGL jars and Linux natives as Spigot libraries
- The Paper loader resolves the same plugin.yml list through the Maven Central mirror
- The packed payload no longer reserves the LWJGL natives prefix
- Tests cover reading the library list from the plugin jar
2026-10-28 21:55:09 -04:00

71 lines
2.6 KiB
Groovy

String apiVersion = providers.gradleProperty('apiVersion').get()
def mainClass = 'art.arcane.iris.Iris'
def bootstrapperClass = 'art.arcane.iris.IrisBootstrap'
dependencies {
compileOnly(project(':core'))
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
compileOnly('com.github.VolmitSoftware.VolmLib:volmlib-shared:master-SNAPSHOT') {
transitive = false
}
compileOnly(libs.paper.api)
// LogFilterSVC (constructed in Iris.enable's explicit service list) implements the
// log4j-core Filter interface, so its constructor reference needs the type resolvable.
compileOnly(libs.log4j.core)
testImplementation('junit:junit:4.13.2')
testImplementation(libs.mockito.core)
testImplementation(libs.paper.api)
testImplementation(libs.bstats)
testImplementation(project(':core'))
testImplementation(testFixtures(project(':core')))
testImplementation('com.github.VolmitSoftware.VolmLib:volmlib-shared:master-SNAPSHOT') {
transitive = false
}
compileOnly(libs.placeholderApi)
testImplementation(libs.placeholderApi) {
transitive = false
}
}
String lwjglVersion = libs.versions.lwjgl.get()
List<String> mavenLibraries = [
"org.lwjgl:lwjgl:${lwjglVersion}",
"org.lwjgl:lwjgl:jar:natives-linux:${lwjglVersion}",
"org.lwjgl:lwjgl-opengl:${lwjglVersion}",
"org.lwjgl:lwjgl-opengl:jar:natives-linux:${lwjglVersion}",
"org.lwjgl:lwjgl-egl:${lwjglVersion}",
"org.lwjgl:lwjgl-jawt:${lwjglVersion}",
].collect { GString coordinate -> coordinate.toString() }
tasks.named('processResources').configure {
def pluginProperties = [
name : rootProject.name,
version : rootProject.version,
apiVersion: apiVersion,
main : mainClass,
bootstrapper: bootstrapperClass,
libraries : mavenLibraries.collect { String coordinate -> "'${coordinate}'" }.join(', '),
]
inputs.properties(pluginProperties)
filesMatching(['**/paper-plugin.yml', '**/plugin.yml']) {
expand(pluginProperties)
}
}
tasks.named('compileJava', JavaCompile).configure {
// lombok.config decides how equals/hashCode/toString are generated (fields, never getters), so editing it
// changes this module's bytecode. Gradle does not know that on its own and would serve a stale up-to-date
// build until something else in the module changed.
inputs.file(rootProject.file('lombok.config'))
.withPropertyName('lombokConfig')
.withPathSensitivity(PathSensitivity.NONE)
}
tasks.named('jar', Jar).configure {
archiveBaseName.set('iris-bukkit-plugin')
}
tasks.named('test').configure {
}