duttley / sbt-web3j-source-generate-plugin   0.1.3

GitHub

Web3j source generator

Scala versions: 2.12
sbt plugins: 1.0

SBT Web3j Source Code Generator

SBT AutoPlugin for generating source code from truffle files using the Web3j code generator.

Usage

This plugin requires sbt 1.0.0+

Add the following line and config to your sbt plugins.

addSbtPlugin("io.github.duttley" % "sbt-web3j-source-generate-plugin" % "0.1.2")

This plugin scans src/main/contracts for any truffle files.

The only required setting is the package setting. Add this to your project definition in build.sbt.

packageSetting := "com.du.abi"
Compile / sourceGenerators += (Compile / codegen).taskValue

Testing

Run test for regular unit tests.

Run scripted for sbt script tests.

CI

The generated project uses sbt-github-actions as a plugin to generate workflows for GitHub actions. For full details of how to use it read this

Publishing

  1. publish your source to GitHub
  2. Follow the instructions in sbt-ci-release to create a sonatype account and setup your keys
  3. sbt ci-release
  4. Add your plugin to the community plugins list
  5. Claim your project an Scaladex