Skip to content

Commit 61bd2b0

Browse files
author
Justin Ryan
committed
Add local publishing
1 parent 6d4a854 commit 61bd2b0

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Thumbs.db
3434
# Editor Files #
3535
################
3636
*~
37+
*.swp
3738

3839
# Gradle Files #
3940
################

gradle/release.gradle

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,21 @@ unSnapshotVersion.dependsOn checkUpdateNeeded
1717
checkUpdateNeeded.dependsOn checkCommitNeeded
1818
checkCommitNeeded.dependsOn initScmPlugin
1919

20-
// Call out to compile against internal repository
21-
task uploadArtifactory(type: GradleBuild) {
22-
startParameter = project.gradle.startParameter.newInstance()
23-
startParameter.addInitScript( file('gradle/netflix-oss.gradle') )
24-
startParameter.getExcludedTaskNames().add('check')
25-
tasks = [ 'build', 'artifactoryPublish' ]
20+
[
21+
uploadIvyLocal: 'uploadLocal',
22+
uploadArtifactory: 'artifactoryPublish', // Call out to compile against internal repository
23+
buildWithArtifactory: 'build' // Build against internal repository
24+
].each { key, value ->
25+
// Call out to compile against internal repository
26+
task "${key}"(type: GradleBuild) {
27+
startParameter = project.gradle.startParameter.newInstance()
28+
startParameter.addInitScript( file('gradle/netflix-oss.gradle') )
29+
startParameter.getExcludedTaskNames().add('check')
30+
tasks = [ 'build', value ]
31+
}
2632
}
2733
task releaseArtifactory(dependsOn: [checkSnapshotDependencies, uploadArtifactory])
2834

29-
30-
task buildWithArtifactory(type: GradleBuild) {
31-
startParameter = project.gradle.startParameter.newInstance()
32-
startParameter.addInitScript( file('gradle/netflix-oss.gradle') )
33-
startParameter.getExcludedTaskNames().add('check')
34-
tasks = [ 'build' ]
35-
}
36-
3735
// Ensure upload happens before taggging but after all pre-checks
3836
releaseArtifactory.dependsOn checkSnapshotDependencies
3937
createReleaseTag.dependsOn releaseArtifactory

0 commit comments

Comments
 (0)