A Gradle plugin to facilitate the codegen usage for Vert.x Java projects
This plugin focus on configuring your gradle project to be ready for Vert.x Service-Proxy usage. It applies the configuration needed for CodeGen API
- Check if the java plugin was applied and abort the execution otherwise
- Apply the following gradle dependencies with appropriate configuration with regards to the gradle version.
io.vertx:vertx-coreio.vertx:vertx-service-proxyio.vertx:vertx-codegen
- Adds a new gradle task
cleanGeneratedwhich will clean the generated classes. The defaultcleantask depends oncleanGenerated - Adds the compiler attributes needed
| NOTE: | The plugin will only be executed if the java plugin was already applied. It will not forcefully apply any plugin behind the scenes. |
|---|
plugins {
id 'java'
id 'io.dotinc.vertx-codegen-plugin' version 'x.y.z' // (1)
}
repositories {
mavenCentral()
}
codeGen {
vertxVersion = 'a.b.c' // (2)
generatedDirs = "src/main/generated"
generationPath = "proxy"
}(1) Replace x.y.z with one of the plugin versions available on the Gradle Plugin Portal
(2) Replace a.b.c with one of the vert.x library versions available on Maven Central Repository
| Options | Description | Default value |
|---|---|---|
| vertxVersion | The vert.x library version | 3.8.4 |
| generatedDirs | The path to the generated java classes. The path is relative to the project root | "src/main/generated" |
| generationPath | The specific path to the generated java class | "proxy" |
| NOTE: | Full path to generated proxy classes will be ${generatedDirs}/${generationPath} |
The vertxVersion config will be overridden with io.vertx:vertx-core version if it was already included in build.gradle file |
The default values can also be found in src/main/groovy/io/dotinc/gradle/CodeGenPluginExtension.groovy
- Pull requests are welcome.
- PRs should target the
masterbranch.
Vlad Bulimac (buli.vlad@gmail.com)