|
15 | 15 | */
|
16 | 16 |
|
17 | 17 | plugins {
|
18 |
| - id 'com.gradle.build-scan' version '1.9' // declare before any other plugin |
| 18 | + id 'com.gradle.build-scan' version '1.12.1' |
19 | 19 |
|
| 20 | + id 'com.github.johnrengelman.shadow' version '2.0.2' apply false |
20 | 21 | id 'com.github.sherter.google-java-format' version '0.6'
|
21 |
| - id 'com.github.johnrengelman.shadow' version '2.0.1' apply false |
22 |
| - id 'me.champeau.gradle.jmh' version '0.4.4' apply false |
23 |
| - id 'io.morethan.jmhreport' version '0.6.2.1' apply false |
24 |
| - |
25 |
| - id 'com.jfrog.artifactory' version '4.5.2' |
26 |
| - id 'com.jfrog.bintray' version '1.7.3' |
| 22 | + id 'com.jfrog.artifactory' version '4.7.0' |
| 23 | + id 'com.jfrog.bintray' version '1.8.0' |
| 24 | + id 'me.champeau.gradle.jmh' version '0.4.5' apply false |
| 25 | + id 'io.spring.dependency-management' version '1.0.4.RELEASE' apply false |
| 26 | + id 'io.morethan.jmhreport' version '0.7.0' apply false |
27 | 27 | }
|
28 | 28 |
|
29 |
| -repositories { |
30 |
| - jcenter() |
| 29 | +allprojects { |
| 30 | + version '0.10.0.BUILD-SNAPSHOT' |
31 | 31 | }
|
32 | 32 |
|
33 |
| -description = 'RSocket: stream oriented messaging passing with Reactive Stream semantics.' |
34 |
| - |
35 |
| -buildScan { licenseAgreementUrl = 'https://gradle.com/terms-of-service'; licenseAgree = 'yes' } |
| 33 | +subprojects { |
| 34 | + apply plugin: 'io.spring.dependency-management' |
36 | 35 |
|
37 |
| -googleJavaFormat { |
38 |
| - toolVersion = '1.4' |
39 |
| -} |
| 36 | + dependencyManagement { |
| 37 | + imports { |
| 38 | + // TODO: Upgrade to latest version |
| 39 | + mavenBom 'io.projectreactor:reactor-bom:Bismuth-SR6' |
| 40 | + } |
40 | 41 |
|
41 |
| -subprojects { |
42 |
| - apply plugin: 'java' |
43 |
| - apply plugin: 'maven' |
44 |
| - apply plugin: 'maven-publish' |
45 |
| - apply plugin: 'com.jfrog.bintray' |
46 |
| - apply plugin: 'com.jfrog.artifactory' |
47 |
| - |
48 |
| - group = 'io.rsocket' |
49 |
| - version = mavenversion |
50 |
| - |
51 |
| - compileJava { |
52 |
| - sourceCompatibility = 1.8 |
53 |
| - targetCompatibility = 1.8 |
54 |
| - options.compilerArgs << '-Xlint:all,-overloads,-rawtypes,-unchecked' |
55 |
| - } |
| 42 | + dependencies { |
| 43 | + dependency 'com.google.code.findbugs:jsr305:3.0.2' |
| 44 | + dependency 'com.netflix.spectator:spectator-api:0.63.0' |
| 45 | + dependency 'io.netty:netty-buffer:4.1.21.Final' |
| 46 | + dependency 'junit:junit:4.12' |
| 47 | + dependency 'io.aeron:aeron-all:1.4.1' |
| 48 | + dependency 'org.hamcrest:hamcrest-library:1.3' |
| 49 | + dependency 'org.hdrhistogram:HdrHistogram:2.1.10' |
| 50 | + dependency 'org.mockito:mockito-core:2.16.0' |
| 51 | + dependency 'org.openjdk.jmh:jmh-core:1.20' |
| 52 | + |
| 53 | + dependencySet(group: 'org.openjdk.jmh', version: '1.20') { |
| 54 | + entry 'jmh-core' |
| 55 | + entry 'jmh-generator-annprocess' |
| 56 | + } |
56 | 57 |
|
57 |
| - // custom tasks for creating source/javadoc jars |
58 |
| - task sourcesJar(type: Jar, dependsOn: classes) { |
59 |
| - classifier = 'sources' |
60 |
| - from sourceSets.main.allSource |
| 58 | + dependencySet(group: 'org.slf4j', version: '1.7.25') { |
| 59 | + entry 'slf4j-api' |
| 60 | + entry 'slf4j-nop' |
| 61 | + } |
| 62 | + } |
61 | 63 | }
|
62 | 64 |
|
63 |
| - task javadocJar(type: Jar, dependsOn: javadoc) { |
64 |
| - classifier = 'javadoc' |
65 |
| - from javadoc.destinationDir |
| 65 | + repositories { |
| 66 | + mavenCentral() |
66 | 67 | }
|
67 | 68 |
|
68 |
| - tasks.bintrayUpload.dependsOn tasks.jar, tasks.sourcesJar, tasks.javadocJar |
| 69 | + plugins.withType(JavaPlugin) { |
| 70 | + compileJava { |
| 71 | + sourceCompatibility = 1.8 |
69 | 72 |
|
70 |
| - // add javadoc/source jar tasks as artifacts |
71 |
| - artifacts { |
72 |
| - archives sourcesJar, javadocJar, jar |
| 73 | + // TODO: Cleanup warnings so no need to exclude |
| 74 | + options.compilerArgs << '-Xlint:all,-overloads,-rawtypes,-unchecked' |
| 75 | + } |
73 | 76 | }
|
74 | 77 |
|
75 |
| - repositories { |
76 |
| - jcenter() |
77 |
| - } |
| 78 | + plugins.withType(JavaLibraryPlugin) { |
| 79 | + task sourcesJar(type: Jar) { |
| 80 | + classifier 'sources' |
| 81 | + from sourceSets.main.allJava |
| 82 | + } |
78 | 83 |
|
79 |
| - dependencies { |
80 |
| - compile "io.projectreactor:reactor-core:3.1.3.RELEASE" |
81 |
| - compile "io.netty:netty-buffer:4.1.20.Final" |
82 |
| - compile "org.slf4j:slf4j-api:1.7.25" |
83 |
| - compile "com.google.code.findbugs:jsr305:3.0.2" |
84 |
| - |
85 |
| - testCompile "junit:junit:4.12" |
86 |
| - testCompile "org.mockito:mockito-core:2.10.0" |
87 |
| - testCompile "org.hamcrest:hamcrest-library:1.3" |
88 |
| - testCompile "org.slf4j:slf4j-log4j12:1.7.25" |
89 |
| - testCompile "io.projectreactor:reactor-test:3.1.3.RELEASE" |
| 84 | + task javadocJar(type: Jar, dependsOn: javadoc) { |
| 85 | + classifier 'javadoc' |
| 86 | + from javadoc.destinationDir |
| 87 | + } |
90 | 88 | }
|
91 | 89 |
|
92 |
| - publishing { |
93 |
| - publications { |
94 |
| - mavenJava(MavenPublication) { |
95 |
| - from components.java |
| 90 | + plugins.withType(MavenPublishPlugin) { |
| 91 | + publishing { |
| 92 | + publications { |
| 93 | + maven(MavenPublication) { |
| 94 | + groupId 'io.rsocket' |
96 | 95 |
|
97 |
| - artifact sourcesJar { |
98 |
| - classifier "sources" |
99 |
| - } |
| 96 | + from components.java |
100 | 97 |
|
101 |
| - artifact javadocJar { |
102 |
| - classifier "javadoc" |
| 98 | + artifact sourcesJar |
| 99 | + artifact javadocJar |
103 | 100 | }
|
104 | 101 | }
|
105 | 102 | }
|
106 | 103 | }
|
| 104 | +} |
107 | 105 |
|
108 |
| - artifactory { |
109 |
| - publish { |
110 |
| - contextUrl = 'https://oss.jfrog.org' |
111 |
| - |
112 |
| - repository { |
113 |
| - repoKey = 'oss-snapshot-local' //The Artifactory repository key to publish to |
114 |
| - //when using oss.jfrog.org the credentials are from Bintray. For local build we expect them to be found in |
115 |
| - //~/.gradle/gradle.properties, otherwise to be set in the build server |
116 |
| - // Conditionalize for the users who don't have bintray credentials setup |
117 |
| - if (project.hasProperty('bintrayUser')) { |
118 |
| - username = project.property('bintrayUser') |
119 |
| - password = project.property('bintrayKey') |
120 |
| - } |
121 |
| - } |
122 |
| - |
123 |
| - publications('mavenJava') |
| 106 | +apply from: 'artifactory.gradle' |
| 107 | +apply from: 'bintray.gradle' |
124 | 108 |
|
125 |
| - defaults { |
126 |
| - // Reference to Gradle publications defined in the build script. |
127 |
| - // This is how we tell the Artifactory Plugin which artifacts should be |
128 |
| - // published to Artifactory. |
129 |
| - publications('mavenJava') |
130 |
| - publishArtifacts = true |
131 |
| - } |
132 |
| - } |
133 |
| - } |
| 109 | +buildScan { |
| 110 | + termsOfServiceUrl = 'https://gradle.com/terms-of-service' |
| 111 | + termsOfServiceAgree = 'yes' |
| 112 | +} |
134 | 113 |
|
135 |
| - artifactoryPublish { |
136 |
| - dependsOn jar |
137 |
| - } |
| 114 | +googleJavaFormat { |
| 115 | + toolVersion = '1.5' |
| 116 | +} |
138 | 117 |
|
139 |
| - bintray { |
140 |
| - if (project.hasProperty('bintrayUser')) { |
141 |
| - user = project.property('bintrayUser') |
142 |
| - key = project.property('bintrayKey') |
143 |
| - } |
144 |
| - publications = ['mavenJava'] |
145 |
| - dryRun = false |
146 |
| - publish = true |
147 |
| - override = false |
148 |
| - pkg { |
149 |
| - repo = 'RSocket' |
150 |
| - name = 'rsocket-java' |
151 |
| - desc = 'RSocket' |
152 |
| - websiteUrl = 'https://github.com/rsocket/rsocket-java' |
153 |
| - issueTrackerUrl = 'https://github.com/rsocket/rsocket-java' |
154 |
| - vcsUrl = 'https://github.com/rsocket/rsocket-java.git' |
155 |
| - licenses = ['Apache-2.0'] |
156 |
| - githubRepo = 'rsocket/rsocket-java' //Optional Github repository |
157 |
| - githubReleaseNotesFile = 'README.md' //Optional Github readme file |
158 |
| - if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) { |
159 |
| - def sonatypeUsername = project.property('sonatypeUsername') |
160 |
| - def sonatypePassword = project.property('sonatypePassword') |
161 |
| - version { |
162 |
| - name = "v${project.version}" |
163 |
| - vcsTag = "${project.version}" |
164 |
| - mavenCentralSync { |
165 |
| - sync = false |
166 |
| - user = sonatypeUsername |
167 |
| - password = sonatypePassword |
168 |
| - } |
169 |
| - } |
170 |
| - } |
171 |
| - } |
172 |
| - } |
| 118 | +repositories { |
| 119 | + mavenCentral() |
173 | 120 | }
|
0 commit comments