mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Sweeping update of gradle and dependency versions. (#1858)
* Sweeping update of gradle and library versions. This updates all of the dependencies of the project to their latest versions. Everyone should please upgrade to the latest version of Android Studio, update your build tools, and keep your version of Gradle and the Kotlin plugin up to date. * Update build tools in travis. * Remove cruft and fix tests. * Remove even more stuff. * Reinstate instrumented tests. * Update emulator image in travis. * Localisation updates from https://translatewiki.net. * Work towards eliminating string literals from code. (#1861) String literals are being used in many places in the code, instead of proper string resources which are automatically localized. This PR replaces many of the string literals with pre-packaged resources, or will add the appropriate string if necessary. * Add button on image details to copy wikicode to clipboard (#1849) * Add button on image details to copy wikicode to clipboard * Make copy wikicode button width the same as the nominate deletion button width by filling in background * Build fix * Enable ProGuard for Debug and Release builds. This enables ProGuard minification, which significantly shrinks the APK (for both debug and release configurations) and vastly decreases the method count. * Add ProGuard rules for test builds.
This commit is contained in:
parent
1dd7cbb614
commit
fc30f1b5ec
12 changed files with 112 additions and 63 deletions
|
|
@ -1,4 +1,58 @@
|
|||
-dontobfuscate
|
||||
-ignorewarnings
|
||||
|
||||
-keep class org.apache.http.** { *; }
|
||||
-dontwarn org.apache.http.**
|
||||
-keep class android.support.v7.widget.ShareActionProvider { *; }
|
||||
-keep class android.support.v7.widget.ShareActionProvider { *; }
|
||||
|
||||
# --- Butter Knife ---
|
||||
# Finder.castParam() is stripped when not needed and ProGuard notes it
|
||||
# unnecessarily. When castParam() is needed, it's not stripped. e.g.:
|
||||
#
|
||||
# @OnItemSelected(value = R.id.history_entry_list)
|
||||
# void foo(ListView bar) {
|
||||
# L.d("baz");
|
||||
# }
|
||||
|
||||
-dontnote butterknife.internal.**
|
||||
# --- /Butter Knife ---
|
||||
|
||||
# --- Retrofit2 ---
|
||||
# Platform calls Class.forName on types which do not exist on Android to determine platform.
|
||||
-dontnote retrofit2.Platform
|
||||
# Platform used when running on Java 8 VMs. Will not be used at runtime.
|
||||
-dontwarn retrofit2.Platform$Java8
|
||||
# Retain generic type information for use by reflection by converters and adapters.
|
||||
-keepattributes Signature
|
||||
# Retain declared checked exceptions for use by a Proxy instance.
|
||||
-keepattributes Exceptions
|
||||
# --- /Retrofit ---
|
||||
|
||||
# --- OkHttp + Okio ---
|
||||
-dontwarn okhttp3.**
|
||||
-dontwarn okio.**
|
||||
# --- /OkHttp + Okio ---
|
||||
|
||||
# --- Gson ---
|
||||
# https://github.com/google/gson/blob/master/examples/android-proguard-example/proguard.cfg
|
||||
|
||||
# Gson uses generic type information stored in a class file when working with fields. Proguard
|
||||
# removes such information by default, so configure it to keep all of it.
|
||||
-keepattributes Signature
|
||||
|
||||
# For using GSON @Expose annotation
|
||||
-keepattributes *Annotation*
|
||||
|
||||
# Gson specific classes
|
||||
-dontwarn sun.misc.**
|
||||
#-keep class com.google.gson.stream.** { *; }
|
||||
|
||||
# Application classes that will be serialized/deserialized over Gson
|
||||
-keep class com.google.gson.examples.android.model.** { *; }
|
||||
|
||||
# Prevent proguard from stripping interface information from TypeAdapterFactory,
|
||||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
|
||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||
-keep class * implements com.google.gson.JsonSerializer
|
||||
-keep class * implements com.google.gson.JsonDeserializer
|
||||
# --- /Gson ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue