Skip to content

Commit

Permalink
Remove legacy support
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Jan 4, 2019
1 parent 739753e commit 01e4e4e
Show file tree
Hide file tree
Showing 107 changed files with 328 additions and 550 deletions.
16 changes: 6 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ buildscript {
'minSdk': 14,
'compileSdk': 28,

'supportLibrary': '28.0.0',
'androidTools': '26.2.0',
'kotlin': '1.2.71',

Expand All @@ -17,16 +16,13 @@ buildscript {
'runtime': 'com.google.android:android:4.1.1.4',
'gradlePlugin': "com.android.tools.build:gradle:3.1.4",
],
'support': [
'compat': "com.android.support:support-compat:${versions.supportLibrary}",
'annotations': "com.android.support:support-annotations:${versions.supportLibrary}",
'test': [
'runner': 'com.android.support.test:runner:1.0.1',
'rules': 'com.android.support.test:rules:1.0.1',
],
],
'androidx': [
'core': "androidx.core:core:1.0.0",
'annotations': "androidx.annotation:annotation:1.0.0",
'test': [
'runner': 'androidx.test:runner:1.1.0',
'rules': 'androidx.test:rules:1.1.0',
],
],
'lint': [
'core': "com.android.tools.lint:lint:${versions.androidTools}",
Expand Down Expand Up @@ -54,8 +50,8 @@ buildscript {

repositories {
mavenCentral()
jcenter()
google()
jcenter()
gradlePluginPortal()
}

Expand Down
2 changes: 1 addition & 1 deletion butterknife-annotations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ checkstyle {

dependencies {
compileOnly deps.android.runtime
api deps.support.annotations
api deps.androidx.annotations
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle')
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.AnimRes;
import androidx.annotation.AnimRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.ArrayRes;
import androidx.annotation.ArrayRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.graphics.Bitmap;
import android.support.annotation.DrawableRes;
import androidx.annotation.DrawableRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.BoolRes;
import androidx.annotation.BoolRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.ColorRes;
import androidx.annotation.ColorRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.DimenRes;
import androidx.annotation.DimenRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.AttrRes;
import android.support.annotation.DrawableRes;
import androidx.annotation.AttrRes;
import androidx.annotation.DrawableRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.DimenRes;
import androidx.annotation.DimenRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package butterknife;

import android.graphics.Typeface;
import android.support.annotation.FontRes;
import android.support.annotation.IntDef;
import android.support.annotation.RestrictTo;
import androidx.annotation.FontRes;
import androidx.annotation.IntDef;
import androidx.annotation.RestrictTo;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static android.support.annotation.RestrictTo.Scope.LIBRARY;
import static androidx.annotation.RestrictTo.Scope.LIBRARY;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.IntegerRes;
import androidx.annotation.IntegerRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.StringRes;
import androidx.annotation.StringRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.IdRes;
import androidx.annotation.IdRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package butterknife;

import android.support.annotation.IdRes;
import androidx.annotation.IdRes;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down Expand Up @@ -31,11 +31,9 @@
@Retention(CLASS)
@ListenerClass(
targetType = "androidx.viewpager.widget.ViewPager",
legacyTargetType = "android.support.v4.view.ViewPager",
setter = "addOnPageChangeListener",
remover = "removeOnPageChangeListener",
type = "androidx.viewpager.widget.ViewPager.OnPageChangeListener",
legacyType = "android.support.v4.view.ViewPager.OnPageChangeListener",
callbacks = OnPageChange.Callback.class
)
public @interface OnPageChange {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package butterknife;

import android.support.annotation.IdRes;
import android.text.TextWatcher;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package butterknife;

import android.support.annotation.IdRes;
import android.view.View;
import androidx.annotation.IdRes;
import butterknife.internal.ListenerClass;
import butterknife.internal.ListenerMethod;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
public @interface ListenerClass {
String targetType();

String legacyTargetType() default "";

/** Name of the setter method on the {@linkplain #targetType() target type} for the listener. */
String setter();

Expand All @@ -24,8 +22,6 @@
/** Fully-qualified class name of the listener type. */
String type();

String legacyType() default "";

/** Enum which declares the listener callback methods. Mutually exclusive to {@link #method()}. */
Class<? extends Enum<?>> callbacks() default NONE.class;

Expand Down
Loading

0 comments on commit 01e4e4e

Please sign in to comment.