Skip to content

Commit

Permalink
Bump gradle. Build with Java 11. Use newer 'release' flag to conrol a…
Browse files Browse the repository at this point in the history
…rtifact compatibility
  • Loading branch information
bobbylight committed Nov 23, 2024
1 parent 0e9d8d3 commit 3dae0a4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'

# Initializes the CodeQL tools for scanning.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:

strategy:
matrix:
java: [ '8', '11', '17', '21']
java: [ '11', '17', '21', '23']

steps:
- uses: actions/checkout@v4

- name: Verify gradle wrapper
uses: gradle/actions/wrapper-validation@v4
if: matrix.java == '8'
if: matrix.java == '11'

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
Expand Down
9 changes: 3 additions & 6 deletions RSyntaxTextArea/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import static org.gradle.api.JavaVersion.*

['base', 'jacoco', 'biz.aQute.bnd.builder', 'distribution', 'maven-publish', 'signing'].each { apply plugin: it }

// We require building with JDK 8 or later. We turn off doclint since our
// generated *TokenMakers have horrible documentation (see https://github.com/jflex-de/jflex/issues/182)
assert current().isJava8Compatible()
// Turn off doclint since our generated *TokenMakers have horrible
// documentation (see https://github.com/jflex-de/jflex/issues/182)
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
Expand Down Expand Up @@ -36,7 +33,7 @@ jar {
'Implementation-Version': version,
'Bundle-License': 'BSD-3-Clause',
// Not sure why Require-Capability is not being added by the osgi plugin...
'Require-Capability': 'osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=' + javaVersion + '))"')
'Require-Capability': 'osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.' + osgiRequiredCompatibility + '))"')
}
}
test {
Expand Down
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ plugins {
id 'com.github.spotbugs' version '5.2.5'
}

// We require building with JDK 11 or later. Built artifact compatibility
// is controlled by javaLanguageVersion
assert JavaVersion.current().isJava11Compatible()

group 'com.fifesoft'
// NOTE: Local Java 8: /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home
// NOTE: Local Java 11: /Library/Java/JavaVirtualMachines/jdk-11.0.25+9/Contents/Home

allprojects {

Expand All @@ -24,7 +28,7 @@ allprojects {
}

wrapper {
gradleVersion = '8.10.2'
gradleVersion = '8.11.1'
}
}

Expand Down Expand Up @@ -81,8 +85,7 @@ subprojects {
}

compileJava {
sourceCompatibility javaVersion.toString()
targetCompatibility javaVersion.toString()
options.release = Integer.parseInt(javaLanguageVersion)
options.debug = true
options.debugOptions.debugLevel = 'source,vars,lines'
options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Note that Maven- and signing-related properties are in <maven-home>/gradle.properties
javaVersion=1.8
javaLanguageVersion=8
osgiRequiredCompatibility=1.8
version=3.5.3-SNAPSHOT

# Ugh, see https://github.com/gradle/gradle/issues/11308
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 3dae0a4

Please sign in to comment.