File tree Expand file tree Collapse file tree 2 files changed +34
-4
lines changed
Expand file tree Collapse file tree 2 files changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ if (JavaVersion.current().isJava8Compatible()) {
1414
1515allprojects {
1616 ext {
17- isSnapshot = true
17+ isSnapshot = false
1818 fjBaseVersion = " 4.0"
1919
2020 snapshotAppendix = " -SNAPSHOT"
2121 fjVersion = fjBaseVersion + (isSnapshot ? snapshotAppendix : " " )
22- fjConsumeVersion = fjVersion
22+ fjConsumeVersion = " $f jBaseVersion $s napshotAppendix "
2323
2424 projectTitle = " Functional Java"
2525 projectName = " functionaljava"
Original file line number Diff line number Diff line change @@ -22,11 +22,41 @@ dependencies {
2222 testCompile " junit:junit:4.11"
2323}
2424
25+
26+ task javadocJar (type : Jar , dependsOn : javadoc) {
27+ classifier = ' javadoc'
28+ from " build/docs/javadoc"
29+ }
30+
31+ task sourcesJar (type : Jar ) {
32+ from sourceSets. main. allSource
33+ classifier = ' sources'
34+ }
35+
36+ artifacts {
37+ archives jar
38+ archives javadocJar
39+ archives sourcesJar
40+ }
41+
42+ Boolean doSigning () {
43+ signingEnabled. trim() == " true"
44+ }
45+
46+ if (doSigning()) {
47+ apply plugin : " signing"
48+ signing {
49+ sign configurations. archives
50+ }
51+ }
52+
2553uploadArchives {
2654 repositories {
2755 mavenDeployer {
28- // used for signing the artifacts, no need to sign snapshot, so leave out for now
29- // beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
56+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
57+ if (doSigning()) {
58+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
59+ }
3060
3161 repository(url : sonatypeUploadUrl) {
3262 authentication(userName : sonatypeUsername, password : sonatypePassword)
You can’t perform that action at this time.
0 commit comments