File tree Expand file tree Collapse file tree 3 files changed +64
-44
lines changed
Expand file tree Collapse file tree 3 files changed +64
-44
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ import org.apache.tools.ant.taskdefs.condition.Os
33
44defaultTasks ' build'
55
6+ Boolean doSigning () {
7+ signingEnabled. trim() == " true"
8+ }
9+
10+
611ext {
712}
813
@@ -47,8 +52,58 @@ allprojects {
4752}
4853
4954subprojects {
55+ apply plugin : " maven"
5056
57+ if (doSigning()) {
58+ apply plugin : " signing"
59+ signing {
60+ sign configurations. archives
61+ }
62+ }
5163
52-
64+ uploadArchives {
65+ enabled = false
66+ repositories {
67+ mavenDeployer {
68+ if (doSigning()) {
69+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
70+ }
71+
72+ repository(url : sonatypeUploadUrl) {
73+ authentication(userName : sonatypeUsername, password : sonatypePassword)
74+ }
75+ pom {
76+ groupId = project. group
77+ project {
78+ name pomProjectName
79+ packaging ' jar'
80+ description projectDescription
81+ url projectUrl
82+ organization {
83+ name pomOrganisation
84+ url projectUrl
85+ }
86+ scm {
87+ url scmUrl
88+ // connection scmGitFile
89+ // developerConnection scmGitFile
90+ }
91+ licenses {
92+ license {
93+ name " The BSD3 License"
94+ url " https://github.com/functionaljava/functionaljava/blob/master/etc/LICENCE"
95+ distribution ' repo'
96+ }
97+ }
98+ developers {
99+ developer {
100+ email primaryEmail
101+ }
102+ }
103+ }
104+ }
105+ }
106+ }
107+ }
53108
54109}
Original file line number Diff line number Diff line change @@ -72,46 +72,5 @@ if (doSigning()) {
7272 }
7373}
7474
75- uploadArchives {
76- repositories {
77- mavenDeployer {
78- if (doSigning()) {
79- beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
80- }
81-
82- repository(url : sonatypeUploadUrl) {
83- authentication(userName : sonatypeUsername, password : sonatypePassword)
84- }
85- pom {
86- groupId = project. group
87- project {
88- name pomProjectName
89- packaging ' jar'
90- description projectDescription
91- url projectUrl
92- organization {
93- name pomOrganisation
94- url projectUrl
95- }
96- scm {
97- url scmUrl
98- // connection scmGitFile
99- // developerConnection scmGitFile
100- }
101- licenses {
102- license {
103- name " The BSD3 License"
104- url " https://github.com/functionaljava/functionaljava/blob/master/etc/LICENCE"
105- distribution ' repo'
106- }
107- }
108- developers {
109- developer {
110- email primaryEmail
111- }
112- }
113- }
114- }
115- }
116- }
117- }
75+ uploadArchives. enabled = true
76+
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ repositories {
1111 mavenCentral()
1212}
1313
14+ jar {
15+ baseName " ${ project.projectName} -${ project.name} "
16+ version project. fjVersion
17+ }
18+
1419task javadoc (type : Javadoc , overwrite : true ) {
1520 def t = createDynamicJavadoc(" $projectDir " , [" core" ])
1621 dependsOn(t)
@@ -31,3 +36,4 @@ compileJava {
3136 options. forkOptions. executable = " $jh $extension /bin/javac"
3237}
3338
39+ uploadArchives. enabled = true
You can’t perform that action at this time.
0 commit comments