public class ProtoJsPlugin
extends io.spine.tools.gradle.ProtoPlugin
To run the plugin, add the "io.spine.tools:spine-proto-js-plugin:$spineBaseVersion"
to the classpath
configuration and add
apply plugin: 'io.spine.tools.proto-js-plugin'
to the module generating JS messages.
In particular, the plugin:
TypeUrl
for each type.
The main plugin action may be retrieved and configured as necessary via the "protoJs" extension. By default, the action is a dependency of the build task.
This plugin currently relies on the set of the hard-coded Gradle settings which have to be set to the required values in a project willing to use the plugin. These settings are:
js {option "import_style=commonjs"}
;
The build.gradle
file located under the test/resources
folder of this module
can be used as an example of the required project configuration.
Constructor and Description |
---|
ProtoJsPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
apply(org.gradle.api.Project project) |
protected java.util.function.Supplier<java.io.File> |
mainDescriptorFile(org.gradle.api.Project project) |
protected java.util.function.Supplier<java.io.File> |
testDescriptorFile(org.gradle.api.Project project) |
logMissingDescriptorSetFile, newTask, resolve
public void apply(org.gradle.api.Project project)
protected java.util.function.Supplier<java.io.File> mainDescriptorFile(org.gradle.api.Project project)
mainDescriptorFile
in class io.spine.tools.gradle.ProtoPlugin
protected java.util.function.Supplier<java.io.File> testDescriptorFile(org.gradle.api.Project project)
testDescriptorFile
in class io.spine.tools.gradle.ProtoPlugin