Awesome
JWebAssembly Gradle Plugin
This is a Gradle plugin for the JWebAssembly compiler. A Java bytecode to WebAssembly converter. It produce the WASM and JavaScript file from your *.java, *.class and/or *.jar files.
Usage
This plugin use the Java plugin to compile your Java sources to class files first.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'gradle.plugin.de.inetsoftware:jwebassembly-gradle:+'
}
}
apply plugin: 'de.inetsoftware.jwebassembly'
// declare your Java sources like you do it for your other Java projects
sourceSets {
main {
java {
srcDir 'src'
}
}
}
wasm {
format = 'Text' // possible values are 'Text' and 'Binary'. 'Binary' is the default value.
compilerVersion = 0.2 // specify a compiler version, default is '+'
classpath = files(...) // specify libraries, default is sourceSet.compileClasspath
}
For a more completely description look into the wiki documentation.