Skip to content

A Gradle plugin that aids in compiling Solidity sources with Docker, written in Kotlin

License

Notifications You must be signed in to change notification settings

41north/gradle-solidity-plugin

Repository files navigation

✨ Solidity Gradle Plugin ✨

Build Status Gradle Solidity Plugin License

A Gradle plugin that aids in compiling Solidity sources with Docker, written in Kotlin.

💡 Introduction

This plugin was developed originally for Exflo. As current existing solutions are either old or relies on groovy, we thought it might be useful as this version is written using gradle's kotlin-dsl.

🙈 Usage

To apply the plugin, use the gradle plugin syntax:

plugins {
    id("dev.north.fortyone.solidity") version "0.1.0"
}

Once the plugin is applied, you can configure it with the following options (default values are displayed below):

solidity {
    attachToBuild.set(true)
    command.set("docker run --rm")
    solidityImage.set("ethereum/solc:stable")
    evmVersion.set(EVMVersion.ISTANBUL)
    outputComponents.set(listOf(OutputComponent.BIN, OutputComponent.ABI))
    overwrite.set(true)
    optimize.set(true)
    optimize.runs(0)
    prettyJson.set(false)
    ignoreMissing.set(false)
    allowPaths.set(emptyList())
}

A solidity source set will be available like a regular java or kotlin, so you can add your source code like usual.

💻 Contribute

We welcome any kind of contribution or support to this project but before to do so:

  • Make sure you have read the contribution guide for more details on how to submit a good PR (pull request).

Also, we are not only limited to technical contributions. Things that make us happy are:

  • Add a GitHub Star to the project.
  • Tweet about this project.
  • Write a review or tutorial.

Acknowledgements

This plugin takes inspiration from:

📬 Get in touch

Gradle Solidity Plugin has been developed initially by °41North.

If you think this project would be useful for your use case and want to talk more about it you can reach out to us via our contact form or by sending an email to hello@41north.dev. We try to respond within 48 hours and look forward to hearing from you.

✍️ License

Gradle Solidity Plugin is free and open-source software licensed under the Apache 2.0 License.

About

A Gradle plugin that aids in compiling Solidity sources with Docker, written in Kotlin

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages