Skip to content

Commit

Permalink
Merge pull request #460 from jmfayard/androidx-dependency-notations-b…
Browse files Browse the repository at this point in the history
…ig-update

Androidx dependency notations big update
  • Loading branch information
LouisCAD authored Dec 18, 2021
2 parents 873210a + 7235b80 commit d580fc5
Show file tree
Hide file tree
Showing 8 changed files with 2,846 additions and 257 deletions.
2,615 changes: 2,477 additions & 138 deletions plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ androidx.camera:camera-extensions(-*)
androidx.camera:camera-view(-*)
^^^^^^^^. ^^^^^^.^^^^

androidx.car:car-cluster(-*)
^^^^^^^^. ^^^^^^^^^^^

androidx.car.app:app-testing(-*)
^^^^^^^^.^^^. ^^^^^^^^^^^

Expand Down Expand Up @@ -61,6 +58,9 @@ androidx.leanback:leanback-paging(-*)
androidx.leanback:leanback-tab(-*)
^^^^^^^^. ^^^^^^^^^^^^

androidx.leanback:leanback-grid(-*)
^^^^^^^^. ^^^^^^^^^^^^^

androidx.lifecycle:lifecycle-extensions // Deprecated artifact, no longer updated with its family.
^^^^^^^^. ^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -131,7 +131,7 @@ androidx.window:window-extensions
^^^^^^^^. ^^^^^^^^^^^^^^^^^

androidx.wear.compose:compose-*
^^^^^^^^.^^^^.^^^^^^^ ^^
^^^^^^^^.^^^^.^^^^^^^

androidx.wear.compose:* // In case they add an artifact that doesn't start with "compose"
^^^^^^^^.^^^^.^^^^^^^.^
Expand Down
183 changes: 183 additions & 0 deletions plugins/dependencies/src/main/resources/removals-revisions-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,186 @@ id:[org.junit.jupiter:junit-jupiter-params]

~~Testing.junit~~
id:[org.junit.jupiter:junit-jupiter]

## Revision 3

~~AndroidX.wear.tiles.proto~~
//FIXME: Remove explicit dependency on this artifact designed for internals.
id:[androidx.wear.tiles:tiles-proto]

~~AndroidX.wear.complications.data~~
//FIXME: Migrate ComplicationProviderService to SuspendingComplicationDataSourceService or ComplicationDataSourceService
moved:[androidx.wear.watchface..watchface-complications-data-source-ktx]
id:[androidx.wear:wear-complications-data]

~~AndroidX.wear.complications.provider~~
//FIXME: Migrate ComplicationProviderService to SuspendingComplicationDataSourceService or ComplicationDataSourceService
moved:[androidx.wear.watchface..watchface-complications-data-source-ktx]
id:[androidx.wear:wear-complications-provider]

~~AndroidX.gaming.framePacing~~
//FIXME: androidx.gaming moved to androidx.games, use the newer artifact.
moved:[androidx.games:games-frame-pacing]
id:[androidx.gaming:gaming-frame-pacing]

~~AndroidX.gaming.performanceTuner~~
//FIXME: androidx.gaming moved to androidx.games, use the newer artifact.
moved:[androidx.games:games-performance-tuner]
id:[androidx.gaming:gaming-performance-tuner]

~~AndroidX.vectorDrawableAnimated~~
id:[androidx.vectordrawable:vectordrawable-animated]

~~AndroidX.vectorDrawableSeekable~~
id:[androidx.vectordrawable:vectordrawable-seekable]

~~AndroidX.test.jankTestHelper~~
id:[androidx.test.janktesthelper:janktesthelper]

~~AndroidX.sqliteFramework~~
id:[androidx.sqlite:sqlite-framework]

~~AndroidX.sqliteKtx~~
id:[androidx.sqlite:sqlite-ktx]

~~AndroidX.savedStateKtx~~
id:[androidx.savedstate:savedstate-ktx]

~~AndroidX.room.coroutines~~
// FIXME: Replace with Room KTX
moved:[androidx.room:room-ktx]
id:[androidx.room:room-coroutines]

~~AndroidX.room.migration~~
// room-migration is already included in room-testing
moved:[androidx.room:room-testing]
id:[androidx.room:room-migration]

~~AndroidX.remoteCallbackProcessor~~
id:[androidx.remotecallback:remotecallback-processor]

