Hello Android devs,
I am looking for beta testers / early adopters for a new project I have been working on together with LouisCAD.
We want to provide a reliable, simple, fun way to migrate an old Android project using the support libraries to AndroidX.
Why?
There are hundred of thousands of projects that are still using "com.android.support:appcompat-v7" and friends which are not supported anymore.
The Android team asked everyone to migrate to AndroidX instead, but in our opinion they have fucked up the migration story part of it. Which creates a big mess for app developers and library authors.
In theory, all you have to do is to use the menu entry:
Refactor > Migrate to AndroidX
In practice, our experience was waiting minutes with an unresponsive IDE, then giving up with no other choice than force closing Android Studio, and finally getting a broken project, with some dangling fully qualified references (instead of proper import replacement).
What does it look like?
$ ./gradlew migrateToAndroidX
## Checking that you use compileSdkVersion 28
β π You are using compileSdkVersion 28
## Migrating classes from support libraries to AndroidX.
β π Parsing file androidx-class-mapping.csv
β π Modules: [Application]
β π Found 18 source files that may need migration
β π File androidx-class-mapping.csv parsed correctly
β π Starting batch migration...
Migrating file "CameraActivity.java" β¦ overwriting fileβ¦ Done. βπ
Migrating file "Camera2BasicFragment.java" β¦ overwriting fileβ¦ Done. βπ
Migrating file "build.gradle" β¦
β π 2 source files (kt,java,xml) have been migrated (16 didn't need it).
β π 0 gradle files have been migrated (1 didn't need it).
## Detecting Gradle properties
β π gradle.properties already contains [android.useAndroidX, android.enableJetifier]
## Your turn: add the AndroidX libraries to app/build.gradle
// app/build.gradle
dependencies {
implementation(AndroidX.legacy.supportV4)
implementation(AndroidX.legacy.supportV13)
implementation(AndroidX.cardView)
implementation(AndroidX.appCompat)
}
I am in! What do you need?
To make the project reliable, we need people willing to beta test it once we make it available.
You may have a project that needs to be migrated, or that you have migrated already but you can find the commit before in the commit history.
If you are interested, please inform us by leaving a comment.
If you follow us here, we can reach you via https://dev.to/connect
Top comments (4)
Sauce?
What do you mean?
I was seeking for the source of the plugin. I found it from your earlier posts
It's not released yet but will be at github.com/LouisCAD/Splitties
MigrateAndroidxTask.kt