aliyun / alibabacloud-httpdns-android-sdk

alibabacloud-httpdns-android-sdk
MIT License
51 stars 11 forks source link

是否能够弃用android.support-*的依赖 #2

Closed xaclincoln closed 2 years ago

xaclincoln commented 3 years ago

Describe the bug 当前这个包依赖多个android.support-的包,如下 `dependencies {

compileOnly '**com.android.support:appcompat-v7:28.0.0**'

end2endImplementation "org.robolectric:robolectric:3.8"
end2endImplementation 'junit:junit:4.12'
end2endImplementation 'org.mockito:mockito-core:2.15.0'
end2endImplementation 'com.squareup.okhttp3:mockwebserver:3.9.0'
end2endImplementation 'com.android.support:appcompat-v7:28.0.0'

androidTestImplementation 'com.android.support.test:runner:1.0.0'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.0'
androidTestImplementation 'org.mockito:mockito-android:2.15.0'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.9.0'
androidTestImplementation '**com.android.support:appcompat-v7:28.0.0**'

implementation "com.aliyun.ams:alicloud-android-sender:${senderVersion}"
implementation "com.aliyun.ams:alicloud-android-crashdefend:${crashDefendVersion}"
implementation "com.aliyun.ams:alicloud-android-utdid:${utdidVersion}"
implementation "com.aliyun.ams:alicloud-android-beacon:${beaconVersion}"

}` 但现在的大多数APP已经开始团向androidx,并且两者不兼容,我在使用EMAS的其它组件(性能分析等)也遇到类似的问题,是否能够考虑移除此类包的依赖,转而使用androidx. 当前我仍在调研HTTP DNS的使用,也许SDK不会直接报错,但我仍然担心android.support-和androidx的不兼容性,导致APP出现一些难以遇料的错误。 以下引用自google的官方文档对android.support的说明

Note: With the release of Support Library 28.0.0, the android.support-packaged libraries are deprecated and replaced by individually-versioned Jetpack libraries packaged as androidx. The initial 1.0.0 release of the Jetpack libraries provides parity with Support Library 28.0.0 and provides a starting point for migrating to the new androidx packaging.

The existing android.support-packaged libraries will continue to work; however, they will not receive any updates beyond 28.0.0 and will not be compatible with new Jetpack libraries. Historical artifacts (those versioned 27 and earlier, and packaged as android.support) will remain available on Google Maven. All new artifacts will be packaged as androidx and will require migration from android.support to androidx.

We recommend using the androidx libraries in all new projects. You should also consider migrating existing projects to ensure they continue to receive bug fixes and other library improvements.

Additional context 如果担心移除android.support-的包造成breaking change,可以考虑升大版本。

new-xd commented 2 years ago

2.1.0 移除了。 试下

new-xd commented 2 years ago

2.1.0 在部分场景可能存在问题。 请使用2.1.1版本。 如果还有其它问题,随时reopen