This is an automated email from the ASF dual-hosted git repository. sunlan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push: new 36d509d831 Add jdk19 build 36d509d831 is described below commit 36d509d831a5a7e201288f6e715b7469b060843f Author: Daniel Sun <sun...@apache.org> AuthorDate: Sat Jun 25 04:00:28 2022 +0800 Add jdk19 build --- .github/workflows/groovy-build-test-ea.yml | 45 ++++++++++++++++++++++ .../test/groovy/groovy/json/JsonOutputTest.groovy | 2 + 2 files changed, 47 insertions(+) diff --git a/.github/workflows/groovy-build-test-ea.yml b/.github/workflows/groovy-build-test-ea.yml new file mode 100644 index 0000000000..faa16c5a35 --- /dev/null +++ b/.github/workflows/groovy-build-test-ea.yml @@ -0,0 +1,45 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Build and test ea + +on: [push, pull_request] + +jobs: + test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-18.04] + java: [17] + jdk: ["https://download.java.net/java/early_access/jdk19/28/GPL/openjdk-19-ea+28_linux-x64_bin.tar.gz"] + runs-on: ${{ matrix.os }} + steps: + - name: Download JDK ${{ matrix.jdk }} + run: wget -c ${{ matrix.jdk }} -O /tmp/openjdk.tar.gz + - name: Set up JDK ${{ matrix.jdk }} + run: mkdir -p /home/runner/openjdk && tar -xvf /tmp/openjdk.tar.gz -C /home/runner/openjdk && chmod -R 755 /home/runner/openjdk && mv /home/runner/openjdk/jdk*/* /home/runner/openjdk/ + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: ${{ matrix.java }} + check-latest: true + - name: Test with Gradle + run: ./gradlew test -Ptarget.java.home=/home/runner/openjdk + timeout-minutes: 60 + env: + GRADLE_SCANS_ACCEPT: yes diff --git a/subprojects/groovy-json/src/test/groovy/groovy/json/JsonOutputTest.groovy b/subprojects/groovy-json/src/test/groovy/groovy/json/JsonOutputTest.groovy index b7cabeef04..4aca996a61 100644 --- a/subprojects/groovy-json/src/test/groovy/groovy/json/JsonOutputTest.groovy +++ b/subprojects/groovy-json/src/test/groovy/groovy/json/JsonOutputTest.groovy @@ -23,6 +23,7 @@ import org.junit.Test import static groovy.json.JsonOutput.toJson import static groovy.test.GroovyAssert.assertScript +import static groovy.test.GroovyAssert.isAtLeastJdk import static groovy.test.GroovyAssert.shouldFail final class JsonOutputTest { @@ -529,6 +530,7 @@ final class JsonOutputTest { "chronology":{ "calendarType":"iso8601", "id":"ISO" + ''' + ((isAtLeastJdk("19.0")) ? ',"isoBased":true' : '' ) + ''' }, "dayOfMonth":1, "dayOfWeek":"THURSDAY",