Skip to content

Commit

Permalink
support androidx
Browse files Browse the repository at this point in the history
  • Loading branch information
LightSun committed Feb 28, 2020
1 parent eb553b1 commit 128027a
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 114 deletions.
15 changes: 5 additions & 10 deletions PullToRefesh/android-pullrefreshview/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
apply plugin: 'com.android.library'
//apply plugin: 'com.novoda.bintray-release'
apply plugin: 'com.github.dcendents.android-maven'
apply from: '../androidx_compat.gradle'
group='com.github.LightSun'

android {
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
minSdkVersion 16
minSdkVersion 19
targetSdkVersion 28
versionCode 10
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {
release {
Expand All @@ -29,15 +28,11 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation "com.android.support:recyclerview-v7:28.0.0"
testImplementation 'junit:junit:4.12'
//implementation 'com.android.support:appcompat-v7:28.0.0'
// implementation "com.android.support:recyclerview-v7:28.0.0"

//implementation 'com.heaven7.core.adapter:adapter:1.8.8'
implementation 'com.github.LightSun:SuperAdapter:2.0.6'
implementation 'com.github.LightSun:SuperAdapter:2.0.9-x'
//compile 'com.heaven7.android.component:android-app-components:1.0.1'
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.heaven7.android.pullrefresh;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

import android.annotation.TargetApi;
import android.content.Context;
import android.support.annotation.AttrRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StyleRes;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;

import androidx.annotation.AttrRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StyleRes;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import com.heaven7.adapter.AbstractLoadMoreScrollListener;
import com.heaven7.adapter.AdapterManager;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.heaven7.android.pullrefresh;

import android.content.Context;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewConfiguration;

import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

/**
* resolve: SwipeRefreshLayout and ViewPager scroll conflict.
*/
Expand Down

This file was deleted.

16 changes: 16 additions & 0 deletions PullToRefesh/androidx_compat.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

def useAndroidX = true

dependencies {
def androidX_ver = "1.0.0"
def androidSupport_ver = '28.0.0'
if(useAndroidX){
implementation "androidx.appcompat:appcompat:$androidX_ver"
implementation "androidx.recyclerview:recyclerview:$androidX_ver"
//implementation "androidx.exifinterface:exifinterface:$androidX_ver"
}else {
implementation "com.android.support:recyclerview-v7:$androidSupport_ver"
implementation "com.android.support:appcompat-v7:$androidSupport_ver"
//implementation "com.android.support:exifinterface:$androidSupport_ver"
}
}
13 changes: 4 additions & 9 deletions PullToRefesh/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
apply plugin: 'com.android.application'
//apply plugin: 'com.neenbedankt.android-apt'
apply from: '../androidx_compat.gradle'

android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "pulltorefresh.android.heaven7.com.pulltorefesh"
minSdkVersion 16
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
Expand All @@ -25,13 +26,7 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation "com.android.support:recyclerview-v7:28.0.0"
// compile 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
implementation 'com.jakewharton:butterknife:8.4.0'
annotationProcessor "com.jakewharton:butterknife-compiler:8.4.0"
//compile 'com.heaven7.android.pullrefresh2:android-pullrefreshview2:1.0'
Expand All @@ -40,8 +35,8 @@ dependencies {
annotationProcessor files('libs/TestProcessor.jar')
implementation files('libs/TestProcessor.jar')

implementation('com.github.LightSun:util-v1:1.1.4') {
implementation('com.github.LightSun:util-v1:1.1.7-beta-x') {
exclude group: 'com.android.support'
}
implementation 'com.github.LightSun:SuperAdapter:2.0.6'
implementation 'com.github.LightSun:SuperAdapter:2.0.9-x'
}

This file was deleted.

This file was deleted.

0 comments on commit 128027a

Please sign in to comment.