LouisCAD / Splitties

A collection of hand-crafted extensions for your Kotlin projects.

Home Page:https://splitties.louiscad.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

./gradlew migrateToSplitties

jmfayard opened this issue · comments

Not a blocker for now, but for the 3.0 release, we should expand the feature that was developed for ./gradlew migrateToAndroidX

## 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)
}

Code:

println()
println("## Your turn: use instead those Androidx libraries")
val map = artifacts.associate { it.supportArtifact to it.androidXArtifact }
val splitties = getArtifactNameToSplittiesConstantMapping()
println(gradleSyntax(androidSupportDependencies.mapNotNull { map[it.artifact] }, splitties))
}

What would need to change:

  • find a good name for the new task (hard)
  • have one task by project, instead of one task globally like migrateToAndroidX
  • consider all dependencies present in Splitties and not only AndroidX
  • use the right configuration name. Currently it's hacked together to use either implementation or androidTestImplementation.