Skip to content

Commit

Permalink
Merge branch 'main' into 9694-clearer-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Nov 27, 2023
2 parents 2f6b140 + 84fa2a1 commit 3b698be
Show file tree
Hide file tree
Showing 113 changed files with 4,113 additions and 1,456 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/full-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Run all tests and builds all aspects of GWT using Java 8. Runs nightly (plus
# or minus timzeones) on the main branch, and will also run right away on a
# push to a release branch. Release zips are uploaded as part of the build,
# though maven snapshots are not yet deployed.
# Run all tests and builds all aspects of GWT using Java 8, 11, and 17. Runs
# nightly (plus or minus timzeones) on the main branch, and will also run right
# away on a push to a release branch. Release zips are uploaded as part of the
# build, though maven snapshots are not yet deployed.
name: Full build
on:
schedule:
Expand All @@ -18,6 +18,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ '8', '11', '17' ]
steps:
- name: Checkout GWT itself into one directory
uses: actions/checkout@v2
Expand All @@ -28,11 +31,11 @@ jobs:
with:
repository: 'gwtproject/tools'
path: 'tools'
- name: Set up JDK 8
# GWT presently requires Java8 to build, but can run on newer Java versions
- name: Set up JDK ${{ matrix.java-version }}
# GWT presently requires Java8 to build just the SDK and some tests, or 11 to build everything, but can run on newer Java versions
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Build, style/api checks, test, produce docs
Expand Down Expand Up @@ -62,35 +65,35 @@ jobs:
uses: actions/upload-artifact@v2
if: always()
with:
name: checkstyle-reports
name: checkstyle-reports-java${{ matrix.java-version }}
path: 'gwt/build/out/**/checkstyle*.xml'
- name: Upload test xml files for manual review in its own artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: junit-reports
name: junit-reports-java${{ matrix.java-version }}
path: 'gwt/build/out/**/test/**/reports/TEST-*.xml'

- name: On success, upload the release zip
uses: actions/upload-artifact@v2
with:
name: gwt
name: gwt-java${{ matrix.java-version }}
path: 'gwt/build/dist/gwt-*.zip'

- name: Set up sonatype credentials
# Using the same java version as above, set up a settings.xml file
uses: actions/setup-java@v3
if: github.event_name == 'schedule' && github.repository_owner == 'gwtproject'
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '17' }}
with:
java-version: '8'
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
# Define the ID for the server to put in settings.xml, and the env vars that will contain the secrets
server-id: sonatype-snapshots
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD

- name: Nightly builds should be deployed as snapshots to sonatype
if: github.event_name == 'schedule' && github.repository_owner == 'gwtproject'
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'gwtproject' && matrix.java-version == '17' }}
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/quick-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ['8', '11', '17']
steps:
- name: Checkout GWT itself into one directory
uses: actions/checkout@v2
Expand All @@ -18,11 +21,11 @@ jobs:
with:
repository: 'gwtproject/tools'
path: 'tools'
- name: Set up JDK 8
# GWT presently requires Java8 to build, but can run on newer Java versions
uses: actions/setup-java@v2
- name: Set up JDK ${{ matrix.java-version }}
# GWT presently requires Java8 to build just the SDK and some tests, or 11+ to build everything, and can run on newer Java versions
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Set up reviewdog for easier checks on the PR's checkstyle output
uses: reviewdog/action-setup@v1
Expand All @@ -41,8 +44,8 @@ jobs:
ANT_OPTS=-Xmx2g
ant clean dist doc checkstyle apicheck
- name: Create pull request comments/annotations for checkstyle, even on failure
if: always() && github.event_name == 'pull_request'
- name: Create pull request comments/annotations for checkstyle from the java 17 build, even on failure
if: ${{ always() && github.event_name == 'pull_request' && matrix.java-version == '17' }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -55,8 +58,8 @@ jobs:
done
- name: Upload checkstyle xml for manual review
uses: actions/upload-artifact@v2
if: always()
if: ${{ matrix.java-version == '17' }}
with:
name: checkstyle-reports
name: checkstyle-reports-java${{ matrix.java-version }}
path: 'gwt/build/out/**/checkstyle*.xml'
retention-days: 5
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

`$ ant clean dist-dev`

or if you don't have `python` and `g++` just run

`$ ant clean dist-dev`

Then you will get all `.jar` files in the folder `build/lib` and
the redistributable file will be: `build/dist/gwt-0.0.0.zip`

Expand All @@ -42,6 +38,8 @@
- To compile everything including examples you have to run

`$ ant clean dist`

- To create maven artifacts (after building .jar using ant), use [following guide](./maven/README.txt).

### How to verify GWT code conventions:

Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<gwt.ant dir="samples"/>
</target>

<target name="buildtools" description="[subdir] Build (or runs ${target} if set) the build tools">
<target name="buildtools" description="[subdir] Build (or runs ${target} if set) the build tools" unless="isJava8">
<gwt.ant dir="build_tools"/>
</target>

Expand Down
14 changes: 6 additions & 8 deletions build_tools/doctool/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
<property name="project.tail" value="build_tools/doctool" />
<import file="${gwt.root}/common.ant.xml" />

<property.ensure name="java.tools.path" location="${java.home}/../lib/tools.jar" unless="build.host.ismac" message="Cannot find ${java.home}/../lib/tools.jar; please use a JDK when building doc rather than a JRE." />

<target name="compile" description="Compiles this project">
<gwt.javac>
<classpath>
<pathelement location="${java.tools.path}" />
</classpath>
</gwt.javac>
<!--
As guarded below in the build target, doctool can't be built on
Java 8. In theory release could be set to 9, but 9 and 10 are EOL.
-->
<gwt.javac release="11" />
</target>

<target name="build" depends="compile" description="Packages this project into a jar">
<target name="build" depends="compile" description="Packages this project into a jar" unless="${isJava8}">
<mkdir dir="${gwt.build.lib}" />
<gwt.jar>
<fileset dir="src" />
Expand Down
160 changes: 0 additions & 160 deletions build_tools/doctool/src/com/google/doctool/JreDocTool.java

This file was deleted.

Loading

0 comments on commit 3b698be

Please sign in to comment.