diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index a4d9323..95b5233 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -3,6 +3,9 @@
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 6399366..a5d31c0 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -27,17 +27,7 @@
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/build.gradle b/build.gradle
index ce5e56b..cc7a77c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
+ google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.3'
+ classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
@@ -17,6 +18,7 @@ buildscript {
allprojects {
repositories {
jcenter()
+ google()
}
}
diff --git a/expandablecheckrecyclerview/build.gradle b/expandablecheckrecyclerview/build.gradle
index 8d565c1..837a920 100644
--- a/expandablecheckrecyclerview/build.gradle
+++ b/expandablecheckrecyclerview/build.gradle
@@ -26,14 +26,14 @@ apply plugin: 'com.android.library'
//}
android {
- compileSdkVersion 23
- buildToolsVersion "23.0.3"
+ compileSdkVersion 28
- defaultConfig {
+ defaultConfig {
minSdkVersion 16
- targetSdkVersion 23
+ targetSdkVersion 28
versionCode 5
versionName "1.5"
+ multiDexEnabled true
}
buildTypes {
release {
@@ -43,17 +43,17 @@ android {
}
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.thoughtbot:expandablerecyclerview:1.3'
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.thoughtbot:expandablerecyclerview:1.3'
//android
- compile 'com.android.support:appcompat-v7:23.4.0'
- compile 'com.android.support:recyclerview-v7:23.4.0'
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.recyclerview:recyclerview:1.0.0'
//unit tests
- testCompile 'junit:junit:4.12'
- testCompile 'org.robolectric:robolectric:3.2.1'
- testCompile 'org.mockito:mockito-core:1.10.5'
+ testImplementation 'junit:junit:4.12'
+ testImplementation 'org.robolectric:robolectric:4.3.1'
+ testImplementation 'org.mockito:mockito-core:1.10.5'
}
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
diff --git a/expandablecheckrecyclerview/src/main/java/com/thoughtbot/expandablecheckrecyclerview/listeners/OnCheckChildClickListener.java b/expandablecheckrecyclerview/src/main/java/com/thoughtbot/expandablecheckrecyclerview/listeners/OnCheckChildClickListener.java
index 6f54594..95229aa 100644
--- a/expandablecheckrecyclerview/src/main/java/com/thoughtbot/expandablecheckrecyclerview/listeners/OnCheckChildClickListener.java
+++ b/expandablecheckrecyclerview/src/main/java/com/thoughtbot/expandablecheckrecyclerview/listeners/OnCheckChildClickListener.java
@@ -1,6 +1,5 @@
package com.thoughtbot.expandablecheckrecyclerview.listeners;
-import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.thoughtbot.expandablecheckrecyclerview.CheckableChildRecyclerViewAdapter;
import com.thoughtbot.expandablecheckrecyclerview.models.CheckedExpandableGroup;
diff --git a/expandablecheckrecyclerview/src/main/java/com/thoughtbot/expandablecheckrecyclerview/listeners/OnChildCheckChangedListener.java b/expandablecheckrecyclerview/src/main/java/com/thoughtbot/expandablecheckrecyclerview/listeners/OnChildCheckChangedListener.java
index edd8f24..11debd3 100644
--- a/expandablecheckrecyclerview/src/main/java/com/thoughtbot/expandablecheckrecyclerview/listeners/OnChildCheckChangedListener.java
+++ b/expandablecheckrecyclerview/src/main/java/com/thoughtbot/expandablecheckrecyclerview/listeners/OnChildCheckChangedListener.java
@@ -1,8 +1,6 @@
package com.thoughtbot.expandablecheckrecyclerview.listeners;
-import android.support.v7.widget.RecyclerView;
import android.view.View;
-import com.thoughtbot.expandablecheckrecyclerview.viewholders.CheckableChildViewHolder;
/**
* Interface definition for a callback to be invoked when a CheckableChildViewHolder#checkable
diff --git a/expandablerecyclerview/build.gradle b/expandablerecyclerview/build.gradle
index 27b1adf..655e608 100644
--- a/expandablerecyclerview/build.gradle
+++ b/expandablerecyclerview/build.gradle
@@ -25,15 +25,15 @@ apply plugin: 'com.android.library'
//}
android {
- compileSdkVersion 23
- buildToolsVersion "23.0.3"
+ compileSdkVersion 28
- defaultConfig {
+ defaultConfig {
minSdkVersion 16
- targetSdkVersion 23
+ targetSdkVersion 28
versionCode 2
versionName "1.4"
- }
+ multiDexEnabled true
+ }
buildTypes {
release {
minifyEnabled false
@@ -43,13 +43,13 @@ android {
dependencies {
//android
- compile 'com.android.support:appcompat-v7:23.4.0'
- compile 'com.android.support:recyclerview-v7:23.4.0'
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.recyclerview:recyclerview:1.0.0'
//unit tests
- testCompile 'junit:junit:4.12'
- testCompile 'org.robolectric:robolectric:3.2.1'
- testCompile 'org.mockito:mockito-core:1.10.5'
+ testImplementation 'junit:junit:4.12'
+ testImplementation 'org.robolectric:robolectric:4.3.1'
+ testImplementation 'org.mockito:mockito-core:1.10.5'
}
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
diff --git a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/ExpandableRecyclerViewAdapter.java b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/ExpandableRecyclerViewAdapter.java
index 8d7b40b..dcb3d5c 100644
--- a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/ExpandableRecyclerViewAdapter.java
+++ b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/ExpandableRecyclerViewAdapter.java
@@ -2,8 +2,8 @@
import android.app.Activity;
import android.os.Bundle;
-import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.RecyclerView.ViewHolder;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView.ViewHolder;
import android.view.ViewGroup;
import com.thoughtbot.expandablerecyclerview.listeners.ExpandCollapseListener;
import com.thoughtbot.expandablerecyclerview.listeners.GroupExpandCollapseListener;
diff --git a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/MultiTypeExpandableRecyclerViewAdapter.java b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/MultiTypeExpandableRecyclerViewAdapter.java
index 3ba0312..1aed299 100644
--- a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/MultiTypeExpandableRecyclerViewAdapter.java
+++ b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/MultiTypeExpandableRecyclerViewAdapter.java
@@ -1,6 +1,6 @@
package com.thoughtbot.expandablerecyclerview;
-import android.support.v7.widget.RecyclerView.ViewHolder;
+import androidx.recyclerview.widget.RecyclerView.ViewHolder;
import android.view.ViewGroup;
import com.thoughtbot.expandablerecyclerview.models.ExpandableGroup;
import com.thoughtbot.expandablerecyclerview.models.ExpandableList;
diff --git a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/listeners/OnGroupClickListener.java b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/listeners/OnGroupClickListener.java
index 8f64ec4..498c9f5 100644
--- a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/listeners/OnGroupClickListener.java
+++ b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/listeners/OnGroupClickListener.java
@@ -1,8 +1,5 @@
package com.thoughtbot.expandablerecyclerview.listeners;
-import android.support.v7.widget.RecyclerView;
-import com.thoughtbot.expandablerecyclerview.viewholders.GroupViewHolder;
-
public interface OnGroupClickListener {
/**
diff --git a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/viewholders/ChildViewHolder.java b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/viewholders/ChildViewHolder.java
index 76bb550..2f33152 100644
--- a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/viewholders/ChildViewHolder.java
+++ b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/viewholders/ChildViewHolder.java
@@ -1,6 +1,6 @@
package com.thoughtbot.expandablerecyclerview.viewholders;
-import android.support.v7.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import com.thoughtbot.expandablerecyclerview.models.ExpandableGroup;
diff --git a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/viewholders/GroupViewHolder.java b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/viewholders/GroupViewHolder.java
index 13b730a..e582da0 100644
--- a/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/viewholders/GroupViewHolder.java
+++ b/expandablerecyclerview/src/main/java/com/thoughtbot/expandablerecyclerview/viewholders/GroupViewHolder.java
@@ -1,6 +1,6 @@
package com.thoughtbot.expandablerecyclerview.viewholders;
-import android.support.v7.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.view.View.OnClickListener;
import com.thoughtbot.expandablerecyclerview.listeners.OnGroupClickListener;
diff --git a/gradle.properties b/gradle.properties
index 1d3591c..915f0e6 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -15,4 +15,6 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
-# org.gradle.parallel=true
\ No newline at end of file
+# org.gradle.parallel=true
+android.enableJetifier=true
+android.useAndroidX=true
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 55d6c4f..b4c4e01 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Wed Sep 28 11:33:07 EDT 2016
+#Fri Nov 01 15:10:22 IST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
diff --git a/sample/build.gradle b/sample/build.gradle
index 7575df3..7f76a9a 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -1,17 +1,16 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 23
- buildToolsVersion "23.0.3"
+ compileSdkVersion 28
- defaultConfig {
+ defaultConfig {
applicationId "com.thoughtbot.expandablerecyclerview.sample"
minSdkVersion 16
- targetSdkVersion 23
+ targetSdkVersion 28
versionCode 1
versionName "1.0"
-
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ multiDexEnabled true
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -22,27 +21,28 @@ android {
}
dependencies {
- compile project(':expandablecheckrecyclerview')
+ implementation project(path: ':expandablerecyclerview')
//android
- compile 'com.android.support:appcompat-v7:23.4.0'
- compile 'com.android.support:recyclerview-v7:23.4.0'
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.recyclerview:recyclerview:1.0.0'
//unit tests
- testCompile 'junit:junit:4.12'
- testCompile 'org.robolectric:robolectric:3.2.1'
- testCompile 'org.mockito:mockito-core:1.10.5'
+ testImplementation 'junit:junit:4.12'
+ testImplementation 'org.robolectric:robolectric:4.3.1'
+ testImplementation 'org.mockito:mockito-core:1.10.5'
//automation tests
- androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
- androidTestCompile 'com.android.support.test:runner:0.5'
- androidTestCompile 'com.android.support:support-annotations:23.4.0'
- androidTestCompile 'com.android.support.test:rules:0.4.1'
- androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.1'
+ androidTestImplementation 'androidx.annotation:annotation:1.0.0'
+ androidTestImplementation 'androidx.test:rules:1.1.1'
+ androidTestImplementation('androidx.test.espresso:espresso-contrib:3.1.0') {
// Necessary to avoid version conflicts
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
+ implementation project(path: ':expandablecheckrecyclerview')
}
diff --git a/sample/src/androidTest/java/com/thoughtbot/expandablerecyclerview/sample/ExpandActivityTest.java b/sample/src/androidTest/java/com/thoughtbot/expandablerecyclerview/sample/ExpandActivityTest.java
index 0fd0544..e812c28 100644
--- a/sample/src/androidTest/java/com/thoughtbot/expandablerecyclerview/sample/ExpandActivityTest.java
+++ b/sample/src/androidTest/java/com/thoughtbot/expandablerecyclerview/sample/ExpandActivityTest.java
@@ -1,9 +1,9 @@
package com.thoughtbot.expandablerecyclerview.sample;
-import android.support.test.espresso.contrib.RecyclerViewActions;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
-import android.support.v7.widget.RecyclerView;
+import androidx.test.espresso.contrib.RecyclerViewActions;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.recyclerview.widget.RecyclerView;
import com.thoughtbot.expandablerecyclerview.sample.expand.GenreAdapter;
import com.thoughtbot.expandablerecyclerview.sample.expand.ExpandActivity;
import org.junit.Before;
@@ -11,9 +11,9 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.action.ViewActions.click;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
+import static androidx.test.espresso.Espresso.onView;
+import static androidx.test.espresso.action.ViewActions.click;
+import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static junit.framework.Assert.assertTrue;
@RunWith(AndroidJUnit4.class)
diff --git a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/expand/ExpandActivity.java b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/expand/ExpandActivity.java
index 0eaca27..ae99fc0 100644
--- a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/expand/ExpandActivity.java
+++ b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/expand/ExpandActivity.java
@@ -1,11 +1,11 @@
package com.thoughtbot.expandablerecyclerview.sample.expand;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.DefaultItemAnimator;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.DefaultItemAnimator;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
diff --git a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multicheck/MultiCheckActivity.java b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multicheck/MultiCheckActivity.java
index b31657b..bff7d84 100644
--- a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multicheck/MultiCheckActivity.java
+++ b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multicheck/MultiCheckActivity.java
@@ -1,10 +1,10 @@
package com.thoughtbot.expandablerecyclerview.sample.multicheck;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
diff --git a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multitype/MultiTypeActivity.java b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multitype/MultiTypeActivity.java
index de3a1a5..2fc0b13 100644
--- a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multitype/MultiTypeActivity.java
+++ b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multitype/MultiTypeActivity.java
@@ -1,10 +1,10 @@
package com.thoughtbot.expandablerecyclerview.sample.multitype;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import com.thoughtbot.expandablerecyclerview.sample.R;
import static com.thoughtbot.expandablerecyclerview.sample.GenreDataFactory.makeGenres;
diff --git a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multitypeandcheck/MultiTypeCheckGenreActivity.java b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multitypeandcheck/MultiTypeCheckGenreActivity.java
index 87223fd..fe4e8fe 100644
--- a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multitypeandcheck/MultiTypeCheckGenreActivity.java
+++ b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/multitypeandcheck/MultiTypeCheckGenreActivity.java
@@ -1,10 +1,10 @@
package com.thoughtbot.expandablerecyclerview.sample.multitypeandcheck;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
diff --git a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/singlecheck/SingleCheckActivity.java b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/singlecheck/SingleCheckActivity.java
index 4207d26..3ad58c9 100644
--- a/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/singlecheck/SingleCheckActivity.java
+++ b/sample/src/main/java/com/thoughtbot/expandablerecyclerview/sample/singlecheck/SingleCheckActivity.java
@@ -1,10 +1,10 @@
package com.thoughtbot.expandablerecyclerview.sample.singlecheck;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
diff --git a/sample/src/main/res/layout/activity_expand.xml b/sample/src/main/res/layout/activity_expand.xml
index ecc32f3..796b796 100644
--- a/sample/src/main/res/layout/activity_expand.xml
+++ b/sample/src/main/res/layout/activity_expand.xml
@@ -10,7 +10,7 @@
android:layout_height="wrap_content"
android:text="Toggle Classic Group" />
-
-
-
diff --git a/sample/src/main/res/layout/activity_multi_type_and_check.xml b/sample/src/main/res/layout/activity_multi_type_and_check.xml
index 2a5380f..2381474 100644
--- a/sample/src/main/res/layout/activity_multi_type_and_check.xml
+++ b/sample/src/main/res/layout/activity_multi_type_and_check.xml
@@ -11,7 +11,7 @@
android:text="clear selections" />
-
-