Hooks is a little module for plugins, in Kotlin
Hooks represent "pluggable" points in a software model. They provide a mechanism for tapping into such points to get updates, or apply additional functionality to some typed object. Included in the hooks library are:
Basic, Waterfall, Bail, Loop
Along with the base library, we created a Kotlin symbol processor to enable hooks to be created with a simple typed-based DSL, limiting the redundancy and overhead required to subclass a hook.
Visit our site for information about how to use hooks.
At Intuit, we're big fans of tapable. We use it in some of our core systems to enable teams to augment and extend our frameworks to solve their customer problems. Since our backend systems are primarily JVM-based, we really missed tapable when working in service code. Hooks is our implementation of tapable as a library for the JVM plus an Arrow Meta Compiler Plugin to make it easier to use.
call
functiontap
functionFeel free to make an issue or open a pull request if you have an improvement and new plugin to propose!
Make sure to read our code of conduct.
To get set up, fork and clone the project.
Build and verify all checks:
./gradlew build
Publish locally to use in other projects:
./gradlew publishToMavenLocal
Recompile changes and run all tests:
./gradlew test
./gradlew run
./gradlew clean
Linting is done with ktlint and configured using JLLeitschuh's ktlint Gradle plugin.
Format code according to linting standards:
./gradlew ktlintFormat
Verify code meets linting standards:
./gradlew ktlintCheck
To ensure that binary compatibility is maintained across non-breaking releases, the public API is validated using the Kotlin binary compatibility validator tool.
Update the API dumps:
./gradlew apiDump
Verify the public API matches the API dumps:
./gradlew apiCheck
The docs site is built using the Orchid tool and takes inspiration from the stikt.io docs site.
Run the docs locally:
./gradlew orchidServe
The knit tool is also used to generate tests driven from markdown snippets to ensure documentation is maintained and up-to-date.
Update all generated markdown tests:
./gradlew knit
Verify the generated tests match the latest markdown changes:
./gradlew knitCheck
This project follows the semantic versioning strategy and uses Auto to automate releases on CI. PRs must be labeled with an appropriate Auto label to denote what type of release should occur when merged. With the binary compatibility validator tool, we can follow this set of rules to determine release types:
Thanks goes to these wonderful people (emoji key):
Jeremiah Zucker β οΈ π» π π |
David Stone π β οΈ π» |
Andrew Lisowski π π β οΈ π» |
Kelly Harrop π¨ |
brocollie08 β οΈ π» |
This project follows the all-contributors specification. Contributions of any kind welcome!
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).