|
2 | 2 | // SPDX-License-Identifier: Apache-2.0
|
3 | 3 | package com.autonomousapps.android.projects
|
4 | 4 |
|
| 5 | +import com.autonomousapps.internal.OutputPathsKt |
5 | 6 | import com.autonomousapps.kit.GradleProject
|
6 | 7 | import com.autonomousapps.kit.gradle.Dependency
|
7 | 8 |
|
@@ -70,6 +71,42 @@ final class DuplicateDependencyVersionsProject extends AbstractAndroidProject {
|
70 | 71 | return resolvedDependenciesReport(gradleProject, projectPath)
|
71 | 72 | }
|
72 | 73 |
|
| 74 | + String actualAllDependencies() { |
| 75 | + return gradleProject.singleArtifact(':', OutputPathsKt.getAllLibsVersionsTomlPath()).asPath.text |
| 76 | + } |
| 77 | + |
| 78 | + String expectedAllDependencies = '''\ |
| 79 | + [libraries] |
| 80 | + androidx-activity-activity-1-0-0 = { module = "androidx.activity:activity", version = "1.0.0" } |
| 81 | + androidx-annotation-annotation-1-1-0 = { module = "androidx.annotation:annotation", version = "1.1.0" } |
| 82 | + androidx-appcompat-appcompat-1-1-0 = { module = "androidx.appcompat:appcompat", version = "1.1.0" } |
| 83 | + androidx-appcompat-appcompat-resources-1-1-0 = { module = "androidx.appcompat:appcompat-resources", version = "1.1.0" } |
| 84 | + androidx-arch-core-core-common-2-1-0 = { module = "androidx.arch.core:core-common", version = "2.1.0" } |
| 85 | + androidx-arch-core-core-runtime-2-0-0 = { module = "androidx.arch.core:core-runtime", version = "2.0.0" } |
| 86 | + androidx-collection-collection-1-1-0 = { module = "androidx.collection:collection", version = "1.1.0" } |
| 87 | + androidx-core-core-1-1-0 = { module = "androidx.core:core", version = "1.1.0" } |
| 88 | + androidx-cursoradapter-cursoradapter-1-0-0 = { module = "androidx.cursoradapter:cursoradapter", version = "1.0.0" } |
| 89 | + androidx-customview-customview-1-0-0 = { module = "androidx.customview:customview", version = "1.0.0" } |
| 90 | + androidx-drawerlayout-drawerlayout-1-0-0 = { module = "androidx.drawerlayout:drawerlayout", version = "1.0.0" } |
| 91 | + androidx-fragment-fragment-1-1-0 = { module = "androidx.fragment:fragment", version = "1.1.0" } |
| 92 | + androidx-interpolator-interpolator-1-0-0 = { module = "androidx.interpolator:interpolator", version = "1.0.0" } |
| 93 | + androidx-lifecycle-lifecycle-common-2-1-0 = { module = "androidx.lifecycle:lifecycle-common", version = "2.1.0" } |
| 94 | + androidx-lifecycle-lifecycle-livedata-2-0-0 = { module = "androidx.lifecycle:lifecycle-livedata", version = "2.0.0" } |
| 95 | + androidx-lifecycle-lifecycle-livedata-core-2-0-0 = { module = "androidx.lifecycle:lifecycle-livedata-core", version = "2.0.0" } |
| 96 | + androidx-lifecycle-lifecycle-runtime-2-1-0 = { module = "androidx.lifecycle:lifecycle-runtime", version = "2.1.0" } |
| 97 | + androidx-lifecycle-lifecycle-viewmodel-2-1-0 = { module = "androidx.lifecycle:lifecycle-viewmodel", version = "2.1.0" } |
| 98 | + androidx-loader-loader-1-0-0 = { module = "androidx.loader:loader", version = "1.0.0" } |
| 99 | + androidx-savedstate-savedstate-1-0-0 = { module = "androidx.savedstate:savedstate", version = "1.0.0" } |
| 100 | + androidx-vectordrawable-vectordrawable-1-1-0 = { module = "androidx.vectordrawable:vectordrawable", version = "1.1.0" } |
| 101 | + androidx-vectordrawable-vectordrawable-animated-1-1-0 = { module = "androidx.vectordrawable:vectordrawable-animated", version = "1.1.0" } |
| 102 | + androidx-versionedparcelable-versionedparcelable-1-1-0 = { module = "androidx.versionedparcelable:versionedparcelable", version = "1.1.0" } |
| 103 | + androidx-viewpager-viewpager-1-0-0 = { module = "androidx.viewpager:viewpager", version = "1.0.0" } |
| 104 | + junit-junit-4-11 = { module = "junit:junit", version = "4.11" } |
| 105 | + junit-junit-4-12 = { module = "junit:junit", version = "4.12" } |
| 106 | + junit-junit-4-13 = { module = "junit:junit", version = "4.13" } |
| 107 | + org-hamcrest-hamcrest-core-1-3 = { module = "org.hamcrest:hamcrest-core", version = "1.3" } |
| 108 | + '''.stripIndent() |
| 109 | + |
73 | 110 | String expectedOutput = '''\
|
74 | 111 | Your build uses 28 dependencies, representing 26 distinct 'libraries.' 1 libraries have multiple versions across the build. These are:
|
75 | 112 | * junit:junit:{4.11,4.12,4.13}'''.stripIndent()
|
|
0 commit comments