|
6 | 6 | [![OpenJDK Version][java_img]][java_url] |
7 | 7 | [![Kotlin release][kt_img]][kt_url] |
8 | 8 |
|
9 | | -Common project and |
10 | | -settings [gradle convention plugin](https://docs.gradle.org/current/samples/sample_convention_plugins.html) to bootstrap |
11 | | -Kotlin JVM & Multiplatform projects. |
| 9 | +Gradle project and settings [plugins](https://docs.gradle.org/current/samples/sample_convention_plugins.html) to |
| 10 | +simplify the bootstrapping of `Kotlin/Java` projects targeting JVM, Multiplatform (Native/JS/Wasm), and GraalVM |
| 11 | +native-image. The plugin will take care of configuring most common build tasks, including: |
| 12 | + |
| 13 | +* Maven central publishing for artifacts & Container image (`Jib`) of Kotlin/Java projects |
| 14 | +* Custom repo (`GHCR`) for artifacts and container images |
| 15 | +* Code coverage supporting JVM, Kotlin Multiplatform projects. |
| 16 | +* Project Versioning (`SemVer`) based on Git tags |
| 17 | +* Code Formatting to enforce consistent code style |
| 18 | +* Artifact Signing |
| 19 | +* Java/Kotlin Toolchains configuration |
| 20 | +* Target platforms (`JVM`, `JS`, `WASM`, `Native`) configuration |
| 21 | +* Testing & Reports |
| 22 | +* `KSP` & Annotation processors |
| 23 | +* GraalVM Native Image |
| 24 | +* Documentation (`JavaDoc`, `Dokka`) |
| 25 | +* Benchmarking (`JMH`) |
| 26 | +* API binary compatibility validation |
| 27 | +* Deprecated API scanning (using `jdeprscan`) |
| 28 | +* Builds truly executable JAR files |
| 29 | +* Build config generation |
| 30 | +* Version catalog to control artifact versions and build configurations. |
| 31 | +* Automatic configuration of essential dependencies such as: |
| 32 | + * `kotlinx-datetime` |
| 33 | + * `kotlinx-coroutines` |
| 34 | + * `ktor-client`, |
| 35 | + * `kotlinx-serialization` |
| 36 | + * `kotlinx-io` |
| 37 | + * `Logging` |
| 38 | +* Automatic configuration of `compiler plugins` like |
| 39 | + * `redacted` |
| 40 | + * `kopy` |
| 41 | + * `power-assert` |
| 42 | + * `atomicfu` |
| 43 | +* And other common build tasks. |
| 44 | + |
| 45 | +This plugin helps you focus on writing code, not configuring your build. It provides a solid foundation for your |
| 46 | +Kotlin/Java projects, handling the boilerplate and common tasks so you can get started quickly. |
| 47 | + |
| 48 | +## Dev Env Setup |
| 49 | + |
| 50 | +* Install Java 21 or later |
12 | 51 |
|
13 | | -### Install Java 21 |
| 52 | + ```bash |
| 53 | + $ curl -s "https://get.sdkman.io" | bash |
| 54 | + $ sdk i java 21.0.6-zulu |
| 55 | + ``` |
14 | 56 |
|
15 | | -```bash |
16 | | -$ curl -s "https://get.sdkman.io" | bash |
17 | | -$ sdk i java 21.0.6-zulu |
18 | | -``` |
| 57 | +* Import the Gradle project. The initial sync may take some time as it downloads all dependencies. |
| 58 | + |
| 59 | +> [!IMPORTANT] |
| 60 | +> For a better, faster experience, use the latest version of [IntelliJ IDEA](https://www.jetbrains.com/idea/download). |
| 61 | +> Upgrade now! |
19 | 62 |
|
20 | 63 | ### Build & Testing |
21 | 64 |
|
@@ -53,18 +96,18 @@ The next version will be based on the semantic version scope (`major`, `minor`, |
53 | 96 |
|
54 | 97 | ### Published Plugins |
55 | 98 |
|
56 | | -| **Gradle Plugin ID** | **Version** | |
57 | | -|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
58 | | -| `dev.suresh.plugin.root` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
59 | | -| `dev.suresh.plugin.common` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
60 | | -| `dev.suresh.plugin.graalvm` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
61 | | -| `dev.suresh.plugin.kotlin.jvm` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
62 | | -| `dev.suresh.plugin.kotlin.mpp` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
63 | | -| `dev.suresh.plugin.kotlin.docs` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
64 | | -| `dev.suresh.plugin.kotlin.benchmark` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
65 | | -| `dev.suresh.plugin.publishing` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
66 | | -| `dev.suresh.plugin.repos` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
67 | | -| `dev.suresh.plugin.catalog` | [](https://repo1.maven.org/maven2/dev/suresh/plugin/) | |
| 99 | +| **Gradle Plugin ID** | **Version** | |
| 100 | +|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 101 | +| `dev.suresh.plugin.root` | [][plugins_url] | |
| 102 | +| `dev.suresh.plugin.common` | [][plugins_url] | |
| 103 | +| `dev.suresh.plugin.graalvm` | [][plugins_url] | |
| 104 | +| `dev.suresh.plugin.kotlin.jvm` | [][plugins_url] | |
| 105 | +| `dev.suresh.plugin.kotlin.mpp` | [][plugins_url] | |
| 106 | +| `dev.suresh.plugin.kotlin.docs` | [][plugins_url] | |
| 107 | +| `dev.suresh.plugin.kotlin.benchmark` | [][plugins_url] | |
| 108 | +| `dev.suresh.plugin.publishing` | [][plugins_url] | |
| 109 | +| `dev.suresh.plugin.repos` | [][plugins_url] | |
| 110 | +| `dev.suresh.plugin.catalog` | [][plugins_url] | |
68 | 111 |
|
69 | 112 | ### Verifying Artifacts |
70 | 113 |
|
@@ -120,6 +163,8 @@ is [automatically with Gradle][gradle_verification]. |
120 | 163 |
|
121 | 164 | [maven_dl]: https://search.maven.org/remote_content?g=dev.suresh.build&a=plugins&v=LATEST |
122 | 165 |
|
| 166 | +[plugins_url]: https://repo.maven.apache.org/maven2/dev/suresh/plugin |
| 167 | + |
123 | 168 | [gha_url]: https://github.com/sureshg/build-commons/actions/workflows/build.yml |
124 | 169 |
|
125 | 170 | [gha_badge]: https://img.shields.io/github/actions/workflow/status/sureshg/build-commons/build.yml?branch=main&color=green&label=Build&logo=Github-Actions&logoColor=green |
|
0 commit comments