diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..189608c4fa --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,149 @@ +defaults: &defaults + docker: + - image: vertispan/openjdk:8u222-jdk-stretch + +version: 2 +jobs: + closure_library: + <<: *defaults + working_directory: ~/ + steps: + - run: + name: create build cache key + command: echo $CIRCLE_SHA1 > .circle-sha + - restore_cache: + name: Restoring Cache - closure-library + keys: + - v1-closure-library-{{ checksum ".circle-sha" }} + # if cache is not present load any most recent + - v1-closure-library- + - run: + name: update or clone closure-library + command: | + if [ -e closure-library ]; then + # if the cache contained it, let's just update + echo update from remote + + cd closure-library + git remote update + git reset --hard origin/master + else + echo cloning repository + git clone https://github.com/google/closure-library + fi + - save_cache: # TODO this should probably be using workspace, not cache + name: Saving Cache - closure-library + key: v1-closure-library-{{ checksum ".circle-sha" }} + paths: + - ~/closure-library + + build: + <<: *defaults + working_directory: ~/j2cl + steps: + - checkout + - run: + name: create build cache key + command: echo $CIRCLE_SHA1 > .circle-sha + - run: + name: environment check + command: | + java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize|ThreadStackSize' + env MAVEN_OPTS="-XX:+PrintFlagsFinal" mvn -version | grep -iE 'HeapSize|PermSize|ThreadStackSize' + mvn -version + +# - run: +# name: Rebase j2cl onto google upstream changes +# command: | +# echo rebasing onto upstream +# set +e +# git remote get-url upstream +# if [ $? != 0 ]; then +# echo adding google remote +# git remote add upstream git@github.com:google/j2cl.git +# fi +# set -e +# echo setup local git user +# git config --global user.email "sales@vertispan.com" +# git config --global user.name "Vertispan CI" +# echo git remote update +# git remote update +# #echo git checkout origin/master +# #git checkout origin/master +# +# echo starting rebase on upstream/master +# set +e +# # temp comment out the rebase to test build +# git rebase upstream/master +# exitCode=$?; +# set -e +# +# if [ $exitCode != 0 ]; then +# # not really needed +# echo rebase failure +# git rebase --abort +# exit $exitCode; +# fi + + - restore_cache: # TODO this should probably be using workspace, not cache + name: Restoring Cache - closure-library + keys: + - v1-closure-library-{{ checksum ".circle-sha" }} + # if cache is not present load any most recent - shouldn't happen by this point of build + - v1-closure-library- + + - restore_cache: + name: Restoring cache - bazel repository + key: v1-bazel-{{ checksum ".bazelversion" }}-{{ checksum "WORKSPACE" }}-{{ checksum "build_defs/repository.bzl" }} + paths: + - ~/bazel_repository_cache + - run: + name: Initialize bazel options + command: | + # limit the bazel jobs due to failures in circleci + echo "build --jobs=1" >> .bazelrc + echo "build --local_ram_resources=512" >> .bazelrc + echo "--host_jvm_args=-Xmx512m" >> .bazelrc + # ask bazel to put its downloaded resources in a directory we can cache + echo "build --repository_cache=~/bazel_repository_cache" >> .bazelrc + # verify that all dependencies are up to date + bazel sync + - run: + name: Run bazel build + command: | + cd maven + # try up to 4 times, bazel requests more resources than circleci will give it + ./build.sh || ./build.sh || ./build.sh || ./build.sh + - save_cache: + name: Save Cache - bazel repository + key: v1-bazel-{{ checksum ".bazelversion" }}-{{ checksum "WORKSPACE" }}-{{ checksum "build_defs/repository.bzl" }} + paths: + - ~/bazel_repository_cache + - restore_cache: + name: Restoring Cache - m2 repository + keys: + - v1-dependencies-{{ checksum "maven/pom.xml" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - run: + name: Deploy jars + command: | + cd maven + mvn deploy -s ../.circleci/settings.xml -Dartifactory.username=$ARTIFACTORY_USER -Dartifactory.password=$ARTIFACTORY_APIKEY + - save_cache: + name: Save Cache - m2 repository + paths: + - ~/.m2/repository + key: v1-dependencies-{{ checksum "maven/pom.xml" }} + + +workflows: + version: 2 + ci_build: + jobs: + - closure_library + - build: + requires: + - closure_library + context: deploy-keys + diff --git a/.circleci/settings.xml b/.circleci/settings.xml new file mode 100644 index 0000000000..74a7c1cf2d --- /dev/null +++ b/.circleci/settings.xml @@ -0,0 +1,13 @@ + + + + + vertispan-snapshots + ${artifactory.username} + ${artifactory.password} + + + + diff --git a/build_defs/internal_do_not_use/j2cl_library.bzl b/build_defs/internal_do_not_use/j2cl_library.bzl index 58c68dcc6d..4939b357c1 100644 --- a/build_defs/internal_do_not_use/j2cl_library.bzl +++ b/build_defs/internal_do_not_use/j2cl_library.bzl @@ -66,10 +66,10 @@ def j2cl_library( _to_j2wasm_targets("exports", j2wasm_args) j2wasm_args["tags"] = (j2wasm_args.get("tags") or []) + ["manual", "notap"] - j2wasm_library( - name = j2wasm_library_name, - **j2wasm_args - ) +# j2wasm_library( +# name = j2wasm_library_name, +# **j2wasm_args +# ) _ALLOWED_ATTRS = [key for key in J2WASM_LIB_ATTRS] + ["tags", "visibility"] diff --git a/build_defs/internal_do_not_use/j2cl_workspace.bzl b/build_defs/internal_do_not_use/j2cl_workspace.bzl index 9c81398487..91808963b4 100644 --- a/build_defs/internal_do_not_use/j2cl_workspace.bzl +++ b/build_defs/internal_do_not_use/j2cl_workspace.bzl @@ -218,7 +218,7 @@ filegroup( actual = "@com_google_guava", ) - # Required by protobuf_java_util + # Required by protobuf_java_util, also needed by generator native.bind( name = "gson", actual = "@com_google_code_gson", diff --git a/jre/javatests/com/google/gwt/junit/BUILD b/jre/javatests/com/google/gwt/junit/BUILD new file mode 100644 index 0000000000..cc06fc24db --- /dev/null +++ b/jre/javatests/com/google/gwt/junit/BUILD @@ -0,0 +1,11 @@ +licenses([ + "notice", # Apache +]) + +load("//build_defs:rules.bzl", "j2cl_library") + +j2cl_library( + name = "gwttestcase_emul", + srcs = glob(["**/*.java"]), + deps = ["//junit/emul/java:junit_emul"] +) \ No newline at end of file diff --git a/jre/javatests/com/google/gwt/junit/client/GWTTestCase.java b/jre/javatests/com/google/gwt/junit/client/GWTTestCase.java index 07b5d3b8e5..6c825b0bf0 100644 --- a/jre/javatests/com/google/gwt/junit/client/GWTTestCase.java +++ b/jre/javatests/com/google/gwt/junit/client/GWTTestCase.java @@ -46,4 +46,11 @@ protected final void setUp() throws Exception { protected final void tearDown() throws Exception { gwtTearDown(); } + + protected final void delayTestFinish(int timeoutMillis) { + + } + + protected final void finishTest() { + } } \ No newline at end of file diff --git a/junit/emul/java/BUILD b/junit/emul/java/BUILD index 8210c83c42..0669049735 100644 --- a/junit/emul/java/BUILD +++ b/junit/emul/java/BUILD @@ -10,5 +10,8 @@ j2cl_library( javacopts = [ "-Xep:DoNotCall:OFF", ], - visibility = ["//:__pkg__"], + visibility = [ + "//:__pkg__", + "//jre:__subpackages__", + ], ) diff --git a/junit/generator/java/com/google/j2cl/junit/apt/BUILD b/junit/generator/java/com/google/j2cl/junit/apt/BUILD index a7eb106484..e4c497555b 100644 --- a/junit/generator/java/com/google/j2cl/junit/apt/BUILD +++ b/junit/generator/java/com/google/j2cl/junit/apt/BUILD @@ -36,4 +36,16 @@ java_library( "//third_party:jsr305_annotations", "//third_party:junit", ], + plugins = [":autoservice_plugin"], ) + + +java_plugin( + name = "autoservice_plugin", + processor_class = "com.google.auto.service.processor.AutoServiceProcessor", + deps = [ + "//third_party:auto_service", + "//third_party:guava", + "//third_party:auto_common", + ], +) \ No newline at end of file diff --git a/junit/generator/java/com/google/j2cl/junit/apt/J2clTestingProcessingStep.java b/junit/generator/java/com/google/j2cl/junit/apt/J2clTestingProcessingStep.java index 1b3178a91a..9068f7c57e 100644 --- a/junit/generator/java/com/google/j2cl/junit/apt/J2clTestingProcessingStep.java +++ b/junit/generator/java/com/google/j2cl/junit/apt/J2clTestingProcessingStep.java @@ -63,10 +63,11 @@ public Set> annotations() { @Override public Set process( SetMultimap, Element> elementsByAnnotation) { - Element value = Iterables.getOnlyElement(elementsByAnnotation.get(J2clTestInput.class)); - String className = - MoreApt.getClassNameFromAnnotation(value, J2clTestInput.class, "value").get(); - handleClass(className); + elementsByAnnotation.get(J2clTestInput.class).forEach(value -> { + String className = + MoreApt.getClassNameFromAnnotation(value, J2clTestInput.class, "value").get(); + handleClass(className); + }); return ImmutableSet.of(); } diff --git a/junit/generator/java/com/google/j2cl/junit/apt/TemplateWriter.java b/junit/generator/java/com/google/j2cl/junit/apt/TemplateWriter.java index 8d2a3cf511..5cbcc2e824 100644 --- a/junit/generator/java/com/google/j2cl/junit/apt/TemplateWriter.java +++ b/junit/generator/java/com/google/j2cl/junit/apt/TemplateWriter.java @@ -87,7 +87,7 @@ private String mergeTemplate(TestClass testClass, String template) throws Except private void writeResource(String qualifiedName, String content) throws IOException { try (Writer writer = filer - .createResource(StandardLocation.CLASS_OUTPUT, "", qualifiedName, new Element[0]) + .createResource(StandardLocation.SOURCE_OUTPUT, "", qualifiedName, new Element[0]) .openWriter()) { writer.write(content); } diff --git a/maven/ast/pom.xml b/maven/ast/pom.xml new file mode 100644 index 0000000000..ff021507b0 --- /dev/null +++ b/maven/ast/pom.xml @@ -0,0 +1,75 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + ast + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/ast/libast.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/ast/libast-src.jar + jar + sources + + + + + + + + + + + org.apache.commons + commons-text + + + com.google.auto.value + auto-value + + + com.google.guava + guava + + + com.google.code.findbugs + jsr305 + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + common-visitor + ${project.version} + + + \ No newline at end of file diff --git a/maven/backend-closure/pom.xml b/maven/backend-closure/pom.xml new file mode 100644 index 0000000000..d03c7fa1dd --- /dev/null +++ b/maven/backend-closure/pom.xml @@ -0,0 +1,85 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + backend-closure + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/closure/libclosure.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/closure/libclosure-src.jar + jar + sources + + + + + + + + + + + com.google.code.gson + gson + + + com.google.guava + guava + + + com.google.javascript + closure-compiler-unshaded + + + com.google.code.findbugs + jsr305 + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + com.vertispan.j2cl + backend-common + ${project.version} + + + com.vertispan.j2cl + backend-libraryinfo + ${project.version} + + + \ No newline at end of file diff --git a/maven/backend-common/pom.xml b/maven/backend-common/pom.xml new file mode 100644 index 0000000000..872f872167 --- /dev/null +++ b/maven/backend-common/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + backend-common + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/common/libcommon.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/common/libcommon-src.jar + jar + sources + + + + + + + + + + + com.google.guava + guava + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + \ No newline at end of file diff --git a/maven/backend-libraryinfo-proto/pom.xml b/maven/backend-libraryinfo-proto/pom.xml new file mode 100644 index 0000000000..d73ae75953 --- /dev/null +++ b/maven/backend-libraryinfo-proto/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + backend-libraryinfo-proto + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/libraryinfo/liblibrary_info_proto-speed.jar + jar + + + + + + + + + + + + + + + + com.google.protobuf + protobuf-java-util + + + + \ No newline at end of file diff --git a/maven/backend-libraryinfo/pom.xml b/maven/backend-libraryinfo/pom.xml new file mode 100644 index 0000000000..5ed2f83f55 --- /dev/null +++ b/maven/backend-libraryinfo/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + backend-libraryinfo + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/libraryinfo/liblibraryinfo.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/libraryinfo/liblibraryinfo-src.jar + jar + sources + + + + + + + + + + + com.google.guava + guava + + + com.google.code.findbugs + jsr305 + + + com.google.protobuf + protobuf-java-util + + + + + com.vertispan.j2cl + backend-libraryinfo-proto + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + com.vertispan.j2cl + common + ${project.version} + + + \ No newline at end of file diff --git a/maven/backend-wasm/pom.xml b/maven/backend-wasm/pom.xml new file mode 100644 index 0000000000..17973d4f22 --- /dev/null +++ b/maven/backend-wasm/pom.xml @@ -0,0 +1,85 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + backend-wasm + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/wasm/libwasm.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/wasm/libwasm-src.jar + jar + sources + + + + + + + + + + + com.google.code.gson + gson + + + com.google.guava + guava + + + com.google.javascript + closure-compiler-unshaded + + + com.google.code.findbugs + jsr305 + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + com.vertispan.j2cl + backend-common + ${project.version} + + + com.vertispan.j2cl + backend-libraryinfo + ${project.version} + + + \ No newline at end of file diff --git a/maven/backend/pom.xml b/maven/backend/pom.xml new file mode 100644 index 0000000000..1e838c5646 --- /dev/null +++ b/maven/backend/pom.xml @@ -0,0 +1,78 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + backend + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/libbackend.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/backend/libbackend-src.jar + jar + sources + + + + + + + + + + + com.google.guava + guava + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + com.vertispan.j2cl + backend-closure + ${project.version} + + + com.vertispan.j2cl + backend-wasm + ${project.version} + + + com.vertispan.j2cl + passes + ${project.version} + + + \ No newline at end of file diff --git a/maven/bootstrap/assembly.xml b/maven/bootstrap/assembly.xml new file mode 100644 index 0000000000..5a32c5b338 --- /dev/null +++ b/maven/bootstrap/assembly.xml @@ -0,0 +1,28 @@ + + jszip + + zip + + false + + + ../../../closure-library/closure/goog/ + + + base.js + dom/nodetype.js + debug/error.js + asserts/asserts.js + reflect/reflect.js + math/long.js + + closure/goog + + + \ No newline at end of file diff --git a/maven/bootstrap/pom.xml b/maven/bootstrap/pom.xml new file mode 100644 index 0000000000..53ee0d6008 --- /dev/null +++ b/maven/bootstrap/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + bootstrap + pom + + This project more or less consists of the bits of closure that are required in a j2cl-based app, + plus the various parts of j2cl's js bootstrap that are not yet included in the jre.js.zip, like + jre.js, primitives, nativebootstrap, and and vmbootstrap. + + + + + + maven-assembly-plugin + 3.1.0 + + + prepare-package + single + + + + + assembly.xml + + + + + + \ No newline at end of file diff --git a/maven/build.sh b/maven/build.sh new file mode 100755 index 0000000000..38f8f13ec5 --- /dev/null +++ b/maven/build.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -e +BAZEL=${BAZEL:-bazel} + +${BAZEL} build //transpiler/java/com/google/j2cl/transpiler:* + +${BAZEL} build //tools/java/com/google/j2cl/tools/gwtincompatible:* +${BAZEL} build //tools/java/com/google/j2cl/tools/minifier:* + +${BAZEL} build //jre/java/javaemul/internal/vmbootstrap/primitives:primitives + +${BAZEL} build //jre/java:* + +${BAZEL} build //junit/emul/java:* +${BAZEL} build //jre/javatests/com/google/gwt/junit:* +${BAZEL} build //junit/generator/java/com/google/j2cl/junit/async:* +${BAZEL} build //junit/generator/java/com/google/j2cl/junit/apt:* + +${BAZEL} build @org_gwtproject_gwt//user:libgwt-javaemul-internal-annotations.jar +${BAZEL} build @org_gwtproject_gwt//user:libgwt-javaemul-internal-annotations-src.jar + + +# This must be the last line, or else some other operation will apparently remove these +# soft links that we rely on in the maven build +${BAZEL} build //third_party:jdt-core \ No newline at end of file diff --git a/maven/common-visitor/pom.xml b/maven/common-visitor/pom.xml new file mode 100644 index 0000000000..efa2bc55f6 --- /dev/null +++ b/maven/common-visitor/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + common-visitor + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/common/visitor/libvisitor-internal.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/common/visitor/libvisitor-internal-src.jar + jar + sources + + + + + + + + + + + + \ No newline at end of file diff --git a/maven/common/pom.xml b/maven/common/pom.xml new file mode 100644 index 0000000000..fd21b26efc --- /dev/null +++ b/maven/common/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + common + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/common/libcommon.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/common/libcommon-src.jar + jar + sources + + + + + + + + + + + args4j + args4j + + + com.google.auto.value + auto-value + + + com.google.guava + guava + + + com.google.code.findbugs + jsr305 + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.core.contenttype/pom.xml b/maven/external/org.eclipse/org.eclipse.core.contenttype/pom.xml new file mode 100644 index 0000000000..c0589a1b25 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.core.contenttype/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.core.contenttype + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_content_type/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.core.jobs/pom.xml b/maven/external/org.eclipse/org.eclipse.core.jobs/pom.xml new file mode 100644 index 0000000000..580ca62790 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.core.jobs/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.core.jobs + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_jobs/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.core.resources/pom.xml b/maven/external/org.eclipse/org.eclipse.core.resources/pom.xml new file mode 100644 index 0000000000..fecf3aea54 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.core.resources/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.core.resources + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_resources/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.core.runtime/pom.xml b/maven/external/org.eclipse/org.eclipse.core.runtime/pom.xml new file mode 100644 index 0000000000..5d56bad340 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.core.runtime/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.core.runtime + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_runtime/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.equinox.common/pom.xml b/maven/external/org.eclipse/org.eclipse.equinox.common/pom.xml new file mode 100644 index 0000000000..2b9cabfe70 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.equinox.common/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.equinox.common + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_equinox_common/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.equinox.preferences/pom.xml b/maven/external/org.eclipse/org.eclipse.equinox.preferences/pom.xml new file mode 100644 index 0000000000..bd40dcb0cb --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.equinox.preferences/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.equinox.preferences + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_equinox_preferences/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.jdt.compiler.apt/pom.xml b/maven/external/org.eclipse/org.eclipse.jdt.compiler.apt/pom.xml new file mode 100644 index 0000000000..7c63d385f0 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.jdt.compiler.apt/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.jdt.compiler.apt + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_compiler_apt/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.jdt.core/pom.xml b/maven/external/org.eclipse/org.eclipse.jdt.core/pom.xml new file mode 100644 index 0000000000..176c69fba6 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.jdt.core/pom.xml @@ -0,0 +1,91 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.jdt.core + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_core/jar/downloaded.jar + jar + + + + + + + + + + + + ${project.groupId} + org.eclipse.core.contenttype + ${project.version} + + + ${project.groupId} + org.eclipse.core.jobs + ${project.version} + + + ${project.groupId} + org.eclipse.core.resources + ${project.version} + + + ${project.groupId} + org.eclipse.core.runtime + ${project.version} + + + ${project.groupId} + org.eclipse.equinox.common + ${project.version} + + + ${project.groupId} + org.eclipse.equinox.preferences + ${project.version} + + + ${project.groupId} + org.eclipse.jdt.compiler.apt + ${project.version} + + + ${project.groupId} + org.eclipse.osgi + ${project.version} + + + ${project.groupId} + org.eclipse.text + ${project.version} + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.osgi/pom.xml b/maven/external/org.eclipse/org.eclipse.osgi/pom.xml new file mode 100644 index 0000000000..e618ebaaa7 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.osgi/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.osgi + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_osgi/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/org.eclipse.text/pom.xml b/maven/external/org.eclipse/org.eclipse.text/pom.xml new file mode 100644 index 0000000000..b0ad9ae805 --- /dev/null +++ b/maven/external/org.eclipse/org.eclipse.text/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + com.vertispan.j2cl.external + org.eclipse + 0.9-SNAPSHOT + + org.eclipse.text + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../../bazel-j2cl/external/org_eclipse_jdt_text/jar/downloaded.jar + jar + + + + + + + + + \ No newline at end of file diff --git a/maven/external/org.eclipse/pom.xml b/maven/external/org.eclipse/pom.xml new file mode 100644 index 0000000000..7db0681ab0 --- /dev/null +++ b/maven/external/org.eclipse/pom.xml @@ -0,0 +1,26 @@ + + + 4.0.0 + + + com.vertispan.j2cl.external + external-dependencies + 0.9-SNAPSHOT + + org.eclipse + pom + + org.eclipse.core.contenttype + org.eclipse.core.jobs + org.eclipse.core.resources + org.eclipse.core.runtime + org.eclipse.equinox.common + org.eclipse.equinox.preferences + org.eclipse.jdt.compiler.apt + org.eclipse.jdt.core + org.eclipse.osgi + org.eclipse.text + + \ No newline at end of file diff --git a/maven/external/pom.xml b/maven/external/pom.xml new file mode 100644 index 0000000000..e916963073 --- /dev/null +++ b/maven/external/pom.xml @@ -0,0 +1,18 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + com.vertispan.j2cl.external + external-dependencies + pom + + org.eclipse + + \ No newline at end of file diff --git a/maven/frontend-common/pom.xml b/maven/frontend-common/pom.xml new file mode 100644 index 0000000000..e5889e24b2 --- /dev/null +++ b/maven/frontend-common/pom.xml @@ -0,0 +1,76 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + frontend-common + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/frontend/common/libcommon.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/frontend/common/libcommon-src.jar + jar + sources + + + + + + + + + + + com.google.auto.value + auto-value + + + com.google.guava + guava + + + com.google.jsinterop + jsinterop-annotations + + + com.google.code.findbugs + jsr305 + + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + \ No newline at end of file diff --git a/maven/frontend-javac/pom.xml b/maven/frontend-javac/pom.xml new file mode 100644 index 0000000000..0e460904f7 --- /dev/null +++ b/maven/frontend-javac/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + frontend-javac + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/frontend/javac/libjavac.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/frontend/javac/libjavac-src.jar + jar + sources + + + + + + + + + + + com.google.guava + guava + + + com.google.jsinterop + jsinterop-annotations + + + com.google.errorprone + javac + 1.9.0-dev-r2644-1 + + + + com.vertispan.j2cl + ast + ${project.version} + + + com.vertispan.j2cl + frontend-common + ${project.version} + + + \ No newline at end of file diff --git a/maven/frontend-jdt/pom.xml b/maven/frontend-jdt/pom.xml new file mode 100644 index 0000000000..a3371db2a3 --- /dev/null +++ b/maven/frontend-jdt/pom.xml @@ -0,0 +1,80 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + frontend-jdt + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/frontend/jdt/libjdt.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/frontend/jdt/libjdt-src.jar + jar + sources + + + + + + + + + + + com.google.auto.value + auto-value + + + com.google.guava + guava + + + com.google.jsinterop + jsinterop-annotations + + + com.vertispan.j2cl.external + org.eclipse.jdt.core + + + + com.vertispan.j2cl + ast + ${project.version} + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + frontend-common + ${project.version} + + + \ No newline at end of file diff --git a/maven/frontend/pom.xml b/maven/frontend/pom.xml new file mode 100644 index 0000000000..1d693a3f5e --- /dev/null +++ b/maven/frontend/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + frontend + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/frontend/libfrontend.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/frontend/libfrontend-src.jar + jar + sources + + + + + + + + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + com.vertispan.j2cl + frontend-common + ${project.version} + + + com.vertispan.j2cl + frontend-javac + ${project.version} + + + com.vertispan.j2cl + frontend-jdt + ${project.version} + + + \ No newline at end of file diff --git a/maven/gwt-incompatible-stripper/pom.xml b/maven/gwt-incompatible-stripper/pom.xml new file mode 100644 index 0000000000..006da5cb9f --- /dev/null +++ b/maven/gwt-incompatible-stripper/pom.xml @@ -0,0 +1,75 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + gwt-incompatible-stripper + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/tools/java/com/google/j2cl/tools/gwtincompatible/libgwtincompatible_lib.jar + jar + + + ../../bazel-bin/tools/java/com/google/j2cl/tools/gwtincompatible/libgwtincompatible_lib-src.jar + jar + sources + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + + + + args4j + args4j + + + com.google.guava + guava + + + com.vertispan.j2cl.external + org.eclipse.jdt.core + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + frontend-jdt + ${project.version} + + + \ No newline at end of file diff --git a/maven/gwt-internal-annotations/pom.xml b/maven/gwt-internal-annotations/pom.xml new file mode 100644 index 0000000000..5d3705a2ce --- /dev/null +++ b/maven/gwt-internal-annotations/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + gwt-internal-annotations + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/external/org_gwtproject_gwt/user/libgwt-javaemul-internal-annotations.jar + jar + + + ../../bazel-bin/external/org_gwtproject_gwt/user/libgwt-javaemul-internal-annotations-src.jar + jar + sources + + + + + + + + + \ No newline at end of file diff --git a/maven/javac-bootstrap-classpath/pom.xml b/maven/javac-bootstrap-classpath/pom.xml new file mode 100644 index 0000000000..9594f95019 --- /dev/null +++ b/maven/javac-bootstrap-classpath/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + javac-bootstrap-classpath + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/jre/java/libjre_bootclasspath.jar + jar + + + ../../bazel-bin/jre/java/libjre_bootclasspath-src.jar + jar + sources + + + + + + + + + + + + com.vertispan.j2cl + gwt-internal-annotations + ${project.version} + + + \ No newline at end of file diff --git a/maven/jre/pom.xml b/maven/jre/pom.xml new file mode 100644 index 0000000000..c9f0194125 --- /dev/null +++ b/maven/jre/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + jre + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/jre/java/libjre.jar + jar + + + ../../bazel-bin/jre/java/libjre-src.jar + jar + sources + + + ../../bazel-bin/jre/java/jre.js.zip + zip + jszip + + + + + + + + + + + com.google.jsinterop + jsinterop-annotations + 2.0.0 + + + + + com.vertispan.j2cl + gwt-internal-annotations + ${project.version} + + + + \ No newline at end of file diff --git a/maven/junit/annotations/pom.xml b/maven/junit/annotations/pom.xml new file mode 100644 index 0000000000..e439a8db4c --- /dev/null +++ b/maven/junit/annotations/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + ../../pom.xml + + junit-annotations + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../bazel-bin/junit/generator/java/com/google/j2cl/junit/apt/libinternal_junit_annotations.jar + jar + + + ../../../bazel-bin/junit/generator/java/com/google/j2cl/junit/apt/libinternal_junit_annotations-src.jar + jar + sources + + + + + + + + + \ No newline at end of file diff --git a/maven/junit/async/pom.xml b/maven/junit/async/pom.xml new file mode 100644 index 0000000000..0a73f71576 --- /dev/null +++ b/maven/junit/async/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + ../../pom.xml + + junit-async + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../bazel-bin/junit/generator/java/com/google/j2cl/junit/async/libasync.jar + jar + + + ../../../bazel-bin/junit/generator/java/com/google/j2cl/junit/async/libasync-src.jar + jar + sources + + + + + + + + + \ No newline at end of file diff --git a/maven/junit/closure-test/assembly.xml b/maven/junit/closure-test/assembly.xml new file mode 100644 index 0000000000..335f54c56b --- /dev/null +++ b/maven/junit/closure-test/assembly.xml @@ -0,0 +1,120 @@ + + jszip + + zip + + false + + + ../../../../closure-library/closure/goog/ + + + promise/resolver.js + async/freelist.js + async/workqueue.js + async/throwexception.js + string/internal.js + object/object.js + labs/useragent/util.js + array/array.js + labs/useragent/browser.js + dom/htmlelement.js + dom/tagname.js + debug/entrypointregistry.js + fs/url.js + string/typedstring.js + string/const.js + i18n/bidi.js + fs/blob.js + html/trustedtypes.js + html/safescript.js + html/trustedresourceurl.js + html/safeurl.js + html/safestyle.js + html/safestylesheet.js + dom/tags.js + html/safehtml.js + html/uncheckedconversions.js + dom/asserts.js + functions/functions.js + dom/safe.js + string/string.js + labs/useragent/platform.js + labs/useragent/engine.js + useragent/useragent.js + math/size.js + dom/browserfeature.js + math/math.js + math/coordinate.js + dom/dom.js + async/nexttick.js + async/run.js + promise/thenable.js + promise/promise.js + testing/stacktrace.js + testing/jsunitexception.js + testing/asserts.js + debug/errorcontext.js + debug/debug.js + testing/testcase.js + disposable/dispose.js + disposable/idisposable.js + disposable/disposeall.js + disposable/disposable.js + debug/errorhandler.js + events/listenablekey.js + events/listener.js + events/listenermap.js + events/browserfeature.js + events/eventtype.js + events/eventid.js + events/event.js + events/browserevent.js + events/listenable.js + events/events.js + events/eventhandler.js + math/box.js + math/irect.js + math/rect.js + dom/vendor.js + style/style.js + events/keycodes.js + events/eventtarget.js + testing/events/events.js + testing/propertyreplacer.js + testing/mockclock.js + testing/mockinterface.js + testing/mockmatchers.js + testing/mock.js + structs/collection.js + structs/structs.js + iter/iter.js + structs/map.js + structs/set.js + testing/strictmock.js + testing/loosemock.js + testing/functionmock.js + testing/mockcontrol.js + json/json.js + testing/testrunner.js + testing/jsunit.js + debug/relativetimeprovider.js + log/log.js + debug/logger.js + debug/formatter.js + debug/console.js + labs/testing/environment.js + testing/testsuite.js + events/eventwrapper.js + events/eventlike.js + + closure/goog + + + \ No newline at end of file diff --git a/maven/junit/closure-test/pom.xml b/maven/junit/closure-test/pom.xml new file mode 100644 index 0000000000..88956a9d87 --- /dev/null +++ b/maven/junit/closure-test/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + ../../pom.xml + + closure-test + pom + + Contains the requirements for a goog.testing.TestCase and testSuite to run in closure, + minus the contents of bootstrap. + + + + + + maven-assembly-plugin + 3.1.0 + + + prepare-package + single + + + + + assembly.xml + + + + + + \ No newline at end of file diff --git a/maven/junit/emul/pom.xml b/maven/junit/emul/pom.xml new file mode 100644 index 0000000000..8165ca7556 --- /dev/null +++ b/maven/junit/emul/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + ../../pom.xml + + junit-emul + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../bazel-bin/junit/emul/java/libjunit_emul.jar + jar + + + ../../../bazel-bin/junit/emul/java/libjunit_emul-src.jar + jar + sources + + + + + + + + + \ No newline at end of file diff --git a/maven/junit/gwttestcase/pom.xml b/maven/junit/gwttestcase/pom.xml new file mode 100644 index 0000000000..2d8ded4cb9 --- /dev/null +++ b/maven/junit/gwttestcase/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + ../../pom.xml + + gwttestcase-emul + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../bazel-bin/jre/javatests/com/google/gwt/junit/libgwttestcase_emul.jar + jar + + + ../../../bazel-bin/jre/javatests/com/google/gwt/junit/libgwttestcase_emul-src.jar + jar + sources + + + + + + + + + + + ${project.groupId} + junit-emul + ${project.version} + + + ${project.groupId} + junit-emul + ${project.version} + sources + + + \ No newline at end of file diff --git a/maven/junit/processor/pom.xml b/maven/junit/processor/pom.xml new file mode 100644 index 0000000000..29f9697260 --- /dev/null +++ b/maven/junit/processor/pom.xml @@ -0,0 +1,128 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + ../../pom.xml + + junit-processor + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.1 + + + package + + shade + + + + + com.google.jsinterop:jsinterop-annotations + + com.google.j2objc:j2objc-annotations + com.google.errorprone:error_prone_annotations + + + + + com.google.auto + junitprocessor.shaded.com.google.auto + + + com.google.common + junitprocessor.shaded.com.google.common + + + + + + + + afu + junitprocessor.shaded.afu + + + + + + true + + + com.google.auto:auto-common + + **/*.java + + + + com.google.auto.value:auto-value + + **/*.java + + + + + + + + + + + + + + + ${project.groupId} + junit-processor-unshaded + ${project.version} + + + com.google.auto + auto-common + + + com.google.auto.service + auto-service + + + com.google.auto.value + auto-value + + + com.google.guava + guava + + + com.google.jsinterop + jsinterop-annotations + + + org.apache.velocity + velocity-engine-core + + + com.google.code.findbugs + jsr305 + + + + + + + + + + \ No newline at end of file diff --git a/maven/junit/processor/unshaded-pom.xml b/maven/junit/processor/unshaded-pom.xml new file mode 100644 index 0000000000..9f85f02762 --- /dev/null +++ b/maven/junit/processor/unshaded-pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + ../../pom.xml + + junit-processor-unshaded + pom + Helper artifact, containing only the processor project. + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../../bazel-bin/junit/generator/java/com/google/j2cl/junit/apt/libjunit_processor.jar + jar + + + ../../../bazel-bin/junit/generator/java/com/google/j2cl/junit/apt/libjunit_processor-src.jar + jar + sources + + + + + + + + + + + ${project.groupId} + junit-async + ${project.version} + + + com.google.auto + auto-common + + + com.google.auto.service + auto-service + + + com.google.auto.value + auto-value + + + com.google.guava + guava + + + com.google.jsinterop + jsinterop-annotations + + + org.apache.velocity + velocity-engine-core + + + com.google.code.findbugs + jsr305 + + + \ No newline at end of file diff --git a/maven/minifier/pom.xml b/maven/minifier/pom.xml new file mode 100644 index 0000000000..615e64530b --- /dev/null +++ b/maven/minifier/pom.xml @@ -0,0 +1,57 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + minifier + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/tools/java/com/google/j2cl/tools/minifier/libminifier.jar + jar + + + ../../bazel-bin/tools/java/com/google/j2cl/tools/minifier/libminifier-src.jar + jar + sources + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + + + + com.google.guava + guava + + + + \ No newline at end of file diff --git a/maven/passes/pom.xml b/maven/passes/pom.xml new file mode 100644 index 0000000000..0c9a47ad5c --- /dev/null +++ b/maven/passes/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + passes + pom + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/passes/libpasses.jar + jar + + + ../../bazel-bin/transpiler/java/com/google/j2cl/transpiler/passes/libpasses-src.jar + jar + sources + + + + + + + + + + + com.google.guava + guava + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + \ No newline at end of file diff --git a/maven/pom.xml b/maven/pom.xml new file mode 100644 index 0000000000..f8b329a664 --- /dev/null +++ b/maven/pom.xml @@ -0,0 +1,235 @@ + + + 4.0.0 + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + pom + + + UTF-8 + UTF-8 + + 1.8 + 1.8 + + + + external + + common + common-visitor + ast + + backend + backend-common + backend-libraryinfo + backend-libraryinfo-proto + backend-closure + backend-wasm + + frontend + frontend-common + frontend-jdt + frontend-javac + + passes + + transpiler + + gwt-incompatible-stripper + minifier + + gwt-internal-annotations + jre + + bootstrap + + javac-bootstrap-classpath + + junit/emul + junit/gwttestcase + junit/closure-test + junit/annotations + junit/async + junit/processor/unshaded-pom.xml + junit/processor + + + + + vertispan-releases + Vertispan hosted artifacts-releases + https://repo.vertispan.com/j2cl + + + vertispan-snapshots + Vertispan hosted artifacts-snapshots + https://repo.vertispan.com/j2cl + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 1.4.1 + + + enforce + + + + + + + enforce + + + + + + + + + + + com.google.guava + guava + 25.0-jre + + + com.google.code.findbugs + jsr305 + + + + + com.google.auto.value + auto-value + 1.5.3 + + + com.google.code.findbugs + jsr305 + 3.0.1 + + + + org.apache.commons + commons-lang3 + 3.6 + + + org.apache.commons + commons-text + 1.2 + + + org.apache.commons + commons-lang3 + + + + + args4j + args4j + 2.33 + + + + com.google.protobuf + protobuf-java-util + 3.11.4 + + + + + com.google.guava + guava + + + com.google.errorprone + error_prone_annotations + + + com.google.code.gson + gson + + + + + com.google.code.gson + gson + 2.7 + + + com.google.auto + auto-common + 0.9 + + + com.google.auto.service + auto-service + 1.0-rc2 + + + org.apache.velocity + velocity-engine-core + 2.1 + + + com.vertispan.j2cl.external + org.eclipse.jdt.core + ${project.version} + + + + com.google.javascript + closure-compiler-unshaded + v20170409 + + + com.google.jsinterop + jsinterop-annotations + + + com.google.guava + guava + + + com.google.errorprone + error_prone_annotations + + + + com.google.protobuf + protobuf-java + + + + + + com.google.jsinterop + jsinterop-annotations + 1.0.2 + + + + \ No newline at end of file diff --git a/maven/transpiler/pom.xml b/maven/transpiler/pom.xml new file mode 100644 index 0000000000..9b336ec877 --- /dev/null +++ b/maven/transpiler/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + + + com.vertispan.j2cl + j2cl-parent + 0.9-SNAPSHOT + + transpiler + pom + + + + + org.apache.maven.plugins + maven-antrun-plugin + 3.0.0 + + + prepare-package + + run + + + + + + + + + + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + attach-artifacts + package + + attach-artifact + + + + + ${project.build.directory}/transpiler.jar + jar + + + ${project.build.directory}/transpiler-src.jar + jar + sources + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + + + + com.google.auto.value + auto-value + + + com.google.guava + guava + + + com.google.code.findbugs + jsr305 + + + + com.vertispan.j2cl + common + ${project.version} + + + com.vertispan.j2cl + ast + ${project.version} + + + com.vertispan.j2cl + backend + ${project.version} + + + com.vertispan.j2cl + frontend + ${project.version} + + + com.vertispan.j2cl + passes + ${project.version} + + + diff --git a/tools/java/com/google/j2cl/tools/gwtincompatible/GwtIncompatibleStripper.java b/tools/java/com/google/j2cl/tools/gwtincompatible/GwtIncompatibleStripper.java index 31d9a7ae1a..03050bd103 100644 --- a/tools/java/com/google/j2cl/tools/gwtincompatible/GwtIncompatibleStripper.java +++ b/tools/java/com/google/j2cl/tools/gwtincompatible/GwtIncompatibleStripper.java @@ -56,7 +56,7 @@ static void strip(List files, Path outputPath, Problems problems) { } /** Preprocess all provided files and put them to provided output path. */ - private static void preprocessFiles(List fileInfos, Path output, Problems problems) { + public static void preprocessFiles(List fileInfos, Path output, Problems problems) { for (FileInfo fileInfo : fileInfos) { String processedFileContent; try { diff --git a/transpiler/java/com/google/j2cl/common/OutputUtils.java b/transpiler/java/com/google/j2cl/common/OutputUtils.java index 066b47fe2f..58c91fbafa 100644 --- a/transpiler/java/com/google/j2cl/common/OutputUtils.java +++ b/transpiler/java/com/google/j2cl/common/OutputUtils.java @@ -90,6 +90,7 @@ private static FileSystem initZipOutput(Path output, Problems problems) { // Ensures that we will not fail if the zip already exists. output.toFile().delete(); + output.toFile().getParentFile().mkdirs(); try { return FileSystems.newFileSystem( diff --git a/transpiler/java/com/google/j2cl/common/SourceUtils.java b/transpiler/java/com/google/j2cl/common/SourceUtils.java index 045c1efc7a..5f332af759 100644 --- a/transpiler/java/com/google/j2cl/common/SourceUtils.java +++ b/transpiler/java/com/google/j2cl/common/SourceUtils.java @@ -34,11 +34,11 @@ public class SourceUtils { @AutoValue public abstract static class FileInfo implements Comparable { - private static FileInfo create(String sourcePath, String originalPath) { + public static FileInfo create(String sourcePath, String originalPath) { return create(sourcePath, originalPath, originalPath); } - private static FileInfo create(String sourcePath, String originalPath, String targetPath) { + public static FileInfo create(String sourcePath, String originalPath, String targetPath) { return new AutoValue_SourceUtils_FileInfo(sourcePath, originalPath, targetPath); } diff --git a/transpiler/java/com/google/j2cl/transpiler/J2clTranspiler.java b/transpiler/java/com/google/j2cl/transpiler/J2clTranspiler.java index 2f07751da0..fa28d2cf51 100644 --- a/transpiler/java/com/google/j2cl/transpiler/J2clTranspiler.java +++ b/transpiler/java/com/google/j2cl/transpiler/J2clTranspiler.java @@ -26,10 +26,10 @@ import java.util.concurrent.Future; /** Translation tool for generating JavaScript source files from Java sources. */ -class J2clTranspiler { +public class J2clTranspiler { /** Runs the entire J2CL pipeline. */ - static void transpile(J2clTranspilerOptions options, Problems problems) { + public static void transpile(J2clTranspilerOptions options, Problems problems) { // Compiler has no static state, but rather uses thread local variables. // Because of this, we invoke the compiler on a different thread each time. ExecutorService executorService = Executors.newSingleThreadExecutor(); diff --git a/transpiler/java/com/google/j2cl/transpiler/J2clTranspilerOptions.java b/transpiler/java/com/google/j2cl/transpiler/J2clTranspilerOptions.java index 51ef342735..a925c45dbc 100644 --- a/transpiler/java/com/google/j2cl/transpiler/J2clTranspilerOptions.java +++ b/transpiler/java/com/google/j2cl/transpiler/J2clTranspilerOptions.java @@ -57,6 +57,8 @@ public abstract class J2clTranspilerOptions { @Nullable public abstract ImmutableSet getWasmEntryPoints(); + public abstract Builder toBuilder(); + public static Builder newBuilder() { return new AutoValue_J2clTranspilerOptions.Builder().setExperimentalOptimizeAutovalue(false); }