-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
47 lines (39 loc) · 1.66 KB
/
build.gradle
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
plugins {
id 'java'
id 'org.gretty' version '3.1.0'
}
gretty {
contextPath = '/'
extraResourceBase 'build/dist/webapp'
}
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
project.ext.mainClassName = 'ktx.demo.teavm.TeaVMBuilder'
eclipse.project.name = appName + '-teavm'
// This must be at least 11, and no higher than the JDK version this project is built with.
java.targetCompatibility = "11"
// This should probably be equal to targetCompatibility, above. This only affects the TeaVM module.
java.sourceCompatibility = "11"
dependencies {
implementation "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion"
implementation "com.github.xpenatan.gdx-teavm:backend-teavm:$gdxTeaVMVersion"
implementation "com.github.xpenatan.gdx-teavm:gdx-bullet-teavm:1.0.0-b6"
implementation "com.github.xpenatan.gdx-teavm:gdx-freetype-teavm:$gdxTeaVMVersion"
implementation "org.teavm:teavm-classlib:$teaVMVersion"
implementation "org.teavm:teavm-core:$teaVMVersion"
implementation "org.teavm:teavm-jso-apis:$teaVMVersion"
implementation "org.teavm:teavm-jso-impl:$teaVMVersion"
implementation "org.teavm:teavm-jso:$teaVMVersion"
implementation "org.teavm:teavm-tooling:$teaVMVersion"
implementation project(':core')
}
tasks.register('buildJavaScript', JavaExec) {
dependsOn classes
setDescription("Transpile bytecode to JavaScript via TeaVM")
mainClass.set(project.mainClassName)
setClasspath(sourceSets.main.runtimeClasspath)
}
build.dependsOn buildJavaScript
tasks.register("run") {
description = "Run the JavaScript application hosted via a local Jetty server at http://localhost:8080/"
dependsOn(buildJavaScript, tasks.named("jettyRun"))
}