{"id":30749285,"url":"https://github.com/jenkinsci/gradle-convention-plugin","last_synced_at":"2026-04-18T22:12:55.956Z","repository":{"id":298521696,"uuid":"996259738","full_name":"jenkinsci/gradle-convention-plugin","owner":"jenkinsci","description":"Smarter Jenkins plugin builds with Gradle - simple, fast, and modern.","archived":false,"fork":false,"pushed_at":"2026-04-14T19:55:02.000Z","size":55084,"stargazers_count":7,"open_issues_count":10,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-14T20:18:39.487Z","etag":null,"topics":["convention-plugin","gradle","gradle-plugin","jenkins","jenkins-ci","jenkins-plugin","kotlin","kotlin-dsl","plugin-development"],"latest_commit_sha":null,"homepage":"https://community.gradle.org/events/gsoc/2025/jenkins-plugins-toolchain/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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":null,"dco":null,"cla":null},"funding":{"community_bridge":"jenkins","custom":["https://www.jenkins.io/donate/#why-donate"]}},"created_at":"2025-06-04T17:31:39.000Z","updated_at":"2026-04-14T19:55:07.000Z","dependencies_parsed_at":"2025-06-11T15:33:21.268Z","dependency_job_id":"706ab3d2-fb73-458b-80fe-5d16498051ae","html_url":"https://github.com/jenkinsci/gradle-convention-plugin","commit_stats":null,"previous_names":["aaravmahajanofficial/jenkins-gradle-convention-plugin"],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/jenkinsci/gradle-convention-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgradle-convention-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgradle-convention-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgradle-convention-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgradle-convention-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/gradle-convention-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgradle-convention-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31986566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: 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":["convention-plugin","gradle","gradle-plugin","jenkins","jenkins-ci","jenkins-plugin","kotlin","kotlin-dsl","plugin-development"],"created_at":"2025-09-04T06:03:17.137Z","updated_at":"2026-04-18T22:12:55.913Z","avatar_url":"https://github.com/jenkinsci.png","language":"Kotlin","funding_links":["https://funding.communitybridge.org/projects/jenkins","https://www.jenkins.io/donate/#why-donate"],"categories":[],"sub_categories":[],"readme":"# Jenkins Gradle Convention Plugin\n\n[![CI](https://img.shields.io/github/actions/workflow/status/jenkinsci/gradle-convention-plugin/ci.yml?logo=github\u0026style=for-the-badge\u0026label=CI\u0026labelColor=2a3137)](https://github.com/aaravmahajanofficial/jenkins-gradle-convention-plugin/actions/workflows/ci.yml)\n[![Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/io.github.aaravmahajanofficial.jenkins-gradle-convention-plugin?logo=gradle\u0026label=Plugin%20Portal\u0026style=for-the-badge\u0026labelColor=277A7A\u0026color=2D8B8B)](https://plugins.gradle.org/plugin/io.github.aaravmahajanofficial.jenkins-gradle-convention-plugin)\n[![License](https://img.shields.io/badge/License-Apache_2.0-1155ba.svg?style=for-the-badge\u0026labelColor=0d479f\u0026logo=apache)](https://opensource.org/licenses/Apache-2.0)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-fe5196?style=for-the-badge\u0026logo=conventionalcommits\u0026logoColor=white\u0026labelColor=d63b78)](https://conventionalcommits.org)\n[![Slack](https://img.shields.io/badge/Slack-%23jenkins--plugin--toolchain-7c3085?style=for-the-badge\u0026logo=slack\u0026logoColor=white\u0026\u0026labelColor=6b2a73)](https://gradle-community.slack.com/archives/C08S0GKMB5G)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/img/logo.png\" alt=\"Banner Logo\" width=\"600\"\u003e\n\u003c/p\u003e\n\n**Jenkins Gradle Convention Plugin** is a Kotlin-first Gradle convention plugin that eliminates boilerplate and standardizes Jenkins plugin development using Gradle. It provides automated quality checks, CI-friendly defaults, and a unified foundation for building, testing, and publishing Jenkins plugins.\n\nBuilt on the proven [gradle-jpi-plugin](https://github.com/jenkinsci/gradle-jpi-plugin) with enhanced conventions and integrated tooling, so developers can focus on plugin logic rather than build configuration.\n\n## Getting Started\n\n### Step 1: Define the plugin in the projects `libs.versions.toml` file\n\n```toml\n[versions]\njenkinsConvention = \"\u003cLATEST_VERSION\u003e\"\n\n[plugins]\njenkinsConvention = { id = \"io.github.aaravmahajanofficial.jenkins-gradle-convention-plugin\", version.ref = \"jenkinsConvention\" }\n```\n\n### Step 2: Configure the Version Catalog\n\nIn the root `settings.gradle.kts`, add the plugin’s version catalog:\n\n```kts\ndependencyResolutionManagement {\n    repositories {\n        mavenCentral()\n    }\n    versionCatalogs {\n        create(\"baseLibs\") {\n            from(\"io.github.aaravmahajanofficial:version-catalog:\u003cLATEST_VERSION\u003e\")\n        }\n    }\n}\n```\n\n### Step 3: Basic Build Script\n\n```kotlin\nplugins {\n    alias(libs.plugins.jenkinsConvention)\n}\n\njenkinsConvention {\n    // Only override the defaults that need to be customized for your plugin.\n\n    // Set the Jenkins version (default: as per version catalog).\n    jenkinsVersion = \"2.525\"\n}\n```\n\n## Features\n\n### Language \u0026 Build Conventions\n\n**Modern Language Standards Enforcement**\n\n- Java 21 via toolchains\n- Kotlin explicit API mode for better maintainability\n- Groovy 4+ conventions for all source sets\n- Cross-language compatibility and best practices\n\n### Smart Dependency Management\n\n**Automatic BOM (Bill of Materials) Alignment**\n\nGoodbye, [_dependency\nhell_](https://en.wikipedia.org/wiki/Dependency_hell).\n\n- **Zero Version Conflicts**: All major dependencies automatically aligned\n- **Supported BOMs**: Jenkins Core, Spring, Jackson, Jetty, Netty, SLF4J, Guava, Log4j, Vert.x, JUnit, Mockito,\n  Testcontainers\n- **Custom BOM Support**: Project-specific BOMs with runtime/test scoping\n\n### Comprehensive Quality Gates\n\n\u003e [!NOTE]\n**Quality tools are applied conditionally based on project sources.**\n\n| Category            | Tools                  | Languages                        | Purpose                                 |\n|---------------------|------------------------|----------------------------------|-----------------------------------------|\n| **Code Style**      | Spotless               | Java, Kotlin, Groovy, JSON, YAML | Universal formatting and style          |\n|                     | Checkstyle             | Java                             | Java-specific style checks              |\n|                     | Codenarc               | Groovy                           | Groovy-specific style checks            |\n| **Static Analysis** | PMD                    | Java                             | Java bug detection and best practices   |\n|                     | SpotBugs               | Java                             | Java bytecode analysis for bugs         |\n|                     | Detekt                 | Kotlin                           | Kotlin-specific linting and style       |\n| **Security**        | OWASP Dependency-Check | All                              | Vulnerability scanning for dependencies |\n| **Coverage**        | Jacoco                 | Java, Groovy                     | JVM test coverage enforcement           |\n|                     | Kover                  | Kotlin                           | Kotlin-native coverage analysis         |\n| **Testing**         | Pitest                 | Java                             | Mutation testing for robust test suites |\n| **Frontend**        | ESLint                 | JavaScript, TypeScript           | Frontend code quality                   |\n| **Documentation**   | Dokka                  | Kotlin                           | Kotlin API documentation                |\n| **Duplication**     | CPD                    | Java, Groovy                     | Copy-paste detection                    |\n\n**Unified Reporting**\n\n- All reports in standard locations (`build/reports/`)\n- Multiple formats: `HTML`, `XML`, `SARIF`\n- CI-ready integration with `check` lifecycle\n\n### Modern Testing Ecosystem\n\n**Preconfigured Testing Stack**\n\n- JUnit Jupiter 5.x - Modern test framework\n- Kotest - Kotlin-native testing\n- MockK \u0026 Mockito - Comprehensive mocking\n- AssertJ - Fluent assertions\n- Spock - Groovy testing framework\n- Testcontainers - Integration testing\n\n**Optimized Execution**\n\n- Forked JVMs with sensible memory defaults\n- Parallel test execution\n- Structured logging and reporting\n\n### Configuration \u0026 Extensibility\n\n**Multiple Configuration Approaches**\n\n- Properties-based: Perfect for CI/CD environments\n- DSL-based: Rich, type-safe configuration in build scripts\n- Multi-module support: Consistent conventions across large projects\n- Kotlin DSL optimized: First-class Kotlin build script support\n\n## Usage Examples\n\n### Customizing BOMs\n\nBy default, common BOMs (like Jackson) are applied automatically.\nYou can disable or add your own:\n\n```kotlin\njenkinsConvention {\n    bom {\n        // Disable a default BOM\n        jackson { enabled = false }\n\n        // Add a custom BOM\n        customBoms {\n            create(\"aws-bom\") {\n                coordinates = \"com.amazonaws:aws-java-sdk-bom\"\n                version = \"\u003cAWS_BOM_VERSION\u003e\"\n                testOnly = false\n            }\n        }\n    }\n}\n```\n\n### Customizing Quality Tools\n\nThe plugin integrates Spotless, OWASP Dependency Check, Detekt, and more.\nYou can enforce stricter rules or relax defaults:\n\n```kotlin\njenkinsConvention {\n    quality {\n        spotless {\n            enabled = false\n        }\n        detekt {\n            failOnViolation = false // Default: true\n        }\n        owaspDepCheck {\n            enabled = true\n            failOnCvss = 7.5f // Default: 7.0f\n        }\n    }\n}\n```\n\n---\n\n## Project Structure\n\n- **`convention-plugin/src/main/kotlin`**: Core plugin implementation\n- **`convention-plugin/src/integrationTest`**: Comprehensive integration tests\n- **`build-logic`**: Reusable convention and quality plugins\n- **`version-catalogs`**: Centralized dependency versions (libs.versions.toml)\n\n## Contributing\n\nWant to help improve this plugin?\n\n- Fork and open an issue or submit a pull request for any bugs/improvements.\n- Review\n  [CONTRIBUTING.md](https://github.com/aaravmahajanofficial/jenkins-gradle-convention-plugin/blob/main/CONTRIBUTING.md)\n  for guidelines.\n\n## Additional Resources\n\n- [ Gradle Community Project Page ](https://community.gradle.org/events/gsoc/2025/jenkins-plugins-toolchain/) - Overview\n  of the project's goals and progress\n- [Jenkins.io Blog](https://www.jenkins.io/blog/2025/08/31/aarav-mahajan-gsoc-gradle-convention-plugin-for-jenkins-plugin-development/)\n- [ Gradle Plugin Portal ](https://plugins.gradle.org/plugin/io.github.aaravmahajanofficial.jenkins-gradle-convention-plugin/) -\n  Official plugin page with installation instructions.\n- **Community/Support**: Join the `#jenkins-plugin-toolchain` channel on\n  the [Gradle Community Slack](https://community.gradle.org/contributing/community-slack/).\n\n## Acknowledgements\n\nThis project started as part of my [Google Summer of Code 2025](https://summerofcode.withgoogle.com/programs/2025/projects/3ujOIGDx) work, under the guidance\nof mentors [Oleg Nenashev](https://github.com/oleg-nenashev), [Steve Hill](https://github.com/sghill), and [Rahul Somasunderam](https://github.com/rahulsom), in collaboration with Kotlin Foundation, Gradle and Netflix.\n\n## License\n\n© 2025 Aarav Mahajan. All rights reserved.\n\nThis project is licensed under the Apache License 2.0. See the [LICENSE](https://github.com/aaravmahajanofficial/jenkins-gradle-convention-plugin/blob/main/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fgradle-convention-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fgradle-convention-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fgradle-convention-plugin/lists"}