Skip to content

Commit

Permalink
JDK11+ nashorn scripting, SecurityManager update, Gradle 7.6 (#1426)
Browse files Browse the repository at this point in the history
* Use openjdk nashorn dependency for scripting
* JDK 11+ buildable (nashorn is not built with 8)
* Gradle and dependency upgrades
  • Loading branch information
tcnh authored Oct 29, 2023
1 parent b82f9f8 commit 389bb59
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 163 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-fitnesse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
java-version: '11'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
Expand Down
1 change: 1 addition & 0 deletions FitNesseRoot/FitNesse/ReleaseNotes/content.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
!2 Pending Changes
* Drop Java 8 compatibility and compile with Java 11, Use OpenJDK's nashorn dependency to evaluate JS expressions ([[1426][https://github.com/unclebob/fitnesse/pull/1426]])

!2 20230503
* Add date and page history link to XML responses. ([[1396][https://github.com/unclebob/fitnesse/issues/1396]])
Expand Down
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.6.0'
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.9.0'
}
}

Expand Down Expand Up @@ -62,7 +62,7 @@ sourceSets {

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
languageVersion.set(JavaLanguageVersion.of(11))
}
}

Expand All @@ -79,6 +79,8 @@ dependencies {
implementation "org.json:json:20230618"
implementation "com.googlecode.java-diff-utils:diffutils:1.3.0"
implementation "org.apache.commons:commons-text:1.10.0"
implementation "org.openjdk.nashorn:nashorn-core:15.4"

compileOnly gradleApi()
compileOnly "org.apache.ant:ant:1.10.13"
compileOnly "junit:junit:4.13.2"
Expand Down Expand Up @@ -180,6 +182,7 @@ jar {
}

task standaloneJar(type: Jar) {
duplicatesStrategy = 'include'
dependsOn jar
archiveBaseName = 'fitnesse'
archiveClassifier = 'standalone'
Expand Down Expand Up @@ -296,7 +299,7 @@ nexusPublishing {
}

wrapper {
gradleVersion = '6.9.1'
gradleVersion = '7.6'
}


Expand Down
6 changes: 5 additions & 1 deletion buildSrc/src/main/groovy/LessCompiler.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import org.gradle.api.tasks.*
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputDirectory
import org.gradle.api.tasks.JavaExec
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction

class LessCompiler extends JavaExec {
@InputDirectory
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 389bb59

Please sign in to comment.