Skip to content

Commit

Permalink
修改配置
Browse files Browse the repository at this point in the history
  • Loading branch information
donkingliang committed Aug 13, 2022
1 parent a3d68e1 commit f7b7968
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
17 changes: 8 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.donkingliang.consecutivescroller"
minSdkVersion 19
Expand All @@ -21,20 +20,20 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation project(':consecutivescroller')

// 刷新框架
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1' //核心必须依赖
implementation 'com.scwang.smart:refresh-header-classics:2.0.1' //经典刷新头
implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3' //核心必须依赖
implementation 'com.scwang.smart:refresh-header-classics:2.0.3' //经典刷新头
implementation 'com.scwang.smart:refresh-footer-classics:2.0.3' //经典加载

implementation 'androidx.viewpager2:viewpager2:1.1.0-alpha01'
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:4.2.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
7 changes: 2 additions & 5 deletions consecutivescroller/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ group='com.github.donkingliang' // 指定group,com.github.<用户名>

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"


defaultConfig {
minSdkVersion 19
targetSdkVersion 30
Expand All @@ -28,8 +25,8 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly 'androidx.appcompat:appcompat:1.2.0'
compileOnly 'androidx.recyclerview:recyclerview:1.1.0'
compileOnly 'androidx.appcompat:appcompat:1.3.1'
compileOnly 'androidx.recyclerview:recyclerview:1.2.1'
compileOnly 'androidx.viewpager2:viewpager2:1.1.0-alpha01'
}

Expand Down
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Mar 13 16:42:52 CST 2020
#Sat Jul 31 23:13:54 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
zipStoreBase=GRADLE_USER_HOME

4 comments on commit f7b7968

@MyFiting
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gradle 6.5 就找不到这个库了

@donkingliang
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gradle 6.5 就找不到这个库了

不应该啊,我自己的项目使用gradle 6.7.1了,没有问题的

@MyFiting
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

友盟升级后gradle是6.5找不到这个库(4.0.1版本),gradle升到到6.7.1后,同时这个控件升级到4.6.3之后,必须用Androidx的库,目前我项目中的库都是v4,v7,都改成Androidx的话项目改动量太大,哪个版本能兼容Androidx和v4,v7共存呢?

@donkingliang
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

友盟升级后gradle是6.5找不到这个库(4.0.1版本),gradle升到到6.7.1后,同时这个控件升级到4.6.3之后,必须用Androidx的库,目前我项目中的库都是v4,v7,都改成Androidx的话项目改动量太大,哪个版本能兼容Androidx和v4,v7共存呢?

Androidx和Support包不能共存,只能二选一。而我的库在4.6.0开始只维护Androidx了。Support的可以使用4.5.3以前的版本。现在很多的库都只维护Androidx了,建议你还是尽早迁移Androidx吧。

Please sign in to comment.