(minor) Improve readability of pluginMarkers.gradle, fix indent in file

(minor) Clarify the comment on the setUpSeparateArtifact block
This commit is contained in:
Sergey Igushkin
2017-08-04 15:40:30 +03:00
parent 94036b7cac
commit 0cfac71efe
2 changed files with 5 additions and 3 deletions
@@ -11,6 +11,7 @@ ext.pluginMarkerProject = { String pluginProjectId ->
compile pluginProject compile pluginProject
} }
// Remove the default JAR artifact added by the Java plugin
configurations.archives.artifacts.clear() configurations.archives.artifacts.clear()
configurePublishing(project) configurePublishing(project)
@@ -19,7 +20,7 @@ ext.pluginMarkerProject = { String pluginProjectId ->
version = project.version + (findProperty('marker_version_suffix') ?: "") version = project.version + (findProperty('marker_version_suffix') ?: "")
for (pluginId in pluginProject.pluginBundle.plugins*.id) { for (pluginId in pluginProject.pluginBundle.plugins.collect { it.id }) {
def artifactName = "${pluginId}.gradle.plugin" def artifactName = "${pluginId}.gradle.plugin"
artifacts { artifacts {
@@ -27,11 +28,12 @@ ext.pluginMarkerProject = { String pluginProjectId ->
archives(emptyJar) { archives(emptyJar) {
group = pluginId group = pluginId
name = artifactName name = artifactName
classifier theClassifier classifier = theClassifier
} }
} }
} }
// Publish each gradle plugin marker under its own Maven coordinates pluginId:pluginId.gradle.plugin
def setUpSeparateArtifact = { def setUpSeparateArtifact = {
addFilter(pluginId) { artifact, file -> artifact.name == artifactName } addFilter(pluginId) { artifact, file -> artifact.name == artifactName }
def pom = pom(pluginId) def pom = pom(pluginId)
@@ -1,6 +1,6 @@
pluginManagement { pluginManagement {
repositories { repositories {
maven { url '<mavenLocalUrl>' } maven { url '<mavenLocalUrl>' }
gradlePluginPortal() gradlePluginPortal()
} }
} }