Gradle Maven Publish Plugin: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 29: | Line 29: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang='groovy'> | <syntaxhighlight lang='groovy'> | ||
Line 41: | Line 40: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=Publishing to a Maven Repository= | =Publishing to a Maven Repository= |
Revision as of 19:52, 15 May 2018
External
Internal
Overview
"maven-publish" is an newer alternative to publishing with Maven Plugin. It generates Maven metadata and pushes the artifacts and the metadata to a Maven repository.
apply plugin: 'maven-publish'
"publishing" Extension
The plugin creates a "publishing" extension of type PublishingExtension. This extension provides a container of named publications and a container of named repositories.
publishing {
publications {
myPublicationName(MavenPublication) {
// Configure the publication here
}
}
}
repositories {
maven {
url "${url}"
authentication {
basic(BasicAuthentication)
}
}
}