This commit is contained in:
2026-11-27 01:40:30 +00:00
parent 16aeaa36fb
commit eb9647e4a0
63 changed files with 7975 additions and 3 deletions
+124
View File
@@ -0,0 +1,124 @@
plugins {
id 'java-library'
id 'net.neoforged.moddev' version '2.0.148'
}
group = 'net.wowmine'
version = '1.1.0'
base {
archivesName = 'wowmine-stickers'
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
withSourcesJar()
}
repositories {
mavenCentral()
maven { url = uri('https://api.modrinth.com/maven') }
}
sourceSets {
qaBaseline {
compileClasspath += sourceSets.main.compileClasspath
runtimeClasspath += sourceSets.main.runtimeClasspath - sourceSets.main.output
}
protocolTest {
compileClasspath += sourceSets.main.output + sourceSets.main.compileClasspath
runtimeClasspath += sourceSets.main.output + sourceSets.main.compileClasspath
}
}
neoForge {
version = '21.1.250'
mods {
wowmine_stickers {
sourceSet(sourceSets.main)
}
}
runs {
stickerQaClient {
client()
gameDirectory = file('/tmp/wowmine-stickers/qa-client')
programArguments = ['--quickPlayMultiplayer', '127.0.0.1:25575']
jvmArgument('-Xmx2G')
environment('DISPLAY', ':197')
environment('ALSOFT_DRIVERS', 'null')
environment('LIBGL_ALWAYS_SOFTWARE', '1')
}
stickerQaBaseline {
client()
gameDirectory = file('/tmp/wowmine-stickers/qa-baseline')
sourceSet = sourceSets.qaBaseline
loadedMods = []
programArguments = ['--quickPlayMultiplayer', '127.0.0.1:25575']
jvmArgument('-Xmx2G')
environment('DISPLAY', ':197')
environment('ALSOFT_DRIVERS', 'null')
environment('LIBGL_ALWAYS_SOFTWARE', '1')
}
stickerQaServer {
server()
gameDirectory = file('/tmp/wowmine-stickers/qa-server')
programArgument('--nogui')
jvmArgument('-Xmx1536M')
}
}
}
dependencies {
jarJar(implementation('org.xerial:sqlite-jdbc')) {
version {
strictly '[3.45,4.0)'
prefer '3.54.1.0'
}
transitive = false
}
additionalRuntimeClasspath('org.xerial:sqlite-jdbc:3.54.1.0') {
transitive = false
}
compileOnly('maven.modrinth:WWLeFuHa:EMJ5tqkD') {
transitive = false
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release = 21
}
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
tasks.register('protocolTest', JavaExec) {
dependsOn tasks.named('protocolTestClasses')
classpath = sourceSets.protocolTest.runtimeClasspath
mainClass = 'net.wowmine.stickers.StickerProtocolTest'
}
tasks.named('check') {
dependsOn protocolTest
dependsOn 'chatArchiveTest', 'voiceFramesTest', 'historyProtocolTest'
}
tasks.register('chatArchiveTest', JavaExec) {
dependsOn tasks.named('protocolTestClasses')
classpath = sourceSets.protocolTest.runtimeClasspath
mainClass = 'net.wowmine.stickers.ChatArchiveTest'
}
tasks.register('voiceFramesTest', JavaExec) {
dependsOn tasks.named('protocolTestClasses')
classpath = sourceSets.protocolTest.runtimeClasspath
mainClass = 'net.wowmine.stickers.VoiceFramesTest'
}
tasks.register('historyProtocolTest', JavaExec) {
dependsOn tasks.named('protocolTestClasses')
classpath = sourceSets.protocolTest.runtimeClasspath
mainClass = 'net.wowmine.stickers.HistoryProtocolTest'
}