You can contribute code or documentation to the toolkit. This document will guide you through the process or picking a task and building the code.
You can use the repository's Discussions tab to ask questions or resolve problems.
You can also ask any question, make suggestions or complaints at the project's Slack channel. You can also be up-to-date of project's news following @hexagon_kt on Twitter.
To file a bug, create an issue with the bug template.
Create a new issue using the enhancement template to file an improvement.
- You can check available tasks in the Organization Board. Issues with the help wanted tag in
the
Ready
column are recommended for a first time contribution. - Claim an issue you want to work in with a comment, after that I can assign it to you and move it
to the
Working
column. If you want to contribute to a non tagged (or a not existing) tasks: write a comment, and we'll discuss the scope of the feature. - New features should be discussed within a post in the GitHub ideas discussions before actual coding. You may do a PR directly, but you take the risk of it being not suitable and discarded.
- For code, file names, tags and branches use either camel case or snake case only. I.e.: avoid
-
or.
in file names if it is possible. - For a Pull Request to be accepted, follow the pull request template recommendations. Check the
code follows the Kotlin Coding Conventions, except final brace position in
else
,catch
andfinally
(in its own line). If you use IntelliJ and Editor Config this will be checked for you. - Packages must have the same folder structure as in Java (to avoid problems with tools and Java module definition).
- Follow the commit rules defined at the commit guidelines.
The Hexagon project is composed of several modules. Most of the modules publish libraries for their use by other projects (check the Hexagon Structure section of the readme file for more details).
Aside of that kind of modules, you can also find infrastructure modules: components used by the project itself. These are internal modules not intended to be directly used by users (like the starters or the site).
Hexagon build process requires Docker installed. The project also needs a JDK 11+ to compile
You can check the required software, build the project, generate the documentation and install it in your local repository typing:
git clone https://github.com/hexagonkt/hexagon.git
cd hexagon
./gradlew setUp clean build
./gradlew buildSite publishToMavenLocal
The binaries are located in the /build
directory of each module. The documentation site is in
/site/build
.
Other useful Gradle commands are:
- Help:
./gradlew help
- Tasks:
./gradlew tasks
- Module Tasks:
./gradlew [module:]tasks [--all]
- Task details:
./gradlew help --task <task>
- Package:
./gradlew clean assemble
- Build:
./gradlew build
- Rebuild:
./gradlew clean build
- Documentation:
./gradlew javadoc
- Code Analysis:
./gradlew detekt
- Test:
./gradlew test
- Run:
./gradlew ${MODULE}:run
- Profile Build:
./gradlew ${TASK} --profile
- Project Dependencies:
./gradlew dependencyReport
or./gradlew htmlDependencyReport
- Project Tasks:
./gradlew taskReport
It is recommended that you create a Git pre-push script to check the code before pushing it. As this command will be executed before pushing code to the repository (saving you time fixing GitHub Actions build errors).
This can be done executing the setUp
task by running: ./gradlew setUp
If you want to generate the documentation site, check the Hexagon's site module readme.
- Release site's dependent projects (
hexagon_extra
) - Publish their packages using the Nexus Repository Manager
- Merge Hexagon main project to
master
in GitHub - Check the site deployment is OK ([https://hexagonkt.com])
- Publish Hexagon modules using the Nexus Repository Manager
- Update starter repositories (Gradle and Maven ones)
- Update TFB benchmark
- Update example projects inside the organization
- Create a changelog to announce the release
- Publish changelog on:
- Dev.to
- Kotlin Slack
- Kotlin Weekly Newsletter
Commit messages can be filtered by types (check the commit guidelines) for details.
git log 1.2.0...1.3.0 \
--date=iso8601 \
--reverse \
--pretty=format:'* %ad %ar <%an %ae> [View](http://github.com/hexagonkt/hexagon/commit/%H) · %s' \
>>CHANGELOG.md
git log 1.2.0...1.3.0 --date=iso8601 --reverse --pretty=format:'%an %ae'|sort|uniq >>CHANGELOG.md