Repo created
This commit is contained in:
parent
81b91f4139
commit
f8c34fa5ee
22732 changed files with 4815320 additions and 2 deletions
|
|
@ -0,0 +1 @@
|
|||
smaier@chromium.org
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Contains flags that we'd like all Chromium .apks to use.
|
||||
|
||||
# Not needed for Android and saves a bit of processing time.
|
||||
-dontpreverify
|
||||
|
||||
# Keep line number information, useful for stack traces.
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# Keep all CREATOR fields within Parcelable that are kept.
|
||||
-keepclassmembers class * implements android.os.Parcelable {
|
||||
public static *** CREATOR;
|
||||
}
|
||||
|
||||
# Keep all default constructors for used Fragments. Required since they are
|
||||
# called reflectively when fragments are reinflated after the app is killed.
|
||||
-keepclassmembers class * extends android.app.Fragment {
|
||||
public <init>();
|
||||
}
|
||||
-keepclassmembers class * extends android.support.v4.app.Fragment {
|
||||
public <init>();
|
||||
}
|
||||
-keepclassmembers class * extends androidx.fragment.app.Fragment {
|
||||
public <init>();
|
||||
}
|
||||
|
||||
# Don't obfuscate Parcelables as they might be marshalled outside Chrome.
|
||||
# If we annotated all Parcelables that get put into Bundles other than
|
||||
# for saveInstanceState (e.g. PendingIntents), then we could actually keep the
|
||||
# names of just those ones. For now, we'll just keep them all.
|
||||
-keepnames class * implements android.os.Parcelable {}
|
||||
|
||||
# Keep all enum values and valueOf methods. See
|
||||
# http://proguard.sourceforge.net/index.html#manual/examples.html
|
||||
# for the reason for this. Also, see http://crbug.com/248037.
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
}
|
||||
|
||||
# Allows Proguard freedom in removing these log related calls.
|
||||
-assumenosideeffects class android.util.Log {
|
||||
static *** d(...);
|
||||
static *** v(...);
|
||||
static boolean isLoggable(...);
|
||||
}
|
||||
|
||||
# The following chart was created on July 20, 2016, to decide on 3 optimization
|
||||
# passes for Chrome.
|
||||
# optimization passes | time | .dex size | dirty memory per process
|
||||
# -----------------------------------------------------------------
|
||||
# 1 | 0:48 | 5805676 | 488972
|
||||
# 2 | 1:07 | 5777376 | 487092
|
||||
# 3 | 1:24 | 5772192 | 486596
|
||||
# 4 | 1:42 | 5771124 | 486484
|
||||
# 5 | 1:56 | 5770504 | 486432
|
||||
-optimizationpasses 3
|
||||
|
||||
# Horizontal class merging marginally increases dex size (as of Mar 2018).
|
||||
-optimizations !class/merging/horizontal
|
||||
|
||||
# Allowing Proguard to change modifiers. This change shrinks the .dex size by
|
||||
# ~1%, and reduces the method count by ~4%.
|
||||
-allowaccessmodification
|
||||
|
||||
# Workaround for crbug/1002847. Methods of BaseGmsClient are incorrectly
|
||||
# removed even though they are required for the derived class GmsClient
|
||||
# to correctly implement Api$Client.
|
||||
# TODO: remove once crbug/1002847 resolved.
|
||||
-keep public class com.google.android.gms.common.internal.BaseGmsClient {
|
||||
public void disconnect();
|
||||
public void dump(java.lang.String,java.io.FileDescriptor,java.io.PrintWriter,java.lang.String[]);
|
||||
public int getMinApkVersion();
|
||||
public boolean requiresSignIn();
|
||||
}
|
||||
|
||||
# Protobuf java lite runtime uses reflection
|
||||
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
|
||||
<fields>;
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Contains flags that can be safely shared with Cronet, and thus would be
|
||||
# appropriate for third-party apps to include.
|
||||
|
||||
# Keep all annotation related attributes that can affect runtime
|
||||
-keepattributes RuntimeVisible*Annotations
|
||||
-keepattributes AnnotationDefault
|
||||
|
||||
# Keep the annotations, because if we don't, the ProGuard rules that use them
|
||||
# will not be respected. These classes then show up in our final dex, which we
|
||||
# do not want - see crbug.com/628226.
|
||||
-keep @interface org.chromium.base.annotations.AccessedByNative
|
||||
-keep @interface org.chromium.base.annotations.CalledByNative
|
||||
-keep @interface org.chromium.base.annotations.CalledByNativeUnchecked
|
||||
-keep @interface org.chromium.base.annotations.DoNotInline
|
||||
-keep @interface org.chromium.base.annotations.RemovableInRelease
|
||||
-keep @interface org.chromium.base.annotations.UsedByReflection
|
||||
|
||||
# Android support library annotations will get converted to androidx ones
|
||||
# which we want to keep.
|
||||
-keep @interface androidx.annotation.Keep
|
||||
-keep @androidx.annotation.Keep class *
|
||||
-keepclasseswithmembers class * {
|
||||
@androidx.annotation.Keep <fields>;
|
||||
}
|
||||
-keepclasseswithmembers class * {
|
||||
@androidx.annotation.Keep <methods>;
|
||||
}
|
||||
|
||||
# Keeps for class level annotations.
|
||||
-keep @org.chromium.base.annotations.UsedByReflection class ** {}
|
||||
|
||||
# Keeps for method level annotations.
|
||||
-keepclasseswithmembers class ** {
|
||||
@org.chromium.base.annotations.AccessedByNative <fields>;
|
||||
}
|
||||
-keepclasseswithmembers,includedescriptorclasses class ** {
|
||||
@org.chromium.base.annotations.CalledByNative <methods>;
|
||||
}
|
||||
-keepclasseswithmembers,includedescriptorclasses class ** {
|
||||
@org.chromium.base.annotations.CalledByNativeUnchecked <methods>;
|
||||
}
|
||||
-keepclasseswithmembers class ** {
|
||||
@org.chromium.base.annotations.UsedByReflection <methods>;
|
||||
}
|
||||
-keepclasseswithmembers class ** {
|
||||
@org.chromium.base.annotations.UsedByReflection <fields>;
|
||||
}
|
||||
# Even unused methods kept due to explicit jni registration:
|
||||
# https://crbug.com/688465.
|
||||
-keepclasseswithmembers,includedescriptorclasses class !org.chromium.base.library_loader.**,** {
|
||||
native <methods>;
|
||||
}
|
||||
-keepclasseswithmembernames,includedescriptorclasses class org.chromium.base.library_loader.** {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
-assumenosideeffects class ** {
|
||||
# Remove @RemovableInRelease methods so long as return values are unused.
|
||||
@org.chromium.base.annotations.RemovableInRelease <methods>;
|
||||
# Remove object @RemovableInRelease methods even when return value is used.
|
||||
# Note: * in return type does not match primitives.
|
||||
@org.chromium.base.annotations.RemovableInRelease * *(...) return null;
|
||||
# Remove boolean @RemovableInRelease methods even when return value is used.
|
||||
@org.chromium.base.annotations.RemovableInRelease boolean *(...) return false;
|
||||
}
|
||||
|
||||
# Never inline classes or methods with this annotation, but allow shrinking and
|
||||
# obfuscation.
|
||||
-keep,allowobfuscation,allowoptimization @org.chromium.base.annotations.DoNotInline class ** {
|
||||
<methods>;
|
||||
}
|
||||
-keepclassmembers,allowobfuscation,allowoptimization class ** {
|
||||
@org.chromium.base.annotations.DoNotInline <methods>;
|
||||
}
|
||||
|
||||
# Keep all CREATOR fields within Parcelable that are kept.
|
||||
-keepclassmembers class org.chromium.** implements android.os.Parcelable {
|
||||
public static *** CREATOR;
|
||||
}
|
||||
|
||||
# Don't obfuscate Parcelables as they might be marshalled outside Chrome.
|
||||
# If we annotated all Parcelables that get put into Bundles other than
|
||||
# for saveInstanceState (e.g. PendingIntents), then we could actually keep the
|
||||
# names of just those ones. For now, we'll just keep them all.
|
||||
-keepnames class org.chromium.** implements android.os.Parcelable {}
|
||||
|
||||
# Keep all enum values and valueOf methods. See
|
||||
# http://proguard.sourceforge.net/index.html#manual/examples.html
|
||||
# for the reason for this. Also, see http://crbug.com/248037.
|
||||
-keepclassmembers enum org.chromium.** {
|
||||
public static **[] values();
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Disables obfuscation while still allowing optimizations.
|
||||
-keepnames,allowoptimization class *** {
|
||||
*;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# As of August 11, 2016, obfuscation was found to save 660kb on our .dex size
|
||||
# and 53kb memory/process (through shrinking method/string counts).
|
||||
-repackageclasses ''
|
||||
Loading…
Add table
Add a link
Reference in a new issue