Skip to content

Commit f6b5243

Browse files
committed
Build improvements.
Updated to latest Gradle, aligned closer to previous SBT build and rationalised all configuration.
1 parent eaca9d4 commit f6b5243

File tree

9 files changed

+103
-106
lines changed

9 files changed

+103
-106
lines changed

.travis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
language: java
2-
script: sbt test
3-
2+
script:
3+
- ./gradlew check
4+
cache:
5+
directories:
6+
- $HOME/.gradle
7+
jdk:
8+
- openjdk6
9+
env:
10+
global:
11+
- TERM=dumb

CopyrightWaivers.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ savulchik | Stanislav Savulchik, [email protected]
2626
ktoso | Konrad Malawski, [email protected], Typesafe Inc.
2727
ouertani | Slim Ouertani, [email protected]
2828
2m | Martynas Mickevičius, [email protected], Typesafe Inc.
29+
ldaley | Luke Daley, [email protected], Gradleware Inc.

api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
description = 'reactive-streams-api'
1+
description = "reactive-streams"

build.gradle

Lines changed: 86 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,105 @@
1-
allprojects {
2-
apply plugin: 'java'
3-
apply plugin: 'maven'
4-
apply plugin: 'eclipse'
5-
apply plugin: 'idea'
6-
apply plugin: 'ivy-publish'
7-
1+
subprojects {
2+
apply plugin: "java"
3+
apply plugin: "osgi"
84

9-
group = 'org.reactivestreams'
10-
version = '1.0.0.M1'
5+
group = "org.reactivestreams"
6+
version = "1.0.0.M1"
117

12-
13-
gradle.projectsEvaluated {
14-
tasks.withType(JavaCompile) {
15-
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
16-
options.encoding = 'UTF-8'
17-
}
18-
19-
tasks.withType(Javadoc) {
20-
source = sourceSets.main.allJava
21-
22-
configure(options) {
23-
encoding 'UTF-8'
24-
docEncoding 'UTF-8'
25-
charSet 'UTF-8'
26-
linkSource true
27-
noTimestamp true
28-
}
8+
sourceCompatibility = 1.6
9+
targetCompatibility = 1.6
10+
11+
tasks.withType(JavaCompile) {
12+
configure(options) {
13+
compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
14+
encoding = "UTF-8"
2915
}
3016
}
3117

32-
uploadArchives {
33-
34-
repositories {
35-
36-
mavenDeployer {
18+
tasks.withType(Javadoc) {
19+
configure(options) {
20+
encoding "UTF-8"
21+
docEncoding "UTF-8"
22+
charSet "UTF-8"
23+
linkSource true
24+
noTimestamp true
25+
}
26+
}
3727

38-
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2")
28+
repositories {
29+
mavenCentral()
30+
}
3931

40-
pom.project {
41-
name 'org.reactivestreams'
42-
packaging 'jar'
43-
url 'http://www.reactive-streams.org/'
44-
inceptionYear '2014'
32+
jar {
33+
manifest {
34+
instruction "Bundle-Vendor", "Reactive Streams SIG"
35+
instruction "Bundle-Description", "Reactive Streams API"
36+
instruction "Bundle-DocURL", "http://reactive-streams.org"
37+
}
38+
}
4539

46-
scm {
47-
url '[email protected]:reactive-streams/reactive-streams.git'
48-
connection 'scm:git:[email protected]:reactive-streams/reactive-streams.git'
49-
}
40+
if (name in ["reactive-streams", "reactive-streams-tck"]) {
41+
apply plugin: "maven"
42+
apply plugin: "signing"
5043

51-
licenses {
52-
license {
53-
name 'CC0'
54-
url 'http://creativecommons.org/publicdomain/zero/1.0/'
55-
distribution 'repo'
56-
}
57-
}
44+
signing {
45+
sign configurations.archives
46+
required { gradle.taskGraph.hasTask(uploadArchives) }
47+
}
48+
task sourcesJar(type: Jar) {
49+
classifier "sources"
50+
from sourceSets.main.allSource
51+
}
5852

59-
developers {
60-
developer {
61-
id 'reactive-streams-sig'
62-
name 'Reactive Streams SIG'
63-
url 'http://www.reactive-streams.org/'
64-
}
65-
}
66-
}
67-
}
68-
53+
task javadocJar(type: Jar) {
54+
classifier "javadoc"
55+
from javadoc
6956
}
70-
}
71-
repositories {
72-
mavenLocal()
73-
mavenCentral()
74-
}
75-
76-
publishing {
77-
repositories {
78-
ivy {
79-
// change to point to your repo, e.g. http://my.org/repo
80-
url "${rootProject.buildDir}/repo"
81-
}
57+
58+
artifacts {
59+
archives sourcesJar, javadocJar
8260
}
83-
publications {
84-
ivy(IvyPublication) {
85-
from components.java
86-
descriptor.withXml {
87-
asNode().info[0].appendNode('description', description)
61+
62+
uploadArchives {
63+
repositories {
64+
mavenDeployer {
65+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2")
8866
}
8967
}
9068
}
91-
}
92-
}
9369

94-
subprojects {
70+
tasks.withType(Upload) {
71+
repositories.withType(MavenResolver) {
72+
it.beforeDeployment { signing.signPom(it) }
73+
it.pom.whenConfigured { pom ->
74+
pom.project {
75+
url "http://www.reactive-streams.org/"
76+
inceptionYear "2014"
9577

96-
sourceCompatibility = 1.6
97-
targetCompatibility = 1.6
78+
scm {
79+
url "[email protected]:reactive-streams/reactive-streams.git"
80+
connection "scm:git:[email protected]:reactive-streams/reactive-streams.git"
81+
}
9882

99-
compileJava.options.encoding = 'UTF-8'
83+
licenses {
84+
license {
85+
name "CC0"
86+
url "http://creativecommons.org/publicdomain/zero/1.0/"
87+
distribution "repo"
88+
}
89+
}
10090

101-
javadoc {
102-
options.encoding = 'UTF-8'
103-
}
104-
}
91+
developers {
92+
developer {
93+
id "reactive-streams-sig"
94+
name "Reactive Streams SIG"
95+
url "http://www.reactive-streams.org/"
96+
}
97+
}
98+
}
99+
}
100+
}
101+
}
102+
} else {
103+
uploadArchives.enabled = false
104+
}
105+
}

examples/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
description = 'reactive-streams-examples'
22
dependencies {
3-
compile project(':reactive-streams-api')
3+
compile project(':reactive-streams')
44
}

examples/build.sbt

Lines changed: 0 additions & 13 deletions
This file was deleted.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-bin.zip

settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
rootProject.name = 'reactive-streams'
2-
include ':reactive-streams-api'
2+
include ':reactive-streams'
33
include ':reactive-streams-tck'
44
include ':reactive-streams-examples'
55

6-
project(':reactive-streams-api').projectDir = "$rootDir/api" as File
6+
project(':reactive-streams').projectDir = "$rootDir/api" as File
77
project(':reactive-streams-tck').projectDir = "$rootDir/tck" as File
88
project(':reactive-streams-examples').projectDir = "$rootDir/examples" as File
99

tck/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
description = 'reactive-streams-tck'
22
dependencies {
33
compile group: 'org.testng', name: 'testng', version:'5.14.10'
4-
compile project(':reactive-streams-api')
4+
compile project(':reactive-streams')
55
}
66
test.useTestNG()

0 commit comments

Comments
 (0)