1
- // Maven side of things
2
1
subprojects {
3
2
apply plugin : ' maven' // Java plugin has to have been already applied for the conf2scope mappings to work
4
3
apply plugin : ' signing'
@@ -8,63 +7,63 @@ subprojects {
8
7
sign configurations. archives
9
8
}
10
9
11
- /**
12
- * Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html
13
- * artifactory will execute uploadArchives to force generation of ivy.xml, and we don't want that to trigger an upload to maven
14
- * central, so using custom upload task.
15
- */
16
- task uploadMavenCentral(type :Upload , dependsOn : signArchives) {
17
- configuration = configurations. archives
18
- onlyIf { [' release' , ' snapshot' ]. contains(project. status) }
10
+ /**
11
+ * Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html
12
+ * artifactory will execute uploadArchives to force generation of ivy.xml, and we don't want that to trigger an upload to maven
13
+ * central, so using custom upload task.
14
+ */
15
+ task uploadMavenCentral(type : Upload , dependsOn : signArchives) {
16
+ configuration = configurations. archives
17
+ onlyIf { [' release' , ' snapshot' ]. contains(project. status) }
19
18
repositories. mavenDeployer {
20
19
beforeDeployment { signing. signPom(it) }
21
20
22
- // To test deployment locally, use the following instead of oss.sonatype.org
23
- // repository(url: "file://localhost/${rootProject.rootDir}/repo")
21
+ // To test deployment locally, use the following instead of oss.sonatype.org
22
+ // repository(url: "file://localhost/${rootProject.rootDir}/repo")
24
23
25
- def sonatypeUsername = rootProject. hasProperty(' sonatypeUsername' )? rootProject. sonatypeUsername: ' '
26
- def sonatypePassword = rootProject. hasProperty(' sonatypePassword' )? rootProject. sonatypePassword: ' '
24
+ def sonatypeUsername = rootProject. hasProperty(' sonatypeUsername' ) ? rootProject. sonatypeUsername : ' '
25
+ def sonatypePassword = rootProject. hasProperty(' sonatypePassword' ) ? rootProject. sonatypePassword : ' '
27
26
28
- repository(url : ' https://oss.sonatype.org/service/local/staging/deploy/maven2' ) {
29
- authentication(userName : sonatypeUsername, password : sonatypePassword)
30
- }
27
+ repository(url : ' https://oss.sonatype.org/service/local/staging/deploy/maven2' ) {
28
+ authentication(userName : sonatypeUsername, password : sonatypePassword)
29
+ }
31
30
32
- snapshotRepository(url : ' https://oss.sonatype.org/content/repositories/snapshots/' ) {
33
- authentication(userName : sonatypeUsername, password : sonatypePassword)
34
- }
31
+ snapshotRepository(url : ' https://oss.sonatype.org/content/repositories/snapshots/' ) {
32
+ authentication(userName : sonatypeUsername, password : sonatypePassword)
33
+ }
35
34
36
- // Prevent datastamp from being appending to artifacts during deployment
37
- uniqueVersion = false
35
+ // Prevent datastamp from being appending to artifacts during deployment
36
+ uniqueVersion = false
38
37
39
- // Closure to configure all the POM with extra info, common to all projects
40
- pom. project {
41
- name " ${ project.name} "
42
- description " ${ project.name} developed by Netflix"
43
- developers {
44
- developer {
45
- id ' netflixgithub'
46
- name ' Netflix Open Source Development'
47
-
48
- }
49
- }
50
- licenses {
51
- license {
52
- name ' The Apache Software License, Version 2.0'
53
- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
54
- distribution ' repo'
55
- }
38
+ // Closure to configure all the POM with extra info, common to all projects
39
+ pom. project {
40
+ name " ${ project.name} "
41
+ description " ${ project.name} developed by Netflix"
42
+ developers {
43
+ developer {
44
+ id ' netflixgithub'
45
+ name ' Netflix Open Source Development'
46
+
56
47
}
57
- url " https://github.com/Netflix/${ rootProject.githubProjectName} "
58
- scm {
59
- connection
" scm:git:[email protected] :Netflix/${ rootProject.githubProjectName} .git"
60
- url
" scm:git:[email protected] :Netflix/${ rootProject.githubProjectName} .git"
61
- developerConnection
" scm:git:[email protected] :Netflix/${ rootProject.githubProjectName} .git"
62
- }
63
- issueManagement {
64
- system ' github'
65
- url " https://github.com/Netflix/${ rootProject.githubProjectName} /issues"
48
+ }
49
+ licenses {
50
+ license {
51
+ name ' The Apache Software License, Version 2.0'
52
+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
53
+ distribution ' repo'
66
54
}
67
55
}
56
+ url " https://github.com/Netflix/${ rootProject.githubProjectName} "
57
+ scm {
58
+ connection
" scm:git:[email protected] :Netflix/${ rootProject.githubProjectName} .git"
59
+ url
" scm:git:[email protected] :Netflix/${ rootProject.githubProjectName} .git"
60
+ developerConnection
" scm:git:[email protected] :Netflix/${ rootProject.githubProjectName} .git"
61
+ }
62
+ issueManagement {
63
+ system ' github'
64
+ url " https://github.com/Netflix/${ rootProject.githubProjectName} /issues"
65
+ }
68
66
}
69
67
}
68
+ }
70
69
}
0 commit comments