diff --git a/.github/workflows/changelog-draft.yml b/.github/workflows/changelog-draft.yml new file mode 100644 index 0000000..b5ac133 --- /dev/null +++ b/.github/workflows/changelog-draft.yml @@ -0,0 +1,22 @@ +name: Release Drafter + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + update_release_draft: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + with: + name: next + tag: next + version: next + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..8f87b78 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,60 @@ +name: Java CI with Gradle + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + jdk: [17, 21] + runs-on: ${{ matrix.os }} + env: + JDK_VERSION: ${{ matrix.jdk }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.jdk }} + distribution: 'temurin' + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Cache Gradle packages + uses: actions/cache@v1 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + + - name: Test with Gradle + run: ./gradlew check --stacktrace --no-daemon + + gradle-scan: + name: Snyk gradle scan + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Run Snyk to check build.gradle for vulnerabilities + uses: snyk/actions/gradle-jdk17@master + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + with: + command: test + args: --severity-threshold=high --org=f310ee2f-5552-444d-84ee-ec8c44c33adb diff --git a/build.gradle b/build.gradle index 91eaf6c..a1bf811 100644 --- a/build.gradle +++ b/build.gradle @@ -5,17 +5,24 @@ buildscript { mavenLocal() } dependencies { - classpath "se.bjurr.gradle.conventional-release:se.bjurr.gradle.conventional-release.gradle.plugin:0.+" + // classpath "se.bjurr.gradle.conventional-release:se.bjurr.gradle.conventional-release.gradle.plugin:0.+" classpath "se.bjurr.gradle.java-convention:se.bjurr.gradle.java-convention.gradle.plugin:0.+" - classpath "se.bjurr.gradle.update-versions:se.bjurr.gradle.update-versions.gradle.plugin:0.+" + // classpath "se.bjurr.gradle.update-versions:se.bjurr.gradle.update-versions.gradle.plugin:0.+" } } -apply plugin: "se.bjurr.gradle.conventional-release" + +plugins { + id 'org.wiremock.tools.gradle.wiremock-extension-convention' version '0.3.0' +} + +//apply plugin: "se.bjurr.gradle.conventional-release" apply plugin: "project-report" +group 'org.wiremock.integrations' + allprojects { apply plugin: "se.bjurr.gradle.java-convention" - apply plugin: "se.bjurr.gradle.update-versions" + // apply plugin: "se.bjurr.gradle.update-versions" apply plugin: "java-library" dependencies { @@ -35,6 +42,15 @@ dependencies { api 'org.junit.jupiter:junit-jupiter-api:5.11.2' } +shadowJar { + mergeServiceFiles() + + exclude 'META-INF/maven/**' + exclude 'META-INF/versions/17/**' + exclude 'META-INF/versions/21/**' + exclude 'module-info.class' +} + project('wiremock-spring-boot-example', { dependencies { implementation "org.springframework.boot:spring-boot-starter-web:3.3.4"