Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1358)

Unified Diff: build/android/gyp/javac.py

Issue 2543463002: Add retrolambda.py and integrate it to build process. (Closed)
Patch Set: Addressing comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/gyp/retrolambda.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/javac.py
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py
index 7b346cfffac800051b387758a420bc894d75655f..926f275f2bf7e02d47d4b07d8a42ff606745f7dd 100755
--- a/build/android/gyp/javac.py
+++ b/build/android/gyp/javac.py
@@ -4,6 +4,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import distutils.spawn
import optparse
import os
import shutil
@@ -319,6 +320,13 @@ def _ParseOptions(argv):
for arg in options.bootclasspath:
bootclasspath += build_utils.ParseGnList(arg)
options.bootclasspath = bootclasspath
+ if options.java_version == '1.8' and options.bootclasspath:
+ # Android's boot jar doesn't contain all java 8 classes.
+ # See: https://github.com/evant/gradle-retrolambda/issues/23.
+ javac_path = os.path.realpath(distutils.spawn.find_executable('javac'))
+ jdk_dir = os.path.dirname(os.path.dirname(javac_path))
+ rt_jar = os.path.join(jdk_dir, 'jre', 'lib', 'rt.jar')
+ options.bootclasspath.append(rt_jar)
classpath = []
for arg in options.classpath:
« no previous file with comments | « no previous file | build/android/gyp/retrolambda.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698