Skip to content

Commit

Permalink
+= Proguard.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbutcher committed Feb 11, 2016
1 parent 62611ab commit 0a9a3f2
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 10 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ android {
versionCode gitCommitCount
versionName gitTag
archivesBaseName = "plaid-${versionName}"
resConfig "en"
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
buildConfigField "String", "DRIBBBLE_CLIENT_ID", "\"${dribbble_client_id}\""
buildConfigField "String", "DRIBBBLE_CLIENT_SECRET", "\"${dribbble_client_secret}\""
Expand All @@ -43,14 +44,13 @@ android {
"DESIGNER_NEWS_CLIENT_SECRET", "\"${designer_news_client_secret}\""
buildConfigField "String",
"PROCUCT_HUNT_DEVELOPER_TOKEN", "\"${product_hunt_developer_token}\""

}
buildTypes {
release {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}
}
compileOptions {
Expand Down
55 changes: 55 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# Copyright 2016 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.
#

-dontobfuscate #STOPSHIP remove this
-dontwarn butterknife.internal.**
-dontwarn com.squareup.okhttp.**
-dontwarn okio.**
-dontwarn retrofit.**
-dontwarn rx.**

-keep class io.plaidapp.data.api.dribbble.model.** { *; }
-keep class io.plaidapp.data.api.designernews.model.** { *; }
-keep class io.plaidapp.data.api.producthunt.model.** { *; }
-keep class io.plaidapp.ui.transitions.** { *; }

-keep class android.support.v7.widget.LinearLayoutManager {
public protected *;
}
-keep class butterknife.** { *; }
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-keep class in.uncod.android.bypass.** { *; }
-keep class retrofit.** { *; }
-keep class retrofit.** { *; }
-keep class **$$ViewBinder { *; }

-keepattributes *Annotation*,Signature,Exceptions

-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}
-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}
-keepclasseswithmembers class * {
@retrofit.http.* <methods>;
}
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Plaid">

<activity
android:name=".ui.HomeActivity"
android:label="@string/app_name"
Expand Down
24 changes: 19 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
/*
* Copyright 2015 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.
*/

buildscript {

repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-beta2'
}

}

0 comments on commit 0a9a3f2

Please sign in to comment.