{"id":18322434,"url":"https://github.com/sureshg/build-commons","last_synced_at":"2026-03-03T23:08:51.362Z","repository":{"id":259331303,"uuid":"864766777","full_name":"sureshg/build-commons","owner":"sureshg","description":"✨ Gradle plugins and catalog for Kotlin JVM, GraalVM and Multiplatform (Native/JS/WASM/WASI) development!","archived":false,"fork":false,"pushed_at":"2026-02-27T17:15:58.000Z","size":1810,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-27T20:44:43.526Z","etag":null,"topics":["graalvm","gradle","gradle-kotlin-dsl","java","js","jvm","kotlin","kotlin-js","kotlin-jvm","kotlin-multiplatform","kotlin-native","kotlin-wasm","openjdk","wasi","wasm"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sureshg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-09-29T05:28:03.000Z","updated_at":"2026-02-27T17:04:42.000Z","dependencies_parsed_at":"2025-12-29T09:07:33.488Z","dependency_job_id":null,"html_url":"https://github.com/sureshg/build-commons","commit_stats":null,"previous_names":["sureshg/build-commons"],"tags_count":127,"template":true,"template_full_name":null,"purl":"pkg:github/sureshg/build-commons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sureshg%2Fbuild-commons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sureshg%2Fbuild-commons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sureshg%2Fbuild-commons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sureshg%2Fbuild-commons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sureshg","download_url":"https://codeload.github.com/sureshg/build-commons/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sureshg%2Fbuild-commons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30064845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graalvm","gradle","gradle-kotlin-dsl","java","js","jvm","kotlin","kotlin-js","kotlin-jvm","kotlin-multiplatform","kotlin-native","kotlin-wasm","openjdk","wasi","wasm"],"created_at":"2024-11-05T18:24:37.400Z","updated_at":"2026-03-03T23:08:51.344Z","avatar_url":"https://github.com/sureshg.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐘 Common Build Plugins\n\n[![GitHub Workflow Status][gha_badge]][gha_url]\n[![Maven Central Version][maven_img]][maven_url]\n[![OpenJDK Version][java_img]][java_url]\n[![Kotlin release][kt_img]][kt_url]\n\nGradle convention [plugins](https://docs.gradle.org/current/samples/sample_convention_plugins.html) that simplify\nbootstrapping **Kotlin/Java** projects targeting JVM, Multiplatform (Native/JS/Wasm/Wasi), and GraalVM native-image.\nFocus on writing code — these plugins handle the rest:\n\n- **Publishing** — Maven Central, GHCR, container images (Jib), artifact signing\n- **Build \u0026 Toolchain** — Java/Kotlin toolchain, target platforms (JVM, JS, WASM, WASI, Native), build config generation\n- **Coverage, Formatting \u0026 ABI** — Code coverage (JVM \u0026 KMP), code formatting, binary compatibility (ABI) validation,\n  deprecated API scanning (`jdeprscan`)\n- **Versioning** — SemVer based on Git tags\n- **Testing \u0026 Docs** — Testing, reports, JavaDoc, Dokka\n- **Benchmarking** — JMH benchmarking via [kotlinx-benchmark](https://github.com/Kotlin/kotlinx-benchmark)\n- **Processors** — KSP \u0026 annotation processors, GraalVM native-image, executable JARs\n- **Version Catalog** — Controls artifact versions and build configurations\n- **Auto-configured Dependencies** — `kotlinx-datetime`, `kotlinx-coroutines`, `ktor-client`, `kotlinx-serialization`,\n  `kotlinx-io`, logging\n- **Auto-configured Compiler Plugins** — `redacted`, `kopy`, `power-assert`, `atomicfu`, `dataframe`\n\n## 🔌 Published Plugins\n\n- `dev.suresh.plugin.root` — Root project configuration and shared settings\n- `dev.suresh.plugin.common` — Common conventions for all subprojects\n- `dev.suresh.plugin.kotlin.jvm` — Kotlin JVM project setup\n- `dev.suresh.plugin.kotlin.mpp` — Kotlin Multiplatform project setup\n- `dev.suresh.plugin.graalvm` — GraalVM native-image support\n- `dev.suresh.plugin.kotlin.docs` — Documentation generation (Dokka)\n- `dev.suresh.plugin.kotlin.benchmark` — JMH benchmarking support\n- `dev.suresh.plugin.publishing` — Maven Central publishing and signing\n- `dev.suresh.plugin.repos` — Repository configuration (settings plugin)\n- `dev.suresh.plugin.catalog` — Version catalog management\n\n## 🚀 How to Use\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e1. Configure \u003ccode\u003esettings.gradle.kts\u003c/code\u003e\u003c/b\u003e\u003c/summary\u003e\n\n```kotlin\npluginManagement {\n    resolutionStrategy {\n        eachPlugin {\n            if (requested.id.id.startsWith(\"dev.suresh.plugin\")) {\n                useVersion(\"\u003cplugin version\u003e\")\n            }\n        }\n    }\n\n    repositories {\n        gradlePluginPortal()\n        mavenCentral()\n    }\n}\n\nplugins { id(\"dev.suresh.plugin.repos\") }\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e2. Apply plugins in \u003ccode\u003ebuild.gradle.kts\u003c/code\u003e\u003c/b\u003e\u003c/summary\u003e\n\n```kotlin\n// Kotlin JVM\nplugins {\n    id(\"dev.suresh.plugin.root\")\n    id(\"dev.suresh.plugin.kotlin.jvm\")\n    id(\"dev.suresh.plugin.publishing\")\n    // id(\"dev.suresh.plugin.graalvm\")\n    application\n}\n\n// Kotlin Multiplatform\nplugins {\n    id(\"dev.suresh.plugin.root\")\n    id(\"dev.suresh.plugin.kotlin.mpp\")\n    id(\"dev.suresh.plugin.publishing\")\n}\n\nkotlin {\n    jvmTarget(project)\n    jsTarget(project)\n    wasmJsTarget(project)\n    wasmWasiTarget(project)\n    nativeTargets(project) {}\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e3. Set up the version catalog\u003c/b\u003e\u003c/summary\u003e\n\nCopy [gradle/libs.versions.toml](gradle/libs.versions.toml) and update the project-related metadata\n(`group`, `app-mainclass`, etc.).\n\n⚠️ **Don't change** the existing version names in the catalog as they are referenced by the plugins.\n\n\u003c/details\u003e\n\n## 🏗️ Build \u0026 Test\n\n\u003e [!IMPORTANT]\n\u003e Requires Java **25+** (`sdk i java 25.0.1-zulu`) and the\n\u003e latest [IntelliJ IDEA](https://www.jetbrains.com/idea/download).\n\n```bash\n# Build all modules\n$ ./gradlew build\n\n# Update dependencies\n$ junie --guidelines-filename=.aiassistant/rules/version-updates.md \"Update the dependency versions\"\n# OR\n$ ./gradlew dependencyUpdates --no-parallel\n```\n\nA separate [sandbox project](/sandbox) is available for testing with the plugins applied:\n\n```bash\n# Publish plugins to Maven local\n$ ./gradlew publishToMavenLocal\n\n# Build the sandbox app\n$ ./gradlew -p sandbox :build\n$ sandbox/build/libs/sandbox\n\n# Show task graph\n$ ./gradlew build --task-graph\n\n# Run other plugin tasks\n$ ./gradlew -p sandbox :dependencyUpdates --no-parallel\n\n# See the plugin classpath\n$ ./gradlew -p sandbox :buildEnvironment | grep -i \"dev.suresh\"\n```\n\n## 📦 Publishing a Release\n\nPush a new tag to trigger the release workflow and publish\nto [Maven Central](https://repo.maven.apache.org/maven2/dev/suresh/build/). The next version is based on the semantic\nversion scope (`major`, `minor`, `patch`).\n\n```bash\n$ ./gradlew pushSemverTag \"-Psemver.scope=patch\"\n\n# See the current version\n# $ ./gradlew v\n\n# Print the new version\n# $ ./gradlew printSemver \"-Psemver.scope=patch\"\n\n# For a specific version\n# $ git tag -am \"v1.2.3 release\" v1.2.3\n# $ git push origin --tags\n```\n\n### Verifying Artifacts\n\nThe published artifacts are signed using this [key][signing_key]. The best way to verify artifacts\nis [automatically with Gradle][gradle_verification].\n\n[gradle_verification]: https://docs.gradle.org/current/userguide/dependency_verification.html#sec:signature-verification\n\n[signing_key]: https://keyserver.ubuntu.com/pks/lookup?op=get\u0026search=0xc124db3a8ad1c13f7153decdf209c085c8b53ca1\n\n\u003cdetails\u003e\n\u003csummary\u003eMisc\u003c/summary\u003e\n\n### Maven Central Publishing\n\n  ```bash\n  # Publish to local maven repository\n  $ rm -rf ~/.m2/repository/dev/suresh\n  $ ./gradlew publishToMavenLocal\n  $ tree ~/.m2/repository/dev/suresh\n\n  # Publish the plugins to maven central\n  $ ./gradlew publishToMavenCentral\n  ```\n\n### Misc\n\n  ```bash\n  # Update the Gradle Daemon JVM\n  $ ./gradlew updateDaemonJvm --jvm-version=25 --jvm-vendor=adoptium\n  ```\n\n\u003c/details\u003e\n\n## 📚 References\n\n- [Kotlin DSL Plugin](https://docs.gradle.org/current/userguide/kotlin_dsl.html#sec:kotlin-dsl_plugin)\n- [Pre-compiled Script Plugins](https://docs.gradle.org/current/userguide/implementing_gradle_plugins_precompiled.html#sec:applying_external_plugins)\n\n\u003c!-- Badges --\u003e\n\n[java_url]: https://www.azul.com/downloads/?version=java-25-lts\u0026package=jdk#zulu\n\n[java_img]: https://img.shields.io/badge/OpenJDK-25-e76f00?logo=openjdk\u0026logoColor=e76f00\n\n[kt_url]: https://github.com/JetBrains/kotlin/releases/latest\n\n[kt_img]: https://img.shields.io/github/v/release/Jetbrains/kotlin?include_prereleases\u0026color=7f53ff\u0026label=Kotlin\u0026logo=kotlin\u0026logoColor=7f53ff\n\n[maven_img]: https://img.shields.io/maven-central/v/dev.suresh.build/project?logo=gradle\u0026logoColor=white\u0026color=00B4E6\n\n[maven_url]: https://central.sonatype.com/search?namespace=dev.suresh.build\n\n[maven_dl]: https://search.maven.org/remote_content?g=dev.suresh.build\u0026a=plugins\u0026v=LATEST\n\n[plugins_url]: https://repo.maven.apache.org/maven2/dev/suresh/plugin\n\n[gha_url]: https://github.com/sureshg/build-commons/actions/workflows/build.yml\n\n[gha_badge]: https://img.shields.io/github/actions/workflow/status/sureshg/build-commons/build.yml?branch=main\u0026color=green\u0026label=Build\u0026logo=Github-Actions\u0026logoColor=green\n\n[sty_url]: https://kotlinlang.org/docs/coding-conventions.html\n\n[sty_img]: https://img.shields.io/badge/style-Kotlin--Official-40c4ff.svg?style=for-the-badge\u0026logo=kotlin\u0026logoColor=40c4ff\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsureshg%2Fbuild-commons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsureshg%2Fbuild-commons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsureshg%2Fbuild-commons/lists"}