~~AndroidX.recyclerViewSelection~~
id:[androidx.recyclerview:recyclerview-selection]

~~AndroidX.preferenceKtx~~
id:[androidx.preference:preference-ktx]

~~AndroidX.paletteKtx~~
id:[androidx.palette:palette-ktx]

~~AndroidX.multidexInstrumentation~~
id:[androidx.multidex:multidex-instrumentation]

~~AndroidX.leanbackPreference~~
id:[androidx.leanback:leanback-preference]

~~AndroidX.fragmentKtx~~
id:[androidx.fragment:fragment-ktx]

~~AndroidX.fragmentTesting~~
id:[androidx.fragment:fragment-testing]

~~AndroidX.emojiAppCompat~~
id:[androidx.emoji:emoji-appcompat]

~~AndroidX.emojiBundled~~
id:[androidx.emoji:emoji-bundled]

~~AndroidX.dynamicAnimationKtx~~
id:[androidx.dynamicanimation:dynamicanimation-ktx]

~~AndroidX.constraintLayoutSolver~~
// Removed from refreshVersions built-in dependency notations because not documented on d.android.com
id:[androidx.constraintlayout:constraintlayout-solver]

~~AndroidX.constraintLayoutCompose~~
id:[androidx.constraintlayout:constraintlayout-compose]

~~AndroidX.collectionKtx~~
id:[androidx.collection:collection-ktx]

~~AndroidX.carCluster~~
id:[androidx.car:car-cluster]

~~AndroidX.biometricKtx~~
id:[androidx.biometric:biometric-ktx]

~~AndroidX.appCompatResources~~
id:[androidx.appcompat:appcompat-resources]

~~AndroidX.annotationExperimental~~
id:[androidx.annotation:annotation-experimental]

~~AndroidX.activityKtx~~
id:[androidx.activity:activity-ktx]

~~AndroidX.percentLayout~~
// PercentLayout is deprecated.
//TODO: Replace with AndroidX ConstraintLayout
id:[androidx.percentlayout:percentlayout]

~~AndroidX.lifecycle.liveDataCoreKtx~~
// Removed from refreshVersions built-in dependency notations because not documented on d.android.com
id:[androidx.lifecycle:lifecycle-livedata-core-ktx]

~~AndroidX.lifecycle.liveDataCore~~
// Removed from refreshVersions built-in dependency notations because not documented on d.android.com
id:[androidx.lifecycle:lifecycle-livedata-core]

~~AndroidX.legacy.preferenceV14~~
// Deprecated. TODO: Stop using this artifact.
id:[androidx.legacy:legacy-preference-v14]

~~AndroidX.legacy.supportCoreUi~~
// Deprecated. TODO: Stop using this artifact.
id:[androidx.legacy:legacy-support-core-ui]

~~AndroidX.legacy.supportCoreUtils~~
// Deprecated. TODO: Stop using this artifact.
id:[androidx.legacy:legacy-support-core-utils]

~~AndroidX.legacy.supportV13~~
// Deprecated. TODO: Stop using this artifact.
id:[androidx.legacy:legacy-support-v13]

~~AndroidX.legacy.supportV4~~
// Deprecated. TODO: Stop using this artifact.
id:[androidx.legacy:legacy-support-v4]

~~AndroidX.hilt.lifecycleViewModel~~
//TODO: Remove usage of this dependency.
// Use @HiltViewModel instead of @ViewModelInject and remove this dependency.
// See docs here: https://dagger.dev/hilt/view-model
id:[androidx.hilt:hilt-lifecycle-viewmodel]

~~AndroidX.compose.foundation.text~~
// Included in the main compose foundation library.
// TODO: Remove this usage.
moved:[androidx.compose.foundation:foundation]
id:[androidx.compose.foundation:foundation-text]

~~AndroidX.compose.ui.textAndroid~~
// Included in the main compose ui library.
// TODO: Remove this usage.
moved:[androidx.compose.ui:ui-text]
id:[androidx.compose.ui:ui-text-android]

~~AndroidX.compose.runtime.savedInstanceState~~
// TODO: Replace this discontinued artifact.
moved:[androidx.compose.runtime:runtime-saveable]
id:[androidx.compose.runtime:runtime-saved-instance-state]

~~AndroidX.car.cluster~~
// The androidx.car:car-cluster library has been deprecated and no further versions will be shipped.
//TODO: Use androidx.car.app instead.
moved:[androidx.car.app:app]
id:[androidx.car:car-cluster]

