Skip to content
Merged
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
10 changes: 7 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@ jobs:
- name: Checkout code
uses: actions/checkout@v7

- name: Set up JDK 8
# Gradle 9 runs only on Java 17+, so 17 is listed last and becomes JAVA_HOME. The SDK's
# tests still run on Java 8, its floor, through the toolchain sdk-java/build.gradle selects.
- name: Set up JDK 8 and 17
uses: actions/setup-java@v6
with:
java-version: '8'
java-version: |
8
17
distribution: 'corretto'

- name: Build and Test with Gradle
run: ./gradlew build
run: ./gradlew build -PtestJavaVersion=8 -Porg.gradle.java.installations.fromEnv=JAVA_HOME_8_X64

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand Down
4 changes: 3 additions & 1 deletion app-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ dependencies {
//implementation "ly.count.sdk:java:${CLY_VERSION}"
}

mainClassName = 'ly.count.java.demo.ReproduceIssue264'
application {
mainClass = 'ly.count.java.demo.ReproduceIssue264'
}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ ext.countFailedTests = { module ->
int failed = 0
resultsDir.listFiles({ file -> file.name.endsWith('.xml') } as FileFilter)?.each { file ->
try {
def suite = new XmlParser(false, false).parse(file)
def suite = new groovy.xml.XmlParser(false, false).parse(file)
failed += (suite.@failures as int) + (suite.@errors as int)
} catch (Exception ignored) {
// An unreadable result file is not worth failing the summary over.
Expand All @@ -173,7 +173,7 @@ ext.countFailedTests = { module ->
* build depend on the network, so external entities are switched off.
*/
ext.readCounters = { File report ->
def parser = new XmlParser(false, false)
def parser = new groovy.xml.XmlParser(false, false)
parser.setFeature('http://apache.org/xml/features/disallow-doctype-decl', false)
parser.setFeature('http://apache.org/xml/features/nonvalidating/load-external-dtd', false)

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,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
11 changes: 4 additions & 7 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 52 additions & 34 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions sdk-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ if (JavaVersion.current().isJava9Compatible()) {
}
}

// Gradle itself needs Java 17, so CI passes -PtestJavaVersion=8 to run the tests on the SDK's Java 8 floor.
def testJavaVersion = findProperty('testJavaVersion')
if (testJavaVersion) {
tasks.named('test') {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(testJavaVersion.toString())
}
}
}

dependencies {
implementation 'org.json:json:20260814'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
Expand Down
Loading