blob: cd0bc717bee5833007d4ef5041dfdb97a6908775 [file] [log] [blame]
Name: R8
URL: https://r8.googlesource.com/r8
Revision: e13467c2cee237bceaa4d002472ede43d9a116e8
Version: unknown
License: BSD 3-Clause
License File: NOT_SHIPPED
Security Critical: no
Description:
lib/r8.jar
- Contains R8 (proguard replacement) as well as D8 (dexer).
desugar_jdk_libs.json
- Configuration for Java library desugaring.
- Taken from
//third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration/
inside the jar file, in META-INF/desugar/d8/desugar.json. License is also BSD
3-Clause (the r8 version).
R8 is a proguard-like optimizer that also has the ability to dex.
Local Modifications:
* Refer to commit descriptions within "patches" directory.
* Added "playground" directory for quick "how does this optimize" tests.
Update Instructions:
# Download R8:
git clone https://r8.googlesource.com/r8
cd r8
# Find latest tag:
git fetch origin --tags
git tag -l # Often unnecessary as output from the fetch includes recent tags.
git checkout $TAG # e.g. 2.2.9-dev
# Apply patches:
git checkout -b my_branch
git am $CHROMIUM_SRC/third_party/r8/patches/*.patch
# Build:
tools/gradle.py r8
# Shrink (improves r8/d8 launch time):
java -jar build/libs/r8.jar --debug --classfile --output r8.jar \
--lib $CHROMIUM_SRC/third_party/jdk/current --pg-conf src/main/keep.txt \
--no-minification --no-desugaring build/libs/r8.jar
rm $CHROMIUM_SRC/third_party/r8/lib/r8.jar
cp r8.jar $CHROMIUM_SRC/third_party/r8/lib/r8.jar
# Create patches if conflicts / new patches. Change number if expecting
# different amount of patches:
git format-patch -3 -o $CHROMIUM_SRC/third_party/r8/patches
# Upload to CIPD:
cd $CHROMIUM_SRC/third_party/r8
cipd create --pkg-def cipd.yaml # Make note of the instance ID
# Manually update:
* README.chromium (version number via "java -cp lib/r8.jar com.android.tools.r8.R8 --version")
* //DEPS (instance ID output by cipd create)