2024-04-11 14:18:30 -07:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
|
|
|
id 'eclipse'
|
|
|
|
id 'org.teavm' version '0.9.2'
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDir 'src/main/java'
|
|
|
|
srcDir 'src/teavm/java'
|
|
|
|
}
|
|
|
|
}
|
2024-04-15 22:05:39 -07:00
|
|
|
eagler {
|
|
|
|
java {
|
|
|
|
srcDir 'src/main/java'
|
|
|
|
srcDir 'src/lwjgl/java'
|
|
|
|
}
|
|
|
|
}
|
2024-04-11 14:18:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
teavm(teavm.libs.jso)
|
|
|
|
teavm(teavm.libs.jsoApis)
|
2024-04-15 22:05:39 -07:00
|
|
|
eaglerImplementation fileTree(dir: './desktopRuntime/eclipseProject/deps_fix/', include: '*.jar')
|
2024-04-11 14:18:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
teavm.js {
|
|
|
|
obfuscated = true
|
|
|
|
sourceMap = true
|
|
|
|
targetFileName = "../classes.js"
|
|
|
|
optimization = org.teavm.gradle.api.OptimizationLevel.BALANCED // no fps boost was observed with "AGGRESSIVE"
|
|
|
|
outOfProcess = false
|
|
|
|
fastGlobalAnalysis = false
|
|
|
|
processMemory = 512
|
|
|
|
entryPointName = 'main'
|
|
|
|
mainClass = 'net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass'
|
|
|
|
outputDir = file("javascript")
|
|
|
|
properties = null
|
|
|
|
sourceMap = true
|
|
|
|
debugInformation = false
|
|
|
|
}
|
2024-04-15 22:05:39 -07:00
|
|
|
|
|
|
|
tasks.register('runclient', JavaExec) {
|
|
|
|
classpath = sourceSets.eagler.compileClasspath
|
|
|
|
group = "ShadowClient"
|
|
|
|
description = "Runs the client"
|
|
|
|
classpath sourceSets.eagler.runtimeClasspath
|
|
|
|
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
|
|
|
|
jvmArgs '-XstartOnFirstThread'
|
|
|
|
}
|
|
|
|
|
|
|
|
workingDir "./desktopRuntime"
|
|
|
|
main 'net.lax1dude.eaglercraft.v1_8.internal.lwjgl.MainClass'
|
|
|
|
}
|