Skip to content

Commit d5b99d4

Browse files
committed
feat: Basic TeaVM 0.13 support
Just seeing how TeaVM fares in 2026 Wasm bundle is relatively slow, possibly related to copying buffers No cache I/O implemented
1 parent 2e62978 commit d5b99d4

16 files changed

Lines changed: 782 additions & 1099 deletions

build.gradle

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,29 @@
1-
buildscript {
2-
repositories {
3-
mavenCentral()
4-
}
5-
dependencies {
6-
classpath 'com.guardsquare:proguard-gradle:7.6.0'
7-
}
8-
}
9-
101
plugins {
112
id 'java'
12-
id 'application'
3+
id "org.teavm" version "0.13.0"
4+
id 'war'
135
}
146

15-
java {
16-
sourceCompatibility = JavaVersion.VERSION_1_8
17-
targetCompatibility = JavaVersion.VERSION_1_8
7+
repositories {
8+
mavenCentral()
189
}
1910

20-
application {
21-
mainClass = "jagex2.client.Client"
22-
}
23-
24-
jar {
25-
manifest {
26-
attributes(
27-
'Main-Class': 'jagex2.client.Client'
28-
)
29-
}
30-
31-
from {
32-
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
33-
}
34-
35-
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
11+
dependencies {
12+
implementation teavm.libs.jsoApis
3613
}
3714

3815
tasks.withType(JavaCompile) {
3916
options.encoding = 'UTF-8'
4017
}
4118

42-
tasks.register('proguard', proguard.gradle.ProGuardTask) {
43-
configuration file('proguard.pro')
44-
45-
injars(tasks.named('jar', Jar).flatMap { it.archiveFile })
46-
47-
outjars(layout.buildDirectory.file("libs/${project.name}.rel.jar"))
19+
teavm {
20+
all {
21+
mainClass = "jagex2.client.Client"
22+
}
23+
js {
24+
addedToWebApp = true
25+
}
26+
wasmGC {
27+
addedToWebApp = true
28+
}
4829
}

0 commit comments

Comments
 (0)