You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gdx-teavm plugin marker is published to Maven with the rest of the artifacts, so Gradle Plugin Portal is not required for this plugin.
48
+
Release artifacts are available from Maven Central. Snapshot and plugin repository configuration is documented once in the [usage guide](docs/usage.md#repositories).
72
49
73
50
## Gradle Plugin Quick Start
74
51
75
52
Apply the plugin in the TeaVM target module:
76
53
77
54
```kotlin
78
55
plugins {
79
-
id("com.github.xpenatan.gdx-teavm") version "-SNAPSHOT"
56
+
id("com.github.xpenatan.gdx-teavm") version "<latest-release>"
80
57
}
81
58
82
59
dependencies {
@@ -111,51 +88,11 @@ For native targets and every available property, see the [usage guide](docs/usag
111
88
112
89
## Manual Builder Quick Start
113
90
114
-
Use the builder API when you need full programmatic control or a custom build launcher. See the [usage guide](docs/usage.md) for complete builder examples.
Run the Java launcher from Gradle or your IDE. Builder projects add the concrete backend dependency they use, such as `backend-web` or `backend-glfw`.
91
+
Use the builder API when you need full programmatic control or a custom build launcher. The [manual builder guide](docs/usage.md#manual-builder-api) contains dependencies and complete Web and GLFW examples.
Copy file name to clipboardExpand all lines: docs/backend-architecture.md
+5-21Lines changed: 5 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,19 +60,13 @@ Android projects use a dedicated path instead: the Android Gradle Plugin remains
60
60
61
61
Target blocks are opt-in. If a build file declares only `wasm {}`, only Wasm gdx-teavm tasks are created. Native TeaVM C settings live inside target blocks such as `glfw {}` because logical targets can have different launchers and native options. Android projects currently support only the `android {}` target.
Each declared target registers only its own public `gdx_teavm_*` tasks. The [usage guide](usage.md#web-targets) is the user-facing task reference; this section covers the implementation behind web run tasks.
72
66
73
-
Web run tasks use `GdxTeaVMRunWebTask`by default, loading `backend-web`'s `JettyServer`by reflection from the target runtime classpath. When the target's `devServer.enabled`property is true, the same public run task delegates compilation to TeaVM's `javaScriptDevServer` or `wasmGCDevServer` task. With `autoBuild` enabled, the run task registers a Gradle `DeploymentHandle`; Gradle detects that reloadable deployment, automatically enters continuous-build mode for the same invocation, and reruns Java compilation and TeaVM generation when task inputs change. With `autoBuild` disabled, the task blocks directly to keep both servers alive without registering a reloadable deployment. Local project class directories precede external JARs on the development classpath so TeaVM observes recompiled classes, and the plugin invalidates TeaVM's compiler cache before each rebuild. Cancelling the overall Gradle invocation stops both the TeaVM server and entry adapter in either mode.
67
+
Web run tasks use `GdxTeaVMRunWebTask`and `backend-web`'s `JettyServer`unless `devServer.enabled`selects the TeaVM server. In development-server mode, the public run task starts TeaVM compilation, an entry-page adapter, and an optional file watcher. The watcher invokes only the target project's `classes` task, then requests an incremental build from the existing TeaVM process. Local project output directories precede external JARs so the compiler sees the updated classes.
74
68
75
-
The entry adapter supplies the generated page at `/` with an HTML content type, working around TeaVM serving generated `.html` files as plain text. When`autoReload`is enabled, it also installs a shared JS/Wasm client for TeaVM's build-status WebSocket. The plugin applies the same backend-filtered classpath and gdx-teavm properties to normal generation and development-server compilation.
69
+
The entry adapter serves the generated page as HTML at `/`. With`autoReload` enabled, it also injects a JS/Wasm client for TeaVM's build-status WebSocket. Cancelling the run task stops both servers and releases the public port.
76
70
77
71
## TeaVM Runtime Plugins
78
72
@@ -200,14 +194,4 @@ This is required for facade/helper types such as DOM extension wrappers and `Web
Builder defaults depend on the `build(new File(...))` output directory and the concrete backend. `WebBackend` defaults to a `webapp` folder, while `TeaGLFWBackend` defaults to `c/src` plus `c/release`.
197
+
Plugin defaults are maintained in the [property reference](plugin-properties.md#common-teavm-target-properties). Builder output is rooted at the directory passed to `build(File)` and organized by the concrete backend.
0 commit comments