{"id":18875796,"url":"https://github.com/wiremock/gradle-wiremock-extension-plugins","last_synced_at":"2025-04-14T17:31:40.164Z","repository":{"id":207174886,"uuid":"718594068","full_name":"wiremock/gradle-wiremock-extension-plugins","owner":"wiremock","description":"Gradle plugins that bundles common packaging and release logic for WireMock extensions","archived":false,"fork":false,"pushed_at":"2024-10-23T15:48:16.000Z","size":200,"stargazers_count":5,"open_issues_count":6,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-23T21:13:32.721Z","etag":null,"topics":["gradle","gradle-plugin","kotlin","wiremock"],"latest_commit_sha":null,"homepage":"","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/wiremock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2023-11-14T12:10:21.000Z","updated_at":"2024-10-23T15:59:21.000Z","dependencies_parsed_at":"2024-05-30T14:37:25.052Z","dependency_job_id":"7b3f4fd8-110a-45e2-b398-16d46c80ff2e","html_url":"https://github.com/wiremock/gradle-wiremock-extension-plugins","commit_stats":null,"previous_names":["wiremock/gradle-wiremock-extension-plugins"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremock%2Fgradle-wiremock-extension-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremock%2Fgradle-wiremock-extension-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremock%2Fgradle-wiremock-extension-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiremock%2Fgradle-wiremock-extension-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiremock","download_url":"https://codeload.github.com/wiremock/gradle-wiremock-extension-plugins/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223639348,"owners_count":17177816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gradle","gradle-plugin","kotlin","wiremock"],"created_at":"2024-11-08T06:09:12.002Z","updated_at":"2025-04-14T17:31:40.156Z","avatar_url":"https://github.com/wiremock.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gradle Convention plugin for WireMock Extensions\n\nThis convention plugin helps to Build WireMock extensions\nso that they can be hosted on Maven Central and\nreleased automatically from GitHub actions.\nSee [the Maven Central Publishing documentation](https://github.com/wiremock/community/blob/main/infra/maven-central.md) to learn more.\n\nFeatures:\n\n- Code signing and POM generation for Maven Central publishing\n- Proper shading of artifacts (work in progress)\n\n## Requirements\n\n- Gradle 8.x\n- Java 11 or 17\n\n## Wiremock dependency\n\nThis extension has a bundled wiremock dependency. Depending on the wiremock features you're using\nin your plugin, this plugin needs to be updated accordingly:\n\n| Gradle Convention plugin version | Wiremock version |\n|----------------------------------|------------------|\n| 0.4.0+                           | 3.10.0           |\n| 0.3.0+                           | 3.6.0            |\n| 0.1.0+                           | 3.3.1            |\n\n\n## Usage\n\n### Basic use\n\nSet the following `gradle.properties`:\n\n```properties\nbaseArtifact = my-test-wiremock-extension\nversion = 1.0.0-SNAPSHOT\ndescription = My Test WireMock Extension\ngithubRepo = wiremock-my-test-extension\ndeveloper.id=todo\ndeveloper.name=TODO WireMock Developer\ndeveloper.email=noreply@wiremock.org\n```\n\nIt can be tweaked a bit more, with some optional properties:\n\n```properties\nuseShadowJar = false # true by default, false will avoid creating the standalone JAR\n```\n\nUse the plugin in your `build.gradle.kts` file:\n\n```kotlin\nbuildscript {\n    repositories {\n        mavenCentral()\n    }\n}\n        \nplugins {\n    kotlin(\"jvm\") version \"$embeddedKotlinVersion\"\n    id(\"org.wiremock.tools.gradle.wiremock-extension-convention\")\n}\n```\n\nOr in Gradle:\n\n```groovy\nbuildscript {\n    repositories {\n        mavenCentral()\n    }\n}\n\nplugins {\n    id 'org.wiremock.tools.gradle.wiremock-extension-convention' version '0.1.2'\n}\n```\n\n### Shading of dependencies\n\nWhen you need to include additional dependencies,\nthey should be shaded in the `shadedJar` task:\n\n```kotlin\nimport com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar\n                \ndependencies {\n    implementation(\"com.github.ben-manes.caffeine:caffeine:3.1.8\")\n}\n\ntasks {\n    named\u003cShadowJar\u003e(\"shadowJar\") {\n        relocate(\"com.github.ben-manes.caffeine\", \"wiremock.com.github.ben-manes.caffeine\")\n        relocate(\"com.github.jknack\", \"wiremock.com.github.jknack\")\n    }\n}\n```\n\n### Release Automation\n\nTo automate releases with this extension, add the following GitHub action in `.github/workflows/`:\n\n```yaml\nname: Release\non:\n  release:\n    types: [published]\n\njobs:\n  publish:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      packages: write\n    steps:\n      - uses: actions/checkout@v3\n      - name: Set up Java\n        uses: actions/setup-java@v3\n        with:\n          java-version: '11'\n          distribution: 'adopt'\n      - name: Validate Gradle wrapper\n        uses: gradle/wrapper-validation-action@v1\n\n      - name: Determine new version\n        id: new_version\n        run: |\n          NEW_VERSION=$(echo \"${GITHUB_REF}\" | cut -d \"/\" -f3)\n          echo \"new_version=${NEW_VERSION}\" \u003e\u003e $GITHUB_OUTPUT\n\n      - name: Publish package\n        id: publish_package\n        uses: gradle/gradle-build-action@v2.9.0\n        with:\n          arguments: -Pversion=${{ steps.new_version.outputs.new_version }} publish closeAndReleaseStagingRepository\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}\n          OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}\n          OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}\n          OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}\n```\n\nOnce the request for [Maven Central Publishing authorization](https://github.com/wiremock/community/blob/main/infra/maven-central.md) is completed,\nyou can trigger the release Pipeline by just publishing a GitHub Release.\nConsider also configuring Release Drafter to automate chaangelogs.\n\n## Usage Examples\n\n- [WireMock Faker Extension](https://github.com/wiremock/wiremock-faker-extension)\n- [WireMock State Extension](https://github.com/wiremock/wiremock-state-extension)\n\n## Learn More\n\n- \"Comment nous utilisons Kotlin et Gradle pour faire évoluer la communauté WireMock\" by Oleg Nenashev at Devoxx Fance 2024\n  ([slides](https://speakerdeck.com/onenashev/devoxxfr-comment-nous-utilisons-kotlin-et-gradle-pour-faire-evoluer-la-communaute-wiremock),\n   [video](https://www.youtube.com/watch?v=pToRVRTI-Zs))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiremock%2Fgradle-wiremock-extension-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiremock%2Fgradle-wiremock-extension-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiremock%2Fgradle-wiremock-extension-plugins/lists"}