Project164/build.gradle

62 lines
1.4 KiB
Groovy
Raw Normal View History

2025-02-05 13:30:54 -06:00
import org.teavm.gradle.api.OptimizationLevel
2025-01-28 11:42:43 -06:00
plugins {
id "java"
2025-02-05 13:30:54 -06:00
id "org.teavm" version "0.10.2"
2025-01-28 11:42:43 -06:00
}
sourceSets {
main {
java {
2025-02-06 17:02:51 -06:00
srcDirs(
"src/main/java",
2025-03-09 13:58:25 -05:00
"src/teavm/java",
2025-02-06 17:02:51 -06:00
"sp-server/src/ipc/java"
)
2025-01-28 11:42:43 -06:00
}
}
}
repositories {
mavenCentral()
}
tasks.withType(JavaCompile) {
options.warnings = false
options.compilerArgs << "-Xmaxerrs" << "1000"
}
2025-03-09 13:58:25 -05:00
//sourceSets.main.resources.srcDirs += 'src/lwjgl/java/javazoom/jl/decoder'
2025-02-14 09:39:17 -06:00
2025-01-28 11:42:43 -06:00
dependencies {
2025-03-09 13:58:25 -05:00
//implementation fileTree(dir: './lwjgl-rundir/', include: '*.jar')
2025-02-05 13:30:54 -06:00
teavm(teavm.libs.jso)
teavm(teavm.libs.jsoApis)
compileOnly "org.teavm:teavm-core:0.10.2" // workaround for a few hacks
2025-02-03 08:22:11 -06:00
}
2025-02-05 13:30:54 -06:00
def folder = "javascript"
def name = "classes.js"
teavm.js {
2025-03-07 13:35:53 -06:00
obfuscated = true
2025-02-05 13:30:54 -06:00
sourceMap = true
targetFileName = "../" + name
optimization = OptimizationLevel.AGGRESSIVE
outOfProcess = false
fastGlobalAnalysis = false
processMemory = 512
entryPointName = "main"
mainClass = "net.lax1dude.eaglercraft.Client"
outputDir = file(folder)
properties = [ "java.util.TimeZone.autodetect": "true" ]
2025-03-07 13:35:53 -06:00
debugInformation = true
2025-02-05 13:30:54 -06:00
}
/*
2025-02-03 08:22:11 -06:00
tasks.register('copyDebugJar', Copy) {
project.delete("lwjgl-rundir/eaglercraft.jar")
2025-02-03 17:28:35 -06:00
from layout.buildDirectory.file("eaglercraft.jar")
into ("lwjgl-rundir/")
2025-02-05 13:30:54 -06:00
}
*/