Skip to content

Commit

Permalink
Reuse pluginMaven publication which is configured by java-gradle-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
chkpnt committed Apr 13, 2020
1 parent 9127a8f commit 6272ced
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
/*********************************
* Configure Maven-Artifact
*********************************/
apply plugin: 'maven'
//apply plugin: 'maven'
apply plugin: 'maven-publish'

task sourcesJar (type : Jar) {
Expand All @@ -17,9 +17,9 @@ task sourcesJar (type : Jar) {

publishing {
publications {
plugin(MavenPublication) {
from components.java
pluginMaven(MavenPublication) {
artifact sourcesJar

pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
Expand All @@ -46,8 +46,6 @@ publishing {
}
}
}

artifact sourcesJar
}
}
}
Expand All @@ -63,7 +61,7 @@ setToDefaultIfNotExists('bintrayApiKey', 'unspecified')
bintray {
user = project.bintrayUser
key = project.bintrayApiKey
publications = ['plugin'] // This refers to the Maven-based publication files above
publications = ['pluginMaven'] // This refers to the Maven-based publication files above
dryRun = false
publish = true
pkg {
Expand Down

0 comments on commit 6272ced

Please sign in to comment.