-
-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix publishing Gradle plugin to Maven Central #1588
- Loading branch information
Showing
2 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,57 @@ compileGroovy { | |
dependsOn compileKotlin | ||
classpath = classpath.plus(files(compileKotlin.destinationDir)) | ||
} | ||
|
||
publishing { | ||
publications { | ||
pluginMaven(MavenPublication) { | ||
// from components.java | ||
|
||
pom { | ||
name = project.name | ||
description = 'Gradle Pact plugin' | ||
url = 'https://github.com/pact-foundation/pact-jvm' | ||
licenses { | ||
license { | ||
name = 'Apache 2' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution = 'repo' | ||
} | ||
} | ||
scm { | ||
url = 'https://github.com/pact-foundation/pact-jvm' | ||
connection = 'https://github.com/pact-foundation/pact-jvm.git' | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'thetrav' | ||
name = 'Travis Dixon' | ||
email = '[email protected]' | ||
} | ||
developer { | ||
id = 'rholshausen' | ||
name = 'Ronald Holshausen' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url "https://oss.sonatype.org/service/local/staging/deploy/maven2" | ||
if (project.hasProperty('sonatypeUsername')) { | ||
credentials { | ||
username sonatypeUsername | ||
password sonatypePassword | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { project.hasProperty('isRelease') } | ||
sign publishing.publications.pluginMaven | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters