diff --git a/app/build.gradle b/app/build.gradle index e88f37c5..1956abae 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply plugin: 'android-apt' android { compileSdkVersion 23 @@ -29,8 +30,10 @@ dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.3.0' - compile 'com.jakewharton:butterknife:7.0.1' + compile 'com.jakewharton:butterknife:8.0.1' compile 'com.github.yukuku:ambilwarna:2.0.1' + + apt 'com.jakewharton:butterknife-compiler:8.0.1' } def Properties props = new Properties() diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 9f53b884..25ea3346 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -15,16 +15,3 @@ #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} - -# Butterknife --keep class butterknife.** { *; } --dontwarn butterknife.internal.** --keep class **$$ViewBinder { *; } - --keepclasseswithmembernames class * { - @butterknife.* ; -} - --keepclasseswithmembernames class * { - @butterknife.* ; -} diff --git a/app/src/main/java/com/simplemobiletools/notes/AboutActivity.java b/app/src/main/java/com/simplemobiletools/notes/AboutActivity.java index 6efaf7d0..4234ae81 100644 --- a/app/src/main/java/com/simplemobiletools/notes/AboutActivity.java +++ b/app/src/main/java/com/simplemobiletools/notes/AboutActivity.java @@ -9,13 +9,13 @@ import android.widget.TextView; import java.util.Calendar; -import butterknife.Bind; +import butterknife.BindView; import butterknife.ButterKnife; public class AboutActivity extends AppCompatActivity { - @Bind(R.id.about_copyright) TextView copyright; - @Bind(R.id.about_version) TextView version; - @Bind(R.id.about_email) TextView emailTV; + @BindView(R.id.about_copyright) TextView copyright; + @BindView(R.id.about_version) TextView version; + @BindView(R.id.about_email) TextView emailTV; private Resources res; @Override diff --git a/app/src/main/java/com/simplemobiletools/notes/MainActivity.java b/app/src/main/java/com/simplemobiletools/notes/MainActivity.java index 3d950938..9d0c101d 100644 --- a/app/src/main/java/com/simplemobiletools/notes/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/notes/MainActivity.java @@ -14,12 +14,12 @@ import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.Toast; -import butterknife.Bind; +import butterknife.BindView; import butterknife.ButterKnife; public class MainActivity extends AppCompatActivity { private SharedPreferences prefs; - @Bind(R.id.notes_view) EditText notesView; + @BindView(R.id.notes_view) EditText notesView; @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/app/src/main/java/com/simplemobiletools/notes/MyWidgetConfigure.java b/app/src/main/java/com/simplemobiletools/notes/MyWidgetConfigure.java index f124feb4..2fc47cfa 100644 --- a/app/src/main/java/com/simplemobiletools/notes/MyWidgetConfigure.java +++ b/app/src/main/java/com/simplemobiletools/notes/MyWidgetConfigure.java @@ -13,17 +13,17 @@ import android.widget.RemoteViews; import android.widget.SeekBar; import android.widget.TextView; -import butterknife.Bind; +import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import yuku.ambilwarna.AmbilWarnaDialog; public class MyWidgetConfigure extends AppCompatActivity { - @Bind(R.id.config_bg_color) View bgColorPicker; - @Bind(R.id.config_bg_seekbar) SeekBar bgSeekBar; - @Bind(R.id.config_text_color) View textColorPicker; - @Bind(R.id.notes_view) TextView notesView; - @Bind(R.id.config_save) Button saveBtn; + @BindView(R.id.config_bg_color) View bgColorPicker; + @BindView(R.id.config_bg_seekbar) SeekBar bgSeekBar; + @BindView(R.id.config_text_color) View textColorPicker; + @BindView(R.id.notes_view) TextView notesView; + @BindView(R.id.config_save) Button saveBtn; private int widgetId; private int bgColor; diff --git a/build.gradle b/build.gradle index 03bced9f..cc19335c 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files