You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2022/06/25 05:08:52 UTC

[groovy] branch GROOVY_4_0_X updated (a789e089b1 -> 0993e90ee4)

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a change to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


    from a789e089b1 GROOVY-10633, GROOVY-10662: STC: do not mix generics contexts
     new dd054ceeb2 Add jdk19 build
     new 0993e90ee4 Tweak build script just to log java executable

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../{groovy-build-test.yml => groovy-build-test-ea.yml}       | 11 ++++++++---
 buildSrc/src/main/groovy/org.apache.groovy-tested.gradle      |  5 +++--
 .../src/test/groovy/groovy/json/JsonOutputTest.groovy         |  2 ++
 3 files changed, 13 insertions(+), 5 deletions(-)
 copy .github/workflows/{groovy-build-test.yml => groovy-build-test-ea.yml} (69%)


[groovy] 02/02: Tweak build script just to log java executable

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 0993e90ee4cdc8d13a03e98f7ab917bfe6e7aa1b
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Jun 25 13:08:04 2022 +0800

    Tweak build script just to log java executable
---
 buildSrc/src/main/groovy/org.apache.groovy-tested.gradle | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/buildSrc/src/main/groovy/org.apache.groovy-tested.gradle b/buildSrc/src/main/groovy/org.apache.groovy-tested.gradle
index 254b9e4b81..8194d2ab8f 100644
--- a/buildSrc/src/main/groovy/org.apache.groovy-tested.gradle
+++ b/buildSrc/src/main/groovy/org.apache.groovy-tested.gradle
@@ -56,9 +56,10 @@ tasks.withType(Test).configureEach {
             'user.home': temporaryDir.absolutePath // make sure tests are isolated from real user home or tests using Grape may fail
 
     if (rootProject.hasProperty('target.java.home')) {
-        String targetJavaHome = rootProject.property('target.java.home')
-        if (targetJavaHome?.trim()) {
+        String targetJavaHome = rootProject.property('target.java.home')?.trim()
+        if (targetJavaHome) {
             executable = "${targetJavaHome}/bin/java"
+            println "Using ${executable} to run tests"
         }
     }
 


[groovy] 01/02: Add jdk19 build

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit dd054ceeb218453900216a26c6ac2e51eb90e3e3
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Jun 25 04:00:28 2022 +0800

    Add jdk19 build
    
    (cherry picked from commit 36d509d831a5a7e201288f6e715b7469b060843f)
---
 .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",