Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f55870f
commit a6b7dd7
Showing
4 changed files
with
78 additions
and
9 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
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
if (project.name.endsWith('-distribution')) { | ||
// artifactory-upload is for publishing configurations | ||
apply plugin: 'com.jfrog.artifactory-upload' | ||
} else { | ||
// artifactory is for publishing publications | ||
apply plugin: 'com.jfrog.artifactory' | ||
} | ||
|
||
artifactory { | ||
contextUrl = 'https://oss.jfrog.org/artifactory' //The base Artifactory URL if not overridden by the publisher/resolver | ||
publish { | ||
repository { | ||
repoKey = 'oss-snapshot-local' | ||
username = System.env['BINTRAY_USER'] ?: (project.hasProperty('bintrayUsername') ? project.bintrayUsername : '') | ||
password = System.env['BINTRAY_KEY'] ?: (project.hasProperty('bintrayApiKey') ? project.bintrayApiKey : '') | ||
maven = true | ||
} | ||
defaults { | ||
|
||
if (project.name.endsWith('-distribution')) { | ||
// NOTE ignore warning that install task does not exist; the plugin is looking for the wrong task!! | ||
publishConfigs('archives') | ||
} | ||
else { | ||
publications('mavenNebula') | ||
} | ||
|
||
def dryRun = project.hasProperty('dryRun') && project.dryRun.toBoolean() | ||
publishBuildInfo = !dryRun //Publish build-info to Artifactory (true by default) | ||
publishArtifacts = !dryRun //Publish artifacts to Artifactory (true by default) | ||
publishPom = !dryRun && !project.name.endsWith('-distribution') //Publish generated POM files to Artifactory (true by default). | ||
publishIvy = false //Publish generated Ivy descriptor files to Artifactory (true by default). | ||
|
||
} | ||
} | ||
} | ||
|
||
artifactoryPublish.dependsOn preparePublish |
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