Skip to content

Commit c7b5399

Browse files
therajanmauryadroidchef
authored andcommitted
Butter knife (#288)
* removed unused file * Butter Knife 6.0.1 to 8.0.1 * Butter Knife 6.0.1 to 8.0.1 upgraded in whole project Successfully * unused import removed * butter knife progurd rules removed * build changes * gradle.properties file added
1 parent e3dc5c7 commit c7b5399

File tree

73 files changed

+473
-841
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+473
-841
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ext {
2424
retrofitVersionLatest = '2.0.0'
2525
okHttpVersion = '2.0.0'
2626
flipTableVersion = '1.0.1'
27-
butterKnifeVersion = '6.1.0'
27+
butterKnifeVersion = '8.0.1'
2828

2929

3030
}

gradle.properties

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14+
15+
# When configured, Gradle will run in incubating parallel mode.
16+
# This option should only be used with decoupled projects. More details, visit
17+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18+
# org.gradle.parallel=true
19+
org.gradle.daemon=true
20+
org.gradle.jvmargs=-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m

mifosng-android/build.gradle

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,12 @@ tasks.withType(com.android.build.gradle.tasks.PackageApplication) {
114114
pkgTask.jniFolders.add(new File(buildDir, 'native-libs'))
115115
}
116116

117-
allprojects {
118-
tasks.withType(JavaCompile) {
119-
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
117+
tasks.withType(JavaCompile) {
118+
configure(options) {
119+
// TODO
120+
compilerArgs << "-Xlint:deprecation"
121+
compilerArgs << "-Xlint:-unchecked"
122+
compilerArgs << "-Xlint:-rawtypes"
120123
}
121124
}
122125

@@ -145,14 +148,19 @@ dependencies {
145148
compile "com.google.dagger:dagger:$rootProject.daggerVersion"
146149
provided 'javax.annotation:jsr250-api:1.0' //Required by Dagger2
147150

151+
//Butter Knife
152+
compile "com.jakewharton:butterknife:$rootProject.butterKnifeVersion"
153+
apt "com.jakewharton:butterknife-compiler:$rootProject.butterKnifeVersion"
154+
155+
148156
//Square dependencies
149157
compile "com.squareup.retrofit:retrofit:$rootProject.retrofitVersion"
150158
compile "com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersionLatest"
151159
compile "com.squareup.retrofit2:adapter-rxjava:$rootProject.retrofitVersionLatest"
152160
compile "com.squareup.okhttp:okhttp:$rootProject.okHttpVersion"
153161
compile "com.squareup.okhttp:okhttp-urlconnection:$rootProject.okHttpVersion"
154162
compile "com.jakewharton.fliptables:fliptables:$rootProject.flipTableVersion"
155-
compile "com.jakewharton:butterknife:$rootProject.butterKnifeVersion"
163+
156164
compile 'javax.annotation:jsr250-api:1.0@jar'
157165
compile 'com.squareup:otto:1.3.8'
158166

mifosng-android/proguard-rules.pro

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818

1919
-dontobfuscate
2020

21-
-keep class butterknife.** { *; }
22-
-dontwarn butterknife.internal.**
23-
-keep class **$$ViewInjector { *; }
24-
25-
-keepclasseswithmembernames class * {
26-
@butterknife.* <fields>;
27-
}
28-
29-
-keepclasseswithmembernames class * {
30-
@butterknife.* <methods>;
31-
}
21+
#-keep class butterknife.** { *; }
22+
#-dontwarn butterknife.internal.**
23+
#-keep class **$$ViewInjector { *; }
24+
#
25+
#-keepclasseswithmembernames class * {
26+
# @butterknife.* <fields>;
27+
#}
28+
#
29+
#-keepclasseswithmembernames class * {
30+
# @butterknife.* <methods>;
31+
#}

mifosng-android/src/instrumentTest/java/com/mifos/mifosxdroid/tests/SavingsAccountSummaryFragmentTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public DepositType(Integer id, String code, String value) {
8080
//waiting for the API
8181
Thread.sleep(8000);
8282

83-
//instantiating the views that we're going to test@InjectView(R.id.tv_clientName)
83+
//instantiating the views that we're going to test@BindView(R.id.tv_clientName)
8484
tv_clientName = (TextView) clientActivity.findViewById(R.id.tv_clientName);
8585
quickContactBadge = (QuickContactBadge) clientActivity.findViewById(R.id
8686
.quickContactBadge_client);

mifosng-android/src/main/java/com/mifos/App.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import com.crashlytics.android.Crashlytics;
1212
import com.joanzapata.iconify.Iconify;
1313
import com.joanzapata.iconify.fonts.MaterialModule;
14-
import com.mifos.api.ApiManager;
14+
import com.mifos.api.BaseApiManager;
1515
import com.mifos.mifosxdroid.injection.component.ApplicationComponent;
1616
import com.mifos.mifosxdroid.injection.component.DaggerApplicationComponent;
1717
import com.mifos.mifosxdroid.injection.module.ApplicationModule;
@@ -27,7 +27,7 @@ public class App extends SugarApp {
2727

2828
public static final Map<Integer, Typeface> typefaceManager = new HashMap<>();
2929

30-
public static ApiManager apiManager;
30+
public static BaseApiManager baseApiManager;
3131

3232
private static App instance;
3333

@@ -51,7 +51,7 @@ public void onCreate() {
5151
instance = this;
5252
Crashlytics.start(this);
5353

54-
apiManager = new ApiManager();
54+
baseApiManager = new BaseApiManager();
5555
Iconify.with(new MaterialModule());
5656
}
5757

0 commit comments

Comments
 (0)