File size: 1,503 Bytes
d46f4a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import org.teavm.gradle.api.OptimizationLevel
import org.teavm.gradle.api.WasmDebugInfoLocation
import org.teavm.gradle.api.WasmDebugInfoLevel

plugins {
    id "java"
    id "eclipse"
    id "org.teavm" version "0.11.0-EAGLER-R1"
}

sourceSets {
    main {
        java {
            srcDirs(
                "../src/main/java",
                "../src/game/java",
               	"../src/protocol-game/java",
                "../src/protocol-relay/java",
                "../src/wasm-gc-teavm/java"
            )
        }
    }
    
}

repositories {
    maven {
        url = uri("https://eaglercraft-teavm-fork.github.io/maven/")
    }
    mavenCentral()
}

dependencies {
    compileOnly "org.teavm:teavm-core:0.11.0-EAGLER-R1" // workaround for a few hacks
}

def folder = "javascript"
def name = "classes.wasm"

teavm.wasmGC {
    compileJava.options.encoding = "UTF-8"
    targetFileName = "../" + name
    optimization = OptimizationLevel.AGGRESSIVE
    outOfProcess = false
    fastGlobalAnalysis = false
    processMemory = 512
    mainClass = "net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.MainClass"
    outputDir = file(folder)
    properties = [ "java.util.TimeZone.autodetect": "true" ]
    debugInformation = true
    debugInfoLocation = WasmDebugInfoLocation.EXTERNAL;
    debugInfoLevel = WasmDebugInfoLevel.DEOBFUSCATION;
	directMallocSupport = true
    minHeapSize = 32
    maxHeapSize = 512
    disassembly = true
}