Class TeavmPlugin
- java.lang.Object
-
- ru.vyarus.gradle.plugin.teavm.TeavmPlugin
-
- All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>
public class TeavmPlugin extends java.lang.Object implements org.gradle.api.Plugin<org.gradle.api.Project>TeaVM plugin. Compiles java/kotlin/scala sources into javascript.Plugin registers 'teavm' extension. Extension declares source sets to use (by default, main, kotlin and scala). Additional classes and source directories could be configured with special properties (also, default source sets could be flushed to rely only on custom locations).
Extension configures production compilation. For development, some options are duplicate in 'devOptions': when `dev = true` these options override default values (dev mode).
Plugin could use any teavm version: by default, version would be auto-detected from user classpath (by teavm-classlib jar). If jar not found, then `version` setting would be used. Auto-detection could be disabled with 'autoVersion = false'.
IMPORTANT: plugin is compiled with exact teavm version and so only compatible teavm version could be used instead. Also, new options appeared in new teavm would be impossible to use (until plugin would be compiled with new version).
NOTE: dev and debug servers are only available in IDEA plugin
Debug extension option could be used to print all paths resolved by plugin (plugin debugging).
Special "mixedResources" mode allows using static resources like html files (for flavour) inside source directories.
- Since:
- 27.12.2022
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTEAVM_VERSIONProperty stored in project extensions container, indicating actually used compiler version.
-
Constructor Summary
Constructors Constructor Description TeavmPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(org.gradle.api.Project project)
-
-
-
Field Detail
-
TEAVM_VERSION
public static final java.lang.String TEAVM_VERSION
Property stored in project extensions container, indicating actually used compiler version. Usage:project.getExtensions().getExtraProperties().get(TEAVM_VERSION).- See Also:
- Constant Field Values
-
-