Skip to content

Commit 24d3dc5

Browse files
author
David Motsonashvili
committed
add a transititve dependency test
1 parent 06e1334 commit 24d3dc5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

buildSrc/src/test/kotlin/com/google/firebase/gradle/plugins/PublishingPluginTests.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,23 @@ class PublishingPluginTests {
120120
}
121121
}
122122

123+
@Test
124+
fun `Publish with very transitive dependency`() {
125+
with(controller) {
126+
val project1 = Project(name = "childProject1", version = "1.0", libraryGroup = "libraryGroup")
127+
val project2 =
128+
Project(name = "childProject2", version = "0.9", projectDependencies = setOf(project1))
129+
val project3 = Project(name = "childProject3", version = "1.0", libraryGroup = "libraryGroup")
130+
131+
withProjects(project1, project2, project3)
132+
publish(project2)
133+
134+
project1.pomOrNull().shouldNotBeNull()
135+
project3.pomOrNull().shouldNotBeNull()
136+
project2.pom.dependencies shouldHaveSingleElement project1.toArtifact()
137+
}
138+
}
139+
123140
@Test
124141
fun `Publish with released dependency`() {
125142
with(controller) {

0 commit comments

Comments
 (0)