~~AndroidX.car~~
// The androidx.car:car library has been deprecated and no further versions will be shipped.
//TODO: Use androidx.car.app instead.
moved:[androidx.car.app:app]
id:[androidx.car:car]

~~AndroidX.tracingKtx~~
id:[androidx.tracing:tracing-ktx]
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,24 @@ org.junit.jupiter..junit-jupiter-engine=version.junit
org.junit.jupiter..junit-jupiter-migrationsupport=version.junit
org.junit.jupiter..junit-jupiter-params=version.junit
org.junit.jupiter..junit-jupiter=version.junit
androidx.wear.compose..compose-foundation=version.androidx.wear.compose-foundation
androidx.wear.compose..compose-material=version.androidx.wear.compose-material
androidx.wear.tiles..tiles-proto=version.androidx.wear.tiles
androidx.wear..wear-complications-data=version.androidx.wear-complications-data
androidx.wear..wear-complications-provider=version.androidx.wear-complications-provider
androidx.gaming..gaming-frame-pacing=version.androidx.gaming-frame-pacing
androidx.gaming..gaming-performance-tuner=version.androidx.gaming-performance-tuner
androidx.test.janktesthelper..janktesthelper=version.androidx.test.janktesthelper
androidx.room..room-coroutines=version.androidx.room-coroutines
androidx.room..room-migration=version.androidx.room
androidx.percentlayout..percentlayout=version.androidx.percentlayout
androidx.lifecycle..lifecycle-livedata-core-ktx=version.androidx.lifecycle
androidx.lifecycle..lifecycle-livedata-core=version.androidx.lifecycle
androidx.legacy..legacy-preference-v14=version.androidx.legacy
androidx.legacy..legacy-support-core-ui=version.androidx.legacy
androidx.legacy..legacy-support-core-utils=version.androidx.legacy
androidx.legacy..legacy-support-v13=version.androidx.legacy
androidx.legacy..legacy-support-v4=version.androidx.legacy
androidx.hilt..hilt-lifecycle-viewmodel=version.androidx.hilt-lifecycle-viewmodel
androidx.car..car-cluster=version.androidx.car-cluster
androidx.car..car=version.androidx.car
Original file line number Diff line number Diff line change
Expand Up @@ -161,40 +161,37 @@ class BundledDependenciesTest {
"https://dl.google.com/dl/android/maven2/",
"https://plugins.gradle.org/m2/"
)
val mappingWithLines = getArtifactNameToConstantMapping().associateWith {
"${it.group}:${it.artifact}"
}

val newValidatedMappings = runBlocking {

getArtifactNameToConstantMapping()
.filter { dependencyMapping ->
"${dependencyMapping.group}:${dependencyMapping.artifact}" !in validatedDependencyMapping
}.map { dependencyMapping ->
ModuleId.Maven(dependencyMapping.group, dependencyMapping.artifact)
}
.distinct()
.onEach { mavenModuleId ->
launch {
getVersionCandidates(
httpClient = defaultHttpClient,
mavenModuleId = mavenModuleId,
repoUrls = reposUrls,
currentVersion = Version("")
)
}
mappingWithLines.filter {
it.value !in validatedDependencyMapping
}.keys.map { dependencyMapping ->
ModuleId.Maven(dependencyMapping.group, dependencyMapping.artifact)
}.distinct().onEach { mavenModuleId ->
launch {
getVersionCandidates(
httpClient = defaultHttpClient,
mavenModuleId = mavenModuleId,
repoUrls = reposUrls,
currentVersion = Version("")
)
}
}
}

when {
newValidatedMappings.isEmpty() -> return
newValidatedMappings.isEmpty() && validatedDependencyMapping.size == mappingWithLines.size -> return
isInCi() -> withClue(
"Unit tests must be run and changes to bundled-dependencies-validated.txt must be committed, " +
"but that wasn't the case for those dependency notations."
) {
newValidatedMappings shouldBe emptyList()
}
else -> {
val mappings = getArtifactNameToConstantMapping().map {
"${it.group}:${it.artifact}"
}.distinct().sorted().joinToString(separator = "\n")
val mappings = mappingWithLines.values.distinct().sorted().joinToString(separator = "\n")
validatedDependencyMappingFile.writeText(mappings)
}
}
Expand Down
Loading

0 comments on commit d580fc5

Please sign in to comment.