Skip to content

Commit

Permalink
Merge branch 'release/0.14.0-CR1'
Browse files Browse the repository at this point in the history
  • Loading branch information
pmlopes committed Nov 4, 2020
2 parents baa5500 + a986ca4 commit f4ed481
Show file tree
Hide file tree
Showing 1,805 changed files with 22,931 additions and 779,589 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: es4x website

on:
push:
branches:
- master
- develop

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: "11"

- uses: actions/cache@v2
with:
path: .cache
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
- run: mvn install
- run: npm ci
- run: npm run docs:tsdocs
- run: npm run docs:build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: docs/.vuepress/dist
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ target
*.iml
sandbox
node_modules
package-lock.json
site
docs/.vuepress/dist
yarn.lock
72 changes: 30 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
language: java
os: linux
dist: focal

language: generic

cache:
directories:
- $HOME/.m2
Expand All @@ -11,71 +15,55 @@ env:
- secure: RW98CXIpIhMm17UFI7NsFZmmpPOe48IT2R1vKonLkG37av6wTOrVjLZlpihTrIGUuyJsIvrOrM2tybzT+Cq2o1/h4P9XxufzUdyHabh4Ppk1cSQzfEL/vKwBU8HFgUwsuRKVjhowKUXAwKhDtU+oorJWiFqrv1JC/boJOwT71qOZqPdu6A5s7+ubcdUCimwFI0XNGzBZ+phtcdE4dVC5l176/sJVoCGaefG+cZxjCU6AvWnVcPz9POZvtpHvZU1pE26LK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iCsFyepEqKeD4uJlVyEOtlLGpXMSPWCKQBYdOOfM=
- secure: qY757AXCYgqIgxdbSS7xmSE5hQM+X1WERyLkm5wpbeYaDI5WL5BPTVNDR4S48C3M5IyIWeJo2x+UUpw9kA2QnMznZh+4q0AIJU5Pbz0OOwSCTZcUMB7jpHYgAci+xBge+TRkNN3KoQNZK9yYpj05FxbFj5jqykpOW4gVtZ9lkiBX2TqnsLJrKGDw8Aed5FjdTPihHHCx7KVbwseVP2fqxMcHhXzPAO29guuvQGYKstQrurlFg5QrOiHPnGQPLbfni/ZYwxcK/RrOh07Yv6PFqqpWwUGhZUsbESOGKsrdpgOUZo8152HHnSwsafWi5L3QYMYqBHd28tqMz4dP7oMob7ZT2jeclEXf+xPYjZp26ue4VA9BLIPA8hE3Nhu6yYBVY9cCWNrztreuBjbmGi4HaZ3wCNt3L3/PIJ7r2QPV5RcxSk/3VOQppSM6qoH2AYCy+huzaaM3REDsaMyW/mfPvRSLOr/J5zglXDZDkebDvaApAUq3yGyH7CDf4IF7ZKSI3Op0t8giKG73P08OV0t/FCZMbSZJ6a9XvZoYEycYlqlwyfkDW9X5q6ERAfQlIMNWAjPqIAZsrV1TujhIpubI4ifAU7fgE8HC6CykBN2F6BpSOTbObB23179li8UzRWaFf91ifO8HcHnWquVOCjvcDK6y96hwJWcwxYFhms7nV48=
- SKIP_JACOCO='true'

before_install:
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh

