2024-12-07 18:25:36 -08:00
|
|
|
import org.teavm.gradle.api.OptimizationLevel
|
2022-02-16 17:54:12 -08:00
|
|
|
|
2024-12-07 18:25:36 -08:00
|
|
|
plugins {
|
|
|
|
id "java"
|
|
|
|
id "eclipse"
|
|
|
|
id "org.teavm" version "0.10.2"
|
2022-07-29 16:48:06 -07:00
|
|
|
}
|
|
|
|
|
2022-02-16 17:54:12 -08:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
2024-12-07 18:25:36 -08:00
|
|
|
srcDirs(
|
|
|
|
"src/main/java",
|
|
|
|
"src/ipc/java"
|
|
|
|
)
|
2022-02-16 17:54:12 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2022-08-24 23:25:01 -07:00
|
|
|
mavenCentral()
|
2022-02-16 17:54:12 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-12-07 18:25:36 -08:00
|
|
|
teavm(teavm.libs.jso)
|
|
|
|
teavm(teavm.libs.jsoApis)
|
2024-12-08 19:53:10 -08:00
|
|
|
compileOnly "org.teavm:teavm-core:0.10.2" // workaround for a few hacks
|
2022-02-16 17:54:12 -08:00
|
|
|
}
|
|
|
|
|
2024-12-07 18:25:36 -08:00
|
|
|
def folder = "../javascript"
|
|
|
|
def name = "classes_server.js"
|
|
|
|
|
|
|
|
teavm.js {
|
|
|
|
obfuscated = true
|
|
|
|
sourceMap = true
|
|
|
|
targetFileName = "../" + name
|
|
|
|
optimization = OptimizationLevel.AGGRESSIVE
|
|
|
|
outOfProcess = false
|
|
|
|
fastGlobalAnalysis = false
|
|
|
|
processMemory = 512
|
|
|
|
entryPointName = "main"
|
|
|
|
mainClass = "net.lax1dude.eaglercraft.sp.IntegratedServer"
|
|
|
|
outputDir = file(folder)
|
|
|
|
properties = [ "java.util.TimeZone.autodetect": "true" ]
|
|
|
|
debugInformation = false
|
2022-02-16 17:54:12 -08:00
|
|
|
}
|