Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "jsonschema2pojo-gradle-plugin/example/android"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand All @@ -15,3 +11,19 @@ updates:
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "gradle"
directory: "/jsonschema2pojo-gradle-plugin"
schedule:
interval: "monthly"
- package-ecosystem: "gradle"
directory: "/jsonschema2pojo-gradle-plugin/example/android"
schedule:
interval: "monthly"
- package-ecosystem: "gradle"
directory: "/jsonschema2pojo-gradle-plugin/example/java"
schedule:
interval: "monthly"
- package-ecosystem: "maven"
directory: "/jsonschema2pojo-maven-plugin/example"
schedule:
interval: "monthly"
32 changes: 0 additions & 32 deletions .github/workflows/android-ci.yml

This file was deleted.

143 changes: 128 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: CI

on:
Expand All @@ -11,24 +10,138 @@ on:
workflow_dispatch:

jobs:
test:
project-test:
runs-on: ubuntu-latest
continue-on-error: true # allow jobs to complete even if some fail
strategy:
matrix:
java_version: [8]
java: [8]
max-parallel: 4
name: Test JDK ${{ matrix.java_version }}
name: JDK ${{ matrix.java }} | Project
steps:
- name: Setup Maven Action
uses: s4u/[email protected]
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
checkout-fetch-depth: 0
java-version: ${{ matrix.java_version }}
java-distribution: temurin
maven-version: 3.8.7
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: maven

- name: Verify with Maven
run: mvn verify -B
- name: Verify jsonschema2pojo-gradle-plugin integration tests
run: |
mvn -U -B install -DskipTests -Dmaven.javadoc.skip -Dmaven.site.skip -pl jsonschema2pojo-gradle-plugin -am
mvn -U -B install -pl jsonschema2pojo-gradle-plugin
run: ./mvnw verify -B

- name: Prepare for next jobs - Install current SNAPSHOT
run: ./mvnw -U -B install -DskipTests -Dmaven.javadoc.skip -Dmaven.site.skip

- name: Prepare for next jobs - Upload org.jsonschema2pojo artifacts (per JDK)
uses: actions/upload-artifact@v4
with:
name: m2-jsonschema2pojo-jdk${{ matrix.java }}
path: ~/.m2/repository/org/jsonschema2pojo
if-no-files-found: error

gradle-example-android:
needs: project-test
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
build-java: [8]
run:
- { java: 8, gradle: '7.6.4' } # AGP Java 8 => Gradle 7.6.4 (MavenPlugin legacy)
- { java: 11, gradle: '7.6.4' }
- { java: 17, gradle: '8.9' }
- { java: 21, gradle: '8.9' }
name: JDK ${{ matrix.build-java }} | Example Gradle (Android) | run on Java ${{ matrix.run.java }}
steps:
- uses: actions/checkout@v3

- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.1

- name: Download m2 org.jsonschema2pojo (matching build-java)
uses: actions/download-artifact@v4
with:
name: m2-jsonschema2pojo-jdk${{ matrix.build-java }}
path: ~/.m2/repository/org/jsonschema2pojo

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.run.java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{ matrix.run.gradle }}

- name: Build Gradle example (Android)
working-directory: jsonschema2pojo-gradle-plugin/example/android
run: gradle --warning-mode all --info assembleDebug

gradle-example-java:
needs: project-test
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
build-java: [8]
run-java: [8, 11, 17, 21]
name: JDK ${{ matrix.build-java }} | Example Gradle (Java) | run on Java ${{ matrix.run-java }}
steps:
- uses: actions/checkout@v3

- name: Download m2 org.jsonschema2pojo (matching build-java)
uses: actions/download-artifact@v4
with:
name: m2-jsonschema2pojo-jdk${{ matrix.build-java }}
path: ~/.m2/repository/org/jsonschema2pojo

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.run-java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.9

- name: Build Gradle example (Java)
working-directory: jsonschema2pojo-gradle-plugin/example/java
run: gradle --warning-mode all --info build

maven-example:
needs: project-test
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
build-java: [8]
run-java: [8, 11, 17, 21]
name: JDK ${{ matrix.build-java }} | Example Maven | run on Java ${{ matrix.run-java }}
steps:
- uses: actions/checkout@v3

- name: Download m2 org.jsonschema2pojo (matching build-java)
uses: actions/download-artifact@v4
with:
name: m2-jsonschema2pojo-jdk${{ matrix.build-java }}
path: ~/.m2/repository/org/jsonschema2pojo

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.run-java }}

- name: Setup Maven
uses: s4u/[email protected]
with:
maven-version: 3.9.9

- name: Build Maven example
working-directory: jsonschema2pojo-maven-plugin/example
run: mvn package
2 changes: 2 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature branches make pull requests easier as GitHub will keep your pull request

To compile, unit test, package, and run the integration test suite (the typical full build), use:

`mvn clean verify`
`./mvnw clean verify`

## 3. Add integration tests

Expand Down
2 changes: 1 addition & 1 deletion jsonschema2pojo-gradle-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ generated source files.

It can be useful to build this project and try out changes in your existing gradle project.

1. From the root, run `mvn clean install`. This will install jsonschema2pojo in your local maven repository.
1. From the root, run `./mvnw clean install`. This will install jsonschema2pojo in your local maven repository.
2. Include the local repo in your build.gradle, and change your dependency to use the `latest.integration` version e.g.:

```groovy
Expand Down
Binary file not shown.

This file was deleted.

Loading
Loading