Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions gradle-plugins/biz.aQute.bnd.gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
groovy
`kotlin-dsl`
id("com.gradle.plugin-publish")
id("dev.hargrave.addmavendescriptor")
}

interface Injected {
Expand Down Expand Up @@ -132,15 +133,6 @@ publishing {
name.set(artifactId)
description.set("The Bnd Gradle plugins.")
}
val publication = this
tasks.register<WriteProperties>("generatePomPropertiesFor${publication.name.capitalize()}Publication") {
description = "Generates the Maven pom.properties file for publication '${publication.name}'."
group = PublishingPlugin.PUBLISH_TASK_GROUP
setOutputFile(layout.buildDirectory.file("publications/${publication.name}/pom-default.properties"))
property("groupId", provider { publication.groupId })
property("artifactId", provider { publication.artifactId })
property("version", provider { publication.version })
}
}
// Configure pom metadata
withType<MavenPublication> {
Expand Down Expand Up @@ -208,20 +200,6 @@ tasks.pluginUnderTestMetadata {
tasks.jar {
// Include dsl SourceSet
from(dsl.get().output)
// META-INF/maven folder
val metaInfMaven = publishing.publications.named<MavenPublication>("pluginMaven").map {
"META-INF/maven/${it.groupId}/${it.artifactId}"
}
// Include generated pom.xml file
into(metaInfMaven) {
from(tasks.named("generatePomFileForPluginMavenPublication"))
rename { "pom.xml" }
}
// Include generated pom.properties file
into(metaInfMaven) {
from(tasks.named("generatePomPropertiesForPluginMavenPublication"))
rename { "pom.properties" }
}
}

tasks.named<Jar>("sourcesJar") {
Expand Down
1 change: 1 addition & 0 deletions gradle-plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pluginManagement {
plugins {
id("com.gradle.plugin-publish") version "1.0.0"
id("dev.hargrave.addmavendescriptor") version "1.0.0"
}
}

Expand Down