Skip to content

Commit

Permalink
Update dependencies and ability to pass in compile version (#314)
Browse files Browse the repository at this point in the history
* Update dependencies and ability to pass in compile version

* Attempt to Fix codeQL

* Add Java 21 and update some GH actions

* Update some GH actions

* Fixes after review
  • Loading branch information
karianna authored Jan 2, 2024
1 parent 205ae89 commit 7aecfbd
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 38 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
fail-fast: false
matrix:
language: [ 'java' ]
java: [11, 17, 21]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

Expand All @@ -42,7 +43,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -52,8 +53,8 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -66,5 +67,15 @@ jobs:
# make bootstrap
# make release

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
cache: 'maven'

- name: Build with Maven
run: ./mvnw -B verify -Dmaven.compiler.release=${{ matrix.java }} --file pom.xml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
3 changes: 1 addition & 2 deletions .github/workflows/early_access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up JDK 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
with:
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
java-version: 11
distribution: 'microsoft'
cache: 'maven'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [11, 17]
java: [11, 17, 21]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
cache: 'maven'

- name: Build with Maven
run: ./mvnw -B verify --file pom.xml
run: ./mvnw -B verify -Dmaven.compiler.release=${{ matrix.java }} --file pom.xml
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Setup Java JDK
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
java-version: '11'
distribution: 'microsoft'
Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
18 changes: 12 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,31 @@ or contact [[email protected]](mailto:[email protected]) with any addi
## Submit an Issue

if you wish to contribute to GCToolKit we would kindly ask that you submit an issue to the issue tracker. Doing so will help with the management of the project.

## Build

The build requires JDK 11, and uses the Maven wrapper (`mvnw`) to help ensure reproducible builds and so we don't force you to change your system Maven install. If you prefer to build with your local Maven installation, make sure the version matches the one in the project's [.mvn/wrapper/maven-wrapper.properties](https://github.com/microsoft/gctoolkit/blob/main/.mvn/wrapper/maven-wrapper.properties) file.
The build requires JDK 11 and uses the Maven wrapper (`mvnw`) to help ensure reproducible builds and so we don't force you to change your system Maven install. If you prefer to build with your local Maven installation, make sure the version matches the one in the project's [.mvn/wrapper/maven-wrapper.properties](https://github.com/microsoft/gctoolkit/blob/main/.mvn/wrapper/maven-wrapper.properties) file. You can also use JDK 17 or 21 by passing in `-Dmaven.compiler.release=<17|21>` as an extra property to any of the `./mvnw` commands below.

* `mvnw clean` - remove build artifacts
* `mvnw compile` - compile the source code
* `./mvnw clean` - remove build artifacts
* `./mvnw compile` - compile the source code.

## Test

You can execute test cases with following command.

* `mvnw test` - run unit tests (this project uses JUnit 5)
* `./mvnw test` - run unit tests (this project uses JUnit 5)

## Package

The packaging is vanilla Maven.

* `mvnw package` - create the binaries.
* `./mvnw package` - create the binaries.

## Site

The packaging is vanilla Maven.

* `./mvnw site` - create the site with reports on source code analysis etc.

## Deploy / Publish

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ The GCToolKit artifacts are in [Maven Central](https://search.maven.org/search?q
<dependency>
<groupId>com.microsoft.gctoolkit</groupId>
<artifactId>api</artifactId>
<version>3.0.0</version>
<version>3.0.4</version>
</dependency>

<dependency>
<groupId>com.microsoft.gctoolkit</groupId>
<artifactId>parser</artifactId>
<version>3.0.0</version>
<version>3.0.4</version>
</dependency>

<dependency>
<groupId>com.microsoft.gctoolkit</groupId>
<artifactId>vertx</artifactId>
<version>3.0.0</version>
<version>3.0.4</version>
</dependency>

...
Expand Down
35 changes: 18 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,42 +56,43 @@

<properties>
<revision>3.0.3-SNAPSHOT</revision>
<checkstyle.version>10.12.4</checkstyle.version>
<jreleaser.plugin.version>1.7.0</jreleaser.plugin.version>
<junit5.version>5.10.0</junit5.version>
<checkstyle.version>10.12.6</checkstyle.version>
<jreleaser.plugin.version>1.9.0</jreleaser.plugin.version>
<junit5.version>5.10.1</junit5.version>
<maven.antrun-plugin.version>3.1.0</maven.antrun-plugin.version>
<maven.changes-plugin.version>2.12.1</maven.changes-plugin.version>
<maven.checkstyle-plugin.version>3.3.1</maven.checkstyle-plugin.version>
<maven.clean-plugin.version>3.3.2</maven.clean-plugin.version>
<maven.compiler-plugin.version>3.11.0</maven.compiler-plugin.version>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler-plugin.version>3.12.1</maven.compiler-plugin.version>
<!-- Commented out as we pass this parameter in so we can execute a matrix of builds -->
<maven.compiler.release>11</maven.compiler.release>
<maven.dependency-plugin.version>3.6.1</maven.dependency-plugin.version>
<maven.deploy-plugin.version>3.1.1</maven.deploy-plugin.version>
<maven.directory-maven-plugin.version>1.0</maven.directory-maven-plugin.version>
<maven.enforcer-plugin.version>3.4.1</maven.enforcer-plugin.version>
<maven.exec-plugin.version>3.1.0</maven.exec-plugin.version>
<maven.exec-plugin.version>3.1.1</maven.exec-plugin.version>
<maven.install-plugin.version>3.1.1</maven.install-plugin.version>
<maven.jacoco-plugin.version>0.8.11</maven.jacoco-plugin.version>
<maven.jar-plugin.version>3.3.0</maven.jar-plugin.version>
<maven.javadoc-plugin.version>3.6.0</maven.javadoc-plugin.version>
<maven.javadoc-plugin.version>3.6.3</maven.javadoc-plugin.version>
<maven.jxr-plugin.version>3.3.1</maven.jxr-plugin.version>
<maven.license-plugin.version>2.3.0</maven.license-plugin.version>
<maven.pmd-plugin.version>3.21.0</maven.pmd-plugin.version>
<maven.project-info-reports-plugin.version>3.4.5</maven.project-info-reports-plugin.version>
<maven.pmd-plugin.version>3.21.2</maven.pmd-plugin.version>
<maven.project-info-reports-plugin.version>3.5.0</maven.project-info-reports-plugin.version>
<maven.rat-plugin.version>0.15</maven.rat-plugin.version>
<maven.resources-plugin.version>3.3.1</maven.resources-plugin.version>
<maven.site-plugin.version>4.0.0-M11</maven.site-plugin.version>
<maven.site-plugin.version>4.0.0-M13</maven.site-plugin.version>
<maven.source-plugin.version>3.3.0</maven.source-plugin.version>
<maven.spotbugs-plugin.version>4.7.3.6</maven.spotbugs-plugin.version>
<maven.surefire-plugin.version>3.2.1</maven.surefire-plugin.version>
<maven.version>3.9.5</maven.version>
<maven.spotbugs-plugin.version>4.8.2.0</maven.spotbugs-plugin.version>
<maven.surefire-plugin.version>3.2.3</maven.surefire-plugin.version>
<maven.version>3.9.6</maven.version>
<maven.versions-plugin.version>2.16.1</maven.versions-plugin.version>
<mutability.detector.version>0.9.1</mutability.detector.version>
<pmd.version>6.55.0</pmd.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.github.repository>microsoft/gctoolkit</project.github.repository>
<repository.url>[email protected]:${project.github.repository}.git</repository.url>
<spotbugs.version>4.8.0</spotbugs.version>
<spotbugs.version>4.8.3</spotbugs.version>
</properties>

<modules>
Expand Down Expand Up @@ -195,8 +196,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler-plugin.version}</version>
<configuration>
<source>17</source>
<target>17</target>
<source>{maven.compiler.release}</source>
<target>{maven.compiler.release}</target>
<compilerArgs>
<arg>--module-version=${project.version}</arg>
<arg>-Xlint:unchecked</arg>
Expand Down Expand Up @@ -389,7 +390,7 @@
<plugin>
<groupId>org.hjug.refactorfirst.plugin</groupId>
<artifactId>refactor-first-maven-plugin</artifactId>
<version>0.4.0</version>
<version>0.5.0-M1</version>
<!-- optional -->
<configuration>
<showDetails>true</showDetails>
Expand Down
2 changes: 1 addition & 1 deletion vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>4.4.6</version>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down

0 comments on commit 7aecfbd

Please sign in to comment.