Skip to content

Commit

Permalink
Merge pull request nickbutcher#85 from ravikumar-n/master
Browse files Browse the repository at this point in the history
Updated to Butterknife-8.0.1
  • Loading branch information
nickbutcher committed May 9, 2016
2 parents 8e21f01 + c7efc6d commit 62b7750
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 122 deletions.
12 changes: 11 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

// query git for the SHA, Tag and commit count. Use these to automate versioning.
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
Expand Down Expand Up @@ -78,7 +87,8 @@ dependencies {
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.github.bumptech.glide:okhttp-integration:1.3.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
compile 'org.jsoup:jsoup:1.8.3'
compile project(':bypass')
}
9 changes: 0 additions & 9 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#

-dontobfuscate #STOPSHIP remove this
-dontwarn butterknife.internal.**
-dontwarn com.squareup.okhttp.**
-dontwarn okio.**
-dontwarn retrofit.**
Expand All @@ -29,7 +28,6 @@
-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;
Expand All @@ -40,16 +38,9 @@
-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>;
}
20 changes: 10 additions & 10 deletions app/src/main/java/io/plaidapp/ui/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

import java.security.InvalidParameterException;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import in.uncod.android.bypass.Bypass;
import io.plaidapp.R;
Expand All @@ -59,9 +59,9 @@
*/
public class AboutActivity extends Activity {

@Bind(R.id.draggable_frame) ElasticDragDismissFrameLayout draggableFrame;
@Bind(R.id.pager) ViewPager pager;
@Bind(R.id.indicator) InkPageIndicator pageIndicator;
@BindView(R.id.draggable_frame) ElasticDragDismissFrameLayout draggableFrame;
@BindView(R.id.pager) ViewPager pager;
@BindView(R.id.indicator) InkPageIndicator pageIndicator;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -92,11 +92,11 @@ public void onDragDismissed() {
static class AboutPagerAdapter extends PagerAdapter {

private View aboutPlaid;
@Nullable @Bind(R.id.about_description) TextView plaidDescription;
@Nullable @BindView(R.id.about_description) TextView plaidDescription;
private View aboutIcon;
@Nullable @Bind(R.id.icon_description) TextView iconDescription;
@Nullable @BindView(R.id.icon_description) TextView iconDescription;
private View aboutLibs;
@Nullable @Bind(R.id.libs_list) RecyclerView libsList;
@Nullable @BindView(R.id.libs_list) RecyclerView libsList;

private final LayoutInflater layoutInflater;
private final Bypass markdown;
Expand Down Expand Up @@ -262,9 +262,9 @@ public void onClick(View v) {

static class LibraryHolder extends RecyclerView.ViewHolder {

@Bind(R.id.library_image) ImageView image;
@Bind(R.id.library_name) TextView name;
@Bind(R.id.library_link) Button link;
@BindView(R.id.library_image) ImageView image;
@BindView(R.id.library_name) TextView name;
@BindView(R.id.library_link) Button link;

public LibraryHolder(View itemView) {
super(itemView);
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/java/io/plaidapp/ui/DesignerNewsLogin.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
import java.util.Map;
import java.util.Set;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.plaidapp.BuildConfig;
import io.plaidapp.R;
Expand All @@ -81,17 +81,17 @@ public class DesignerNewsLogin extends Activity {
private static final int PERMISSIONS_REQUEST_GET_ACCOUNTS = 0;

boolean isDismissing = false;
@Bind(R.id.container) ViewGroup container;
@Bind(R.id.dialog_title) TextView title;
@Bind(R.id.username_float_label) TextInputLayout usernameLabel;
@Bind(R.id.username) AutoCompleteTextView username;
@Bind(R.id.permission_primer) CheckBox permissionPrimer;
@Bind(R.id.password_float_label) TextInputLayout passwordLabel;
@Bind(R.id.password) EditText password;
@Bind(R.id.actions_container) FrameLayout actionsContainer;
@Bind(R.id.signup) Button signup;
@Bind(R.id.login) Button login;
@Bind(R.id.loading) ProgressBar loading;
@BindView(R.id.container) ViewGroup container;
@BindView(R.id.dialog_title) TextView title;
@BindView(R.id.username_float_label) TextInputLayout usernameLabel;
@BindView(R.id.username) AutoCompleteTextView username;
@BindView(R.id.permission_primer) CheckBox permissionPrimer;
@BindView(R.id.password_float_label) TextInputLayout passwordLabel;
@BindView(R.id.password) EditText password;
@BindView(R.id.actions_container) FrameLayout actionsContainer;
@BindView(R.id.signup) Button signup;
@BindView(R.id.login) Button login;
@BindView(R.id.loading) ProgressBar loading;
private DesignerNewsPrefs designerNewsPrefs;
private boolean shouldPromptForPermission = false;

Expand Down
30 changes: 15 additions & 15 deletions app/src/main/java/io/plaidapp/ui/DesignerNewsStory.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
import java.util.Date;
import java.util.List;

import butterknife.Bind;
import butterknife.BindDimen;
import butterknife.BindInt;
import butterknife.BindView;
import butterknife.ButterKnife;
import in.uncod.android.bypass.Bypass;
import in.uncod.android.bypass.style.ImageLoadingSpan;
Expand Down Expand Up @@ -110,15 +110,15 @@ public class DesignerNewsStory extends Activity {
private static final int RC_LOGIN_UPVOTE = 7;

private View header;
@Bind(R.id.comments_list) RecyclerView commentsList;
@BindView(R.id.comments_list) RecyclerView commentsList;
private LinearLayoutManager layoutManager;
private DesignerNewsCommentsAdapter commentsAdapter;
@Bind(R.id.fab) ImageButton fab;
@Bind(R.id.fab_expand) View fabExpand;
@Bind(R.id.comments_container) ElasticDragDismissFrameLayout draggableFrame;
@BindView(R.id.fab) ImageButton fab;
@BindView(R.id.fab_expand) View fabExpand;
@BindView(R.id.comments_container) ElasticDragDismissFrameLayout draggableFrame;
private ElasticDragDismissFrameLayout.SystemChromeFader chromeFader;
@Nullable @Bind(R.id.backdrop_toolbar) CollapsingTitleLayout collapsingToolbar;
@Nullable @Bind(R.id.story_title_background) PinnedOffsetView toolbarBackground;
@Nullable @BindView(R.id.backdrop_toolbar) CollapsingTitleLayout collapsingToolbar;
@Nullable @BindView(R.id.story_title_background) PinnedOffsetView toolbarBackground;
private Button upvoteStory;
private EditText enterComment;
private ImageButton postComment;
Expand Down Expand Up @@ -1011,10 +1011,10 @@ private void bindCommentReply(CommentReplyHolder holder) {

/* package */ static class CommentHolder extends RecyclerView.ViewHolder {

@Bind(R.id.depth) ImageView threadDepth;
@Bind(R.id.comment_author) AuthorTextView author;
@Bind(R.id.comment_time_ago) TextView timeAgo;
@Bind(R.id.comment_text) TextView comment;
@BindView(R.id.depth) ImageView threadDepth;
@BindView(R.id.comment_author) AuthorTextView author;
@BindView(R.id.comment_time_ago) TextView timeAgo;
@BindView(R.id.comment_text) TextView comment;

public CommentHolder(View itemView) {
super(itemView);
Expand All @@ -1024,10 +1024,10 @@ public CommentHolder(View itemView) {

/* package */ static class CommentReplyHolder extends RecyclerView.ViewHolder {

@Bind(R.id.comment_votes) Button commentVotes;
@Bind(R.id.comment_reply_label) TextInputLayout replyLabel;
@Bind(R.id.comment_reply) EditText commentReply;
@Bind(R.id.post_reply) ImageButton postReply;
@BindView(R.id.comment_votes) Button commentVotes;
@BindView(R.id.comment_reply_label) TextInputLayout replyLabel;
@BindView(R.id.comment_reply) EditText commentReply;
@BindView(R.id.post_reply) ImageButton postReply;

public CommentReplyHolder(View itemView) {
super(itemView);
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/io/plaidapp/ui/DribbbleShot.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
import java.text.NumberFormat;
import java.util.List;

import butterknife.Bind;
import butterknife.BindDimen;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.plaidapp.R;
import io.plaidapp.data.api.dribbble.DribbbleService;
Expand Down Expand Up @@ -119,10 +119,10 @@ public class DribbbleShot extends Activity {
private static final int RC_LOGIN_COMMENT = 1;
private static final float SCRIM_ADJUSTMENT = 0.075f;

@Bind(R.id.draggable_frame) ElasticDragDismissFrameLayout draggableFrame;
@Bind(R.id.back) ImageButton back;
@Bind(R.id.shot) ParallaxScrimageView imageView;
@Bind(R.id.fab_heart) FABToggle fab;
@BindView(R.id.draggable_frame) ElasticDragDismissFrameLayout draggableFrame;
@BindView(R.id.back) ImageButton back;
@BindView(R.id.shot) ParallaxScrimageView imageView;
@BindView(R.id.fab_heart) FABToggle fab;
private View shotSpacer;
private View title;
private View description;
Expand Down
14 changes: 7 additions & 7 deletions app/src/main/java/io/plaidapp/ui/FeedAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
import java.util.Collections;
import java.util.List;

import butterknife.Bind;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.plaidapp.R;
import io.plaidapp.data.DataLoadingSubject;
Expand Down Expand Up @@ -652,9 +652,9 @@ public DribbbleShotHolder(View itemView) {

/* package */ static class DesignerNewsStoryHolder extends RecyclerView.ViewHolder {

@Bind(R.id.story_title) TextView title;
@Bind(R.id.story_comments) TextView comments;
@Bind(R.id.pocket) ImageButton pocket;
@BindView(R.id.story_title) TextView title;
@BindView(R.id.story_comments) TextView comments;
@BindView(R.id.pocket) ImageButton pocket;

public DesignerNewsStoryHolder(View itemView, boolean pocketIsInstalled) {
super(itemView);
Expand All @@ -665,9 +665,9 @@ public DesignerNewsStoryHolder(View itemView, boolean pocketIsInstalled) {

/* package */ static class ProductHuntStoryHolder extends RecyclerView.ViewHolder {

@Bind(R.id.hunt_title) TextView title;
@Bind(R.id.tagline) TextView tagline;
@Bind(R.id.story_comments) TextView comments;
@BindView(R.id.hunt_title) TextView title;
@BindView(R.id.tagline) TextView tagline;
@BindView(R.id.story_comments) TextView comments;

public ProductHuntStoryHolder(View itemView) {
super(itemView);
Expand Down
16 changes: 8 additions & 8 deletions app/src/main/java/io/plaidapp/ui/HomeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
import java.util.Collections;
import java.util.List;

import butterknife.Bind;
import butterknife.BindInt;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import io.plaidapp.R;
Expand Down Expand Up @@ -106,13 +106,13 @@ public class HomeActivity extends Activity {
private static final int RC_NEW_DESIGNER_NEWS_STORY = 4;
private static final int RC_NEW_DESIGNER_NEWS_LOGIN = 5;

@Bind(R.id.drawer) DrawerLayout drawer;
@Bind(R.id.toolbar) Toolbar toolbar;
@Bind(R.id.grid) RecyclerView grid;
@Bind(R.id.fab) ImageButton fab;
@Bind(R.id.filters) RecyclerView filtersList;
@Bind(android.R.id.empty) ProgressBar loading;
@Nullable @Bind(R.id.no_connection) ImageView noConnection;
@BindView(R.id.drawer) DrawerLayout drawer;
@BindView(R.id.toolbar) Toolbar toolbar;
@BindView(R.id.grid) RecyclerView grid;
@BindView(R.id.fab) ImageButton fab;
@BindView(R.id.filters) RecyclerView filtersList;
@BindView(android.R.id.empty) ProgressBar loading;
@Nullable @BindView(R.id.no_connection) ImageView noConnection;
private TextView noFiltersEmptyText;
private ImageButton fabPosting;
private GridLayoutManager layoutManager;
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/java/io/plaidapp/ui/PlayerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
import java.text.NumberFormat;
import java.util.List;

import butterknife.Bind;
import butterknife.BindInt;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import io.plaidapp.R;
Expand Down Expand Up @@ -81,17 +81,17 @@ public class PlayerActivity extends Activity {
private Boolean following;
private int followerCount;

@Bind(R.id.draggable_frame) ElasticDragDismissFrameLayout draggableFrame;
@Bind(R.id.player_description) ViewGroup playerDescription;
@Bind(R.id.avatar) ImageView avatar;
@Bind(R.id.player_name) TextView playerName;
@Bind(R.id.follow) Button follow;
@Bind(R.id.player_bio) TextView bio;
@Bind(R.id.shot_count) TextView shotCount;
@Bind(R.id.followers_count) TextView followersCount;
@Bind(R.id.likes_count) TextView likesCount;
@Bind(R.id.loading) ProgressBar loading;
@Bind(R.id.player_shots) RecyclerView shots;
@BindView(R.id.draggable_frame) ElasticDragDismissFrameLayout draggableFrame;
@BindView(R.id.player_description) ViewGroup playerDescription;
@BindView(R.id.avatar) ImageView avatar;
@BindView(R.id.player_name) TextView playerName;
@BindView(R.id.follow) Button follow;
@BindView(R.id.player_bio) TextView bio;
@BindView(R.id.shot_count) TextView shotCount;
@BindView(R.id.followers_count) TextView followersCount;
@BindView(R.id.likes_count) TextView likesCount;
@BindView(R.id.loading) ProgressBar loading;
@BindView(R.id.player_shots) RecyclerView shots;
@BindInt(R.integer.num_columns) int columns;

@Override
Expand Down
Loading

0 comments on commit 62b7750

Please sign in to comment.