Permalink
Please sign in to comment.
Browse files
Update J2CL javac compilation to set the bootclasspath.
CL also adds extra emul classes to be included in the classpath since javac expects them due to byte code references which were fulfilled by JDK earlier. However these dependencies have been split off and no longer transpiled to JavaScript. See the related BUILD for the details of the new setup. PiperOrigin-RevId: 232759511
- Loading branch information...
Showing
with
128 additions
and 16 deletions.
- +7 −0 build_defs/internal_do_not_use/BUILD
- +7 −2 build_defs/internal_do_not_use/j2cl_java_library.bzl
- +4 −1 build_defs/internal_do_not_use/j2cl_transpile.bzl
- +30 −1 jre/java/BUILD
- +2 −1 jre/java/j2cl_mirror_from_gwt.bzl
- +21 −0 jre/java/javasynth/LambdaMetafactory.java
- +17 −0 jre/java/javasynth/MethodHandle.java
- +4 −6 jre/java/{java/lang/invoke → javasynth}/MethodHandles.java
- +17 −0 jre/java/javasynth/MethodType.java
- +17 −0 jre/java/javasynth/NoSuchFieldError.java
- +1 −5 jre/java/{java/lang/invoke → javasynth}/SerializedLambda.java
- +1 −0 transpiler/javatests/com/google/j2cl/transpiler/integration/BUILD
@@ -0,0 +1,21 @@ | |||
/* | |||
* Copyright 2019 Google Inc. | |||
* | |||
* Licensed 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. | |||
*/ | |||
package java.lang.invoke; | |||
|
|||
/** Exists solely to make javac happy. */ | |||
public class LambdaMetafactory { | |||
public void metafactory(Object... a) {} | |||
|
|||
public void altMetafactory(Object... a) {} | |||
} |
@@ -0,0 +1,17 @@ | |||
/* | |||
* Copyright 2019 Google Inc. | |||
* | |||
* Licensed 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. | |||
*/ | |||
package java.lang.invoke; | |||
|
|||
/** Exists solely to make javac happy. */ | |||
class MethodHandle {} |
@@ -0,0 +1,17 @@ | |||
/* | |||
* Copyright 2019 Google Inc. | |||
* | |||
* Licensed 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. | |||
*/ | |||
package java.lang.invoke; | |||
|
|||
/** Exists solely to make javac happy. */ | |||
class MethodType {} |
@@ -0,0 +1,17 @@ | |||
/* | |||
* Copyright 2019 Google Inc. | |||
* | |||
* Licensed 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. | |||
*/ | |||
package java.lang; | |||
|
|||
/** Exists solely to make javac happy. */ | |||
class NoSuchFieldError {} |
0 comments on commit
09ed7ba