Skip to content

Commit

Permalink
Merge pull request #1 from tank777/androidx-support
Browse files Browse the repository at this point in the history
Added the androidX support
  • Loading branch information
tank777 authored Jan 11, 2020
2 parents 6ad15ab + 1e2cd03 commit 447ba5b
Show file tree
Hide file tree
Showing 27 changed files with 90 additions and 98 deletions.
4 changes: 4 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 1 addition & 11 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -17,6 +18,7 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}

Expand Down
22 changes: 11 additions & 11 deletions expandablecheckrecyclerview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
20 changes: 10 additions & 10 deletions expandablerecyclerview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.thoughtbot.expandablerecyclerview.listeners;

import android.support.v7.widget.RecyclerView;
import com.thoughtbot.expandablerecyclerview.viewholders.GroupViewHolder;

public interface OnGroupClickListener {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
34 changes: 17 additions & 17 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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')
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
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;
import org.junit.Rule;
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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/layout/activity_expand.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:layout_height="wrap_content"
android:text="Toggle Classic Group" />

<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
Loading

0 comments on commit 447ba5b

Please sign in to comment.