Help Android Program Migrate To AndroidX
Android Studio
Migrate to Androidx
make lots of source file not exactly right, result project compile error. With this repository can migrate to androidX quickly,without such issue.
- support java,xml,kt extension file content replace;
- support gradle extension file content replace;
Edit root project build.gradle file, append plugin in buildscript
classpath ,and do not forget add maven { url 'https://jitpack.io' } too.
buildscript {
ext.easyandroidx_version='0.1.1'
repositories {
maven { url 'https://jitpack.io' } //add this line
google()
mavenCentral()
jcenter()
}
dependencies {
classpath "com.github.emile2013:EasyMigrateAndroidX:$easyandroidx_version" //add this line
}
}
allprojects {
repositories {
maven { url 'https://jitpack.io' } //add this line
google()
mavenCentral()
jcenter()
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.github.emile2013.migrateandroidx' // add this line
tips: just add in one child module , no need add in all projects
./gradlew migrateAndroidX
You maybe need to add not declare dependency in build.gradle , so after running, modify the newest artifact for androidX
- Repository do not support append comment in
dependency declare line
, such as :
implementation("com.android.support:support-annotations:${rootProject.ext.google.support}"){ //do not add this comment
}
- androidX Prerequisites such as gradle version 4.6+,AGP 3.2.0+, and both of them are set to true in your gradle.properties file:
android.useAndroidX=true
android.enableJetifier=true
ResMonitor is licensed under the BSD 3-Clause License.