matrix:
jobs:
include:
# OpenJDK
- env:
# OpenJDK
- name: "OpenJDK 8"
env:
- JDK='OpenJDK 8'
- SKIP_JACOCO='true'
os: linux
dist: xenial
install: . ./install-jdk.sh --url "https://api.adoptopenjdk.net/v3/binary/latest/8/ga/linux/x64/jdk/hotspot/normal/adoptopenjdk"
- env:
- name: "OpenJDK 11"
env:
- JDK='OpenJDK 11'
- SKIP_JACOCO='false'
os: linux
dist: xenial
install: . ./install-jdk.sh --url "https://api.adoptopenjdk.net/v3/binary/latest/11/ga/linux/x64/jdk/hotspot/normal/adoptopenjdk"
- env:
- JDK='OpenJDK 14'
- SKIP_JACOCO='true'
os: linux
dist: xenial
install: . ./install-jdk.sh --url "https://api.adoptopenjdk.net/v3/binary/latest/14/ga/linux/x64/jdk/hotspot/normal/adoptopenjdk"
- name: "OpenJDK 15"
env:
- JDK='OpenJDK 15'
install: . ./install-jdk.sh --url "https://api.adoptopenjdk.net/v3/binary/latest/15/ga/linux/x64/jdk/hotspot/normal/adoptopenjdk"
# GraalVM
- env:
- name: "GraalVM 20.2.0 (8)"
env:
- JDK='GraalVM 20.2.0 (8)'
- SKIP_JACOCO='true'
os: linux
dist: xenial
install: . ./install-jdk.sh --url "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.2.0/graalvm-ce-java8-linux-amd64-20.2.0.tar.gz"
- env:
- name: "GraalVM 20.2.0 (11)"
env:
- JDK='GraalVM 20.2.0 (11)'
- SKIP_JACOCO='true'
os: linux
dist: xenial
install: . ./install-jdk.sh --url "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.2.0/graalvm-ce-java11-linux-amd64-20.2.0.tar.gz"
- env:
- name: "GraalVM 20.2.0 (11) arm64"
env:
- JDK='GraalVM 20.2.0 (11)'
- SKIP_JACOCO='true'
os: linux
dist: xenial
arch: arm64
install: . ./install-jdk.sh --url "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.2.0/graalvm-ce-java11-linux-aarch64-20.2.0.tar.gz"
# OpenJ9
- env:
- name: "OpenJ9 11"
env:
- JDK='OpenJ9 11'
- SKIP_JACOCO='true'
os: linux
dist: xenial
install: . ./install-jdk.sh --url "https://api.adoptopenjdk.net/v3/binary/latest/11/ga/linux/x64/jdk/openj9/normal/adoptopenjdk"
- env:
- JDK='OpenJ9 14'
- SKIP_JACOCO='true'
os: linux
dist: xenial
install: . ./install-jdk.sh --url "https://api.adoptopenjdk.net/v3/binary/latest/14/ga/linux/x64/jdk/openj9/normal/adoptopenjdk"
- name: "OpenJ9 15"
env:
- JDK='OpenJ9 15'
install: . ./install-jdk.sh --url "https://api.adoptopenjdk.net/v3/binary/latest/15/ga/linux/x64/jdk/openj9/normal/adoptopenjdk"
allow_failures:
- env:
- JDK='OpenJDK 14'
- SKIP_JACOCO='true'
- JDK='OpenJDK 15'
- env:
- JDK='OpenJ9 14'
- SKIP_JACOCO='true'
- JDK='OpenJ9 15'

script:
- ./mvnw clean verify
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.14.0-CR2] -

## [0.14.0-CR1] - 2020-11-04
* Re-enabled support for shebang
* Reduce PM package size by 600Kb
* Bump ASM to 9.0
* Sync modules with upstream
* Bump vert.x to 4.0.0.CR1

## [0.13.3] - 2020-10-22
- Fix jlink to work with multi-release-jars
- Upgrade to vert.x 3.9.4

## [0.13.2] - 2020-09-22
## [0.13.2] - 2020-09-30
- Fix detecting GraalVM version on GraalVM JDK8
- Lax the requirement of running `es4x install`,
if missing will be called before run
Expand Down
10 changes: 4 additions & 6 deletions codegen/pom.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<groupId>io.reactiverse</groupId>
<artifactId>es4x-parent</artifactId>
<version>0.13.3</version>
<version>0.14.0-CR1</version>
<relativePath>..</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>es4x-codegen</artifactId>
<version>0.13.3</version>
<version>0.14.0-CR1</version>

