Configuration
Build Plugin
You can find the latest versions of each here.
Add the following to your pom.xml
<plugin>
<groupId>io.bindingz</groupId>
<artifactId>bindingz-maven-plugin</artifactId>
<version>1.0.7</version>
<executions>
<execution>
<id>processResources</id>
<phase>generate-sources</phase>
<goals>
<goal>processResources</goal>
</goals>
</execution>
<execution>
<id>publishResources</id>
<phase>package</phase>
<goals>
<goal>publishResources</goal>
</goals>
</execution>
</executions>
</plugin>
Add the following to your plugins.sbt
addSbtPlugin("io.bindingz" %% "sbt-bindingz-plugin" % "1.0.7")
Add the following to your build.gradle
apply plugin: 'bindingz'
buildscript {
...
dependencies {
classpath 'io.bindingz:bindingz-gradle-plugin:1.0.7'
}
}
bindingz.json
Add a bindingz.json
to your project root.
The following is an example
{
"publish": {
"namespace": "payments",
"owner": "billing-service",
"packageName": "com.abc.payments.billing.domain",
"contracts": [
{
"className": "InvoiceDto",
"contractName": "Invoice",
"version": "1.0-SNAPSHOT"
}
]
},
"process": {
"namespace": "payments",
"owner": "account-service",
"contracts": [
{
"className": "AccountDto",
"packageName": "com.abc.payments.billing.model.account.v1",
"contractName": "Account",
"version": "1.0"
}
]
}
}