Skip to content

Commit

Permalink
Merge pull request #167 from samrocketman/upgrade-java
Browse files Browse the repository at this point in the history
Upgrade Ubuntu and Java compatibility
  • Loading branch information
samrocketman authored Oct 20, 2024
2 parents e3a2879 + 13b299c commit 81d31a4
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 150 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
java: [ '11', '17' ]
java: [ '17', '21' ]
groovy:
- ${{ vars.GROOVY_2_4 }}
- ${{ vars.GROOVY_2_5 }}
- ${{ vars.GROOVY_3_0 }}
- ${{ vars.GROOVY_4_0 }}
exclude:
- groovy: ${{ vars.GROOVY_2_4 }}
java: '17'
- groovy: ${{ vars.GROOVY_2_5 }}
java: '17'
#exclude:
# - groovy: ${{ vars.GROOVY_2_4 }}
# java: '21'
# - groovy: ${{ vars.GROOVY_2_5 }}
# java: '21'
name: Java ${{ matrix.java }} Groovy ${{ matrix.groovy }}
steps:
- uses: actions/checkout@v3
Expand All @@ -46,11 +46,11 @@ jobs:
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- if: ${{ !(matrix.groovy == vars.GROOVY_4_0 && matrix.java == '17') }}
name: Unit Tests
#- if: ${{ !(matrix.groovy == vars.GROOVY_4_0 && matrix.java == '17') }}
- name: Unit Tests
run: GROOVY_VERSION=${{ matrix.groovy }} ./gradlew check
- if: ${{ matrix.groovy == vars.GROOVY_4_0 && matrix.java == '17' }}
name: Coveralls Test Coverage
#- if: ${{ matrix.groovy == vars.GROOVY_4_0 && matrix.java == '17' }}
- name: Coveralls Test Coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: GROOVY_VERSION=${{ matrix.groovy }} ./gradlew coveralls
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ plugins {
id 'signing'
}

if(JavaVersion.current() != JavaVersion.VERSION_11 && JavaVersion.current() != JavaVersion.VERSION_17) {
throw new GradleException("This project requires Java 11 or Java 17, but it's running on "+JavaVersion.current())
if(JavaVersion.current() != JavaVersion.VERSION_17 && JavaVersion.current() != JavaVersion.VERSION_21) {
throw new GradleException("This project requires Java 17 or Java 21, but it's running on "+JavaVersion.current())
}

/*
Expand Down Expand Up @@ -47,9 +47,9 @@ ext.snakeYamlVersion = '2.2'
ext.bouncyCastleVersion = '1.75'
ext.codeNarcVersion = '3.2.0'

if(JavaVersion.current() == JavaVersion.VERSION_17 && Integer.parseInt(ext.groovyVersion.tokenize('.').first()) < 3) {
throw new GradleException("When using Java 17 you must use Groovy 3 or higher. Found Groovy " + ext.groovyVersion)
}
//if(JavaVersion.current() == JavaVersion.VERSION_17 && Integer.parseInt(ext.groovyVersion.tokenize('.').first()) < 3) {
// throw new GradleException("When using Java 17 you must use Groovy 3 or higher. Found Groovy " + ext.groovyVersion)
//}

if(Integer.parseInt(ext.groovyVersion.tokenize('.').first()) > 3) {
// Groovy 4 and higher
Expand All @@ -71,15 +71,15 @@ repositories {

// Address security vulnerability identified by DependencyTrack located as a
// transitive dependency within groovy-ant.
configurations.all {
/*configurations.all {
resolutionStrategy {
dependencySubstitution {
substitute module('org.apache.ant:ant:1.9.15') with module('org.apache.ant:ant:1.9.16')
substitute module('org.apache.ant:ant-antlr:1.9.15') with module('org.apache.ant:ant-antlr:1.9.16')
substitute module('org.apache.ant:ant-junit:1.9.15') with module('org.apache.ant:ant-junit:1.9.16')
}
}
}
}*/

dependencies {
//implementation "${groovyPackage}:groovy-all:${groovyVersion}"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 81d31a4

Please sign in to comment.