<properties>
<tools.jar>${java.home}/../lib/tools.jar</tools.jar>
Expand Down Expand Up @@ -54,7 +52,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public String filename(EnumModel model) {
@Override
public String render(EnumModel model, int index, int size, Map<String, Object> session) {

if (isBlacklistedClass(model.getType().getName())) {
if (isExcludedClass(model.getType().getName())) {
return null;
}

Expand All @@ -55,7 +55,7 @@ public String render(EnumModel model, int index, int size, Map<String, Object> s
if (index == 0) {
Util.generateLicense(writer);
// include a file if present
writer.print(includeFileIfPresent("enum.include.d.ts"));
writer.print(includeFileIfPresent("enum.header.d.ts"));
} else {
writer.print("\n");
}
Expand All @@ -73,6 +73,11 @@ public String render(EnumModel model, int index, int size, Map<String, Object> s
}
writer.print("}\n");

if (index == size - 1) {
// include a file if present
writer.print(includeFileIfPresent("enum.footer.d.ts"));
}

return sw.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String render(EnumModel model, int index, int size, Map<String, Object> s
writer.printf("/// <reference types=\"%s/enums\" />\n\n", getNPMScope(model.getType().getRaw().getModule()));
writer.printf(
"/**\n" +
" * @typedef { import(\"es4x\") } Java\n" +
" * @typedef { import(\"@vertx/core\") } Java\n" +
" */\n");
writer.print("module.exports = {\n");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public String render(EnumModel model, int index, int size, Map<String, Object> s
writer.printf("/// <reference types=\"%s/enums\" />\n\n", getNPMScope(model.getType().getRaw().getModule()));
writer.printf(
"/**\n" +
" * @typedef { import(\"es4x\") } Java\n" +
" * @typedef { import(\"@vertx/core\") } Java\n" +
" */\n");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public String filename(ClassModel model) {
@Override
public String render(ClassModel model, int index, int size, Map<String, Object> session) {

if (isBlacklistedClass(model.getType().getName())) {
if (isExcludedClass(model.getType().getName())) {
return null;
}

Expand All @@ -62,7 +62,7 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
}

// include a file if present
writer.print(includeFileIfPresent("index.include.d.ts"));
writer.print(includeFileIfPresent("index.header.d.ts"));

if (!type.getModuleName().equals("vertx")) {
if (isOptionalModule("@vertx/core")) {
Expand Down Expand Up @@ -187,7 +187,7 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
boolean hasStaticMethodsInInterface = false;

for (MethodInfo method : model.getMethods()) {
if (isBlacklisted(type.getSimpleName(), method.getName(), method.getParams())) {
if (isEcluded(type.getSimpleName(), method.getName(), method.getParams())) {
continue;
}

Expand All @@ -207,7 +207,7 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
// BEGIN of non polyglot methods...

for (MethodInfo method : model.getAnyJavaTypeMethods()) {
if (isBlacklisted(type.getSimpleName(), method.getName(), method.getParams())) {
if (isEcluded(type.getSimpleName(), method.getName(), method.getParams())) {
continue;
}

Expand Down Expand Up @@ -258,7 +258,7 @@ public String render(ClassModel model, int index, int size, Map<String, Object>

moreMethods = false;
for (MethodInfo method : model.getMethods()) {
if (isBlacklisted(type.getSimpleName(), method.getName(), method.getParams())) {
if (isEcluded(type.getSimpleName(), method.getName(), method.getParams())) {
continue;
}

Expand All @@ -277,6 +277,11 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
writer.print("}\n");
}

if (index == size - 1) {
// include a file if present
writer.print(includeFileIfPresent("index.footer.d.ts"));
}

return sw.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
writer.printf("/// <reference types=\"%s\" />\n\n", getNPMScope(model.getType().getRaw().getModule()));
writer.printf(
"/**\n" +
" * @typedef { import(\"es4x\") } Java\n" +
" * @typedef { import(\"@vertx/core\") } Java\n" +
" */\n");
writer.print("module.exports = {\n");

Expand All @@ -65,7 +65,7 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
}

// include a file if present
writer.print(includeFileIfPresent("index.include.js"));
writer.print(includeFileIfPresent("index.header.js"));
}

writer.printf(" %s: Java.type('%s')", model.getType().getRaw().getSimpleName(), model.getType().getName());
Expand All @@ -77,6 +77,8 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
writer.print('\n');

if (index == size - 1) {
// include a file if present
writer.print(includeFileIfPresent("index.footer.js"));
writer.print("};\n");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
writer.printf("/// <reference types=\"%s\" />\n\n", getNPMScope(model.getType().getRaw().getModule()));
writer.printf(
"/**\n" +
" * @typedef { import(\"es4x\") } Java\n" +
" * @typedef { import(\"@vertx/core\") } Java\n" +
" */\n");

registerJvmClasses();
Expand All @@ -63,11 +63,16 @@ public String render(ClassModel model, int index, int size, Map<String, Object>
}

// include a file if present
writer.print(includeFileIfPresent("module.include.mjs"));
writer.print(includeFileIfPresent("module.header.mjs"));
}

writer.printf("export const %s = Java.type('%s');\n", model.getType().getRaw().getSimpleName(), model.getType().getName());

if (index == size - 1) {
// include a file if present
writer.print(includeFileIfPresent("module.footer.mjs"));
}

return sw.toString();
}
}
Loading

0 comments on commit f4ed481

Please sign in to comment.