Contributing¶
Thanks for helping improve javalin-security.
Toolchain¶
| Tool | Version |
|---|---|
| JDK | 17 |
| Kotlin | 2.4 (build) / language & API 2.0 (consumer floor) |
| Javalin | 7.2.x |
| Build | Gradle (wrapper included) |
Dependency versions live in gradle/libs.versions.toml; the documentation site reads from
there (and from gradle.properties) via docs/main.py, so bumping a version in Gradle updates
the docs automatically. Published artifacts use kotlin-language / apiVersion so Kotlin
2.0+ consumers can compile against the library.
Building and testing¶
./gradlew assemble
./gradlew test
./gradlew e2eTest
./gradlew build
./gradlew :dokkaGenerate # → build/dokka/html
Conventions¶
- Prefer end-to-end tests with
JavalinTest; mirror scenarios in Kotlin and Java. - Assert that failure detail never leaks into responses.
- Keep the public surface Java-friendly (
@JvmStatic,@JvmField,Class-taking overloads). - Every public declaration has KDoc.
- Fail fast on unsafe configuration (
SecurityConfigurationException).
Documentation¶
Everything MkDocs-related lives under docs/: the config (docs/mkdocs.yml), the macros
helper (docs/main.py), the Python dependencies (docs/requirements.txt), and the markdown
sources (docs/content/).
- Every code sample has Kotlin and Java tabs.
- Prefer snippets adapted from
e2eTestsources. - Use admonitions for security-critical notes.
Submitting changes¶
- Fork and branch from
main. - Add or adjust tests for behavior changes.
- Run
./gradlew build(andmkdocs build -f docs/mkdocs.ymlfor doc changes). - Open a pull request.