Skip to content
Open
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
154 changes: 145 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,155 @@
# limitations under the License.
#

name: CI

on: [push, pull_request]
name: Build & Deploy

on:
push:
branches:
- dev
- main
- issue/11
# paths-ignore:
# - "README.md"
jobs:
build:
build-jdk11:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- name: Compile with Maven
run: mvn compile -ntp
build-jdk17:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Compile with Maven
run: mvn compile -ntp
build-jdk21:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Compile with Maven
run: mvn compile -ntp

# TODO: cache dependencies (taking into accounts: Maven plugins, snapshots, etc.)
check-versions:
runs-on: ubuntu-latest
needs: [ build-jdk11, build-jdk17, build-jdk21 ]
timeout-minutes: 8
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Check versions with Maven
run: mvn versions:display-dependency-updates -ntp

- name: Build with Maven
run: JAVA_HOME=$JAVA_HOME_8_X64 mvn -V -B -ntp -U -e verify
test-jdk11:
runs-on: ubuntu-latest
needs: [ build-jdk11 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- name: Test with Maven
run: mvn test -ntp
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-report
path: target/surefire-reports/
test-jdk17:
runs-on: ubuntu-latest
needs: [ build-jdk17 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven
- name: Test with Maven
run: mvn test -ntp
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-report
path: target/surefire-reports/
test-jdk21:
runs-on: ubuntu-latest
needs: [ build-jdk21 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Test with Maven
run: mvn test -ntp
- uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-report
path: target/surefire-reports/

owasp:
runs-on: ubuntu-latest
timeout-minutes: 8
permissions:
actions: read
contents: read
security-events: write
needs: [ build-jdk11, build-jdk17, build-jdk21 ]
services:
owasp-db:
image: nalusolutionsgmbh/owasp-maven-action:latest
options: --entrypoint /bin/sh --name owasp-db --hostname owasp-db
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
cache: maven
- name: Copy owasp database from container to runner
run: docker cp $(docker ps -aqf "name=owasp-db"):/dependency-check/data ./dependency-checker-db/
- name: OWASP Check
run: |
mvn org.owasp:dependency-check-maven:aggregate \
-DdataDirectory=./dependency-checker-db \
-DfailBuildOnCVSS=7 \
-Dodc.outputDirectory=reports \
-Dformat=HTML \
-DautoUpdate=false \
-DsuppressionFiles=./owasp/owasp-suppressions.xml
- name: Upload OWASP results
if: always()
uses: actions/upload-artifact@master
with:
name: OWASP report
path: ${{github.workspace}}/**/reports/dependency-check-report.html
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,12 @@ public class PersonComponent implements IsElement<HTMLDivElement>, Editor<Person

```java
PersonComponent personComponent = new PersonComponent();

Person person = new Person(10, "Ahmad", false);

DomGlobal.document.body.appendChild(Card.create()
.appendChild(personComponent)
.asElement());

DomGlobal.document
.body
.appendChild(Card.create()
.appendChild(personComponent)
.asElement());
personComponent.edit(person);

```
8 changes: 4 additions & 4 deletions gwt-editor-gwt2-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
<description>Test cases for the GWT 2 tests</description>

<properties>
<maven.gwt.plugin>1.0.0</maven.gwt.plugin>
<maven.gwt.plugin>1.1.0</maven.gwt.plugin>

<gwt.version>2.9.0</gwt.version>
<gwt.version>2.12.2</gwt.version>
<junit.version>4.13.1</junit.version>
</properties>

<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>test</scope>
Expand Down
27 changes: 3 additions & 24 deletions gwt-editor-j2cl-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
<url>https://github.com/gwtproject/gwt-editor</url>

<properties>
<maven.j2cl.plugin>0.16-SNAPSHOT</maven.j2cl.plugin>

<!-- CI -->
<vertispan.j2cl.repo.url>https://repo.vertispan.com/j2cl/</vertispan.j2cl.repo.url>

<j2cl.version>0.8-SNAPSHOT</j2cl.version>
<maven.j2cl.plugin>0.22.0</maven.j2cl.plugin>
<j2cl.version>0.11.0-9336533b6</j2cl.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -74,8 +70,7 @@
<goals>
<goal>test</goal>
</goals>
<!-- TODO does not work. See https://github.com/Vertispan/j2clmavenplugin/issues/14 for more informations -->
<!-- <phase>test</phase>-->
<phase>test</phase>
<configuration>
<defines>
<gwt.enableDebugId>true</gwt.enableDebugId>
Expand Down Expand Up @@ -111,20 +106,4 @@
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>${vertispan.j2cl.repo.id}</id>
<name>${vertispan.j2cl.repo.name}</name>
<url>${vertispan.j2cl.repo.url}</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>vertispan-releases</id>
<name>Vertispan hosted artifacts-releases</name>
<url>${vertispan.j2cl.repo.url}</url>
</pluginRepository>
</pluginRepositories>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public boolean equals(Object o) {
} else if (!(o instanceof ConstraintViolationImpl)) {
return false;
} else {
ConstraintViolationImpl<?> other = (ConstraintViolationImpl) o;
ConstraintViolationImpl<?> other = (ConstraintViolationImpl<?>) o;
return Objects.equals(this.message, other.message)
&& Objects.equals(this.propertyPath, other.propertyPath)
&& Objects.equals(this.rootBean, other.rootBean)
Expand Down
30 changes: 22 additions & 8 deletions gwt-editor-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<auto.common.version>1.1</auto.common.version>
<auto.service.version>1.0</auto.service.version>
<compile-testing.version>0.18</compile-testing.version>
<gwt.version>2.9.0</gwt.version>
<javapoet.version>1.12.1</javapoet.version>
<gwt.version>2.12.2</gwt.version>
<javapoet.version>1.13.0</javapoet.version>
<compile.testing.version>0.18</compile.testing.version>
<junit.version>4.13.1</junit.version>
<org.truth.version>0.23</org.truth.version>
<truth.version>1.0</truth.version>
<truth.version>1.4.4</truth.version>

<maven.shade.plugin>3.2.4</maven.shade.plugin>
</properties>
Expand Down Expand Up @@ -93,13 +93,13 @@

<!-- only for testing -->
<dependency>
<groupId>com.google.gwt</groupId>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>test</scope>
Expand Down Expand Up @@ -179,7 +179,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<version>${maven.surfire.plugin}</version>
<executions>
<execution>
<id>unit-tests</id>
Expand All @@ -190,6 +190,7 @@
</execution>
</executions>
<configuration>
<argLine>${test.jvm.flags}</argLine>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
Expand Down Expand Up @@ -322,6 +323,19 @@
</plugins>
</build>
</profile>
<profile>
<id>add-exports</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<test.jvm.flags>
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
</test.jvm.flags>
</properties>
</profile>
</profiles>
</project>

Loading