Skip to content

Commit 9a70ef6

Browse files
committed
fix: preserve seeded bundle publications
1 parent 08e967b commit 9a70ef6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

plugin/src/main/kotlin/org/openprojectx/gradle/dependency/bundle/ExportDependencyBundleTask.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import org.gradle.api.file.DirectoryProperty
1616
import org.gradle.api.provider.ListProperty
1717
import org.gradle.api.provider.Property
1818
import org.gradle.api.tasks.Input
19-
import org.gradle.api.tasks.OutputDirectory
19+
import org.gradle.api.tasks.Internal
2020
import org.gradle.api.tasks.TaskAction
2121
import org.gradle.work.DisableCachingByDefault
2222
import org.openprojectx.gradle.dependency.bundle.core.ArtifactRecord
@@ -43,7 +43,11 @@ abstract class ExportDependencyBundleTask : DefaultTask() {
4343
@get:Input abstract val gradleVariantRequests: ListProperty<String>
4444
@get:Input abstract val artifactRepositoryUrls: ListProperty<String>
4545
@get:Input abstract val pluginVersion: Property<String>
46-
@get:OutputDirectory abstract val outputDirectory: DirectoryProperty
46+
// This task merges resolved artifacts into a repository that may already
47+
// contain publications from the current build. Declaring the whole bundle
48+
// as an output directory lets Gradle clean those publications immediately
49+
// before execution (notably POM-only plugin markers on a fresh CI runner).
50+
@get:Internal abstract val outputDirectory: DirectoryProperty
4751

4852
private val components = linkedMapOf<String, ComponentNode>()
4953
private val edges = linkedSetOf<DependencyEdge>()

0 commit comments

Comments
 (0)