1+ buildscript {
2+ repositories {
3+ maven {
4+ url " https://plugins.gradle.org/m2/"
5+ }
6+ }
7+ dependencies {
8+ classpath " com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
9+ classpath " org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1"
10+ }
11+ }
12+
113plugins {
214 id ' com.gradle.build-scan' version ' 1.16' // declare before any other plugin
315 id ' com.google.osdetector' version ' 1.4.0'
416 id ' com.github.sherter.google-java-format' version ' 0.7.1' apply false
517 id ' com.github.johnrengelman.shadow' version ' 2.0.1' apply false
618 id ' me.champeau.gradle.jmh' version ' 0.4.7' apply false
719 id ' io.morethan.jmhreport' version ' 0.6.2.1' apply false
8- id ' com.jfrog.artifactory' version ' 4.7.3'
9- id ' com.jfrog.bintray' version ' 1.8.4'
1020 id ' io.spring.dependency-management' version ' 1.0.6.RELEASE' apply false
1121 id ' com.google.protobuf' version ' 0.8.5' apply false
1222}
1323
14- apply from : ' artifactory.gradle'
15- apply from : ' bintray.gradle'
16-
1724buildScan { licenseAgreementUrl = ' https://gradle.com/terms-of-service' ; licenseAgree = ' yes' }
1825
26+ apply from : " artifactory.gradle"
27+ apply from : " bintray.gradle"
28+
1929subprojects {
2030 apply plugin : ' io.spring.dependency-management'
2131 apply plugin : ' com.jfrog.bintray'
@@ -24,7 +34,7 @@ subprojects {
2434 apply plugin : ' com.github.sherter.google-java-format'
2535 apply plugin : ' maven'
2636 apply plugin : ' maven-publish'
27-
37+
2838 ext[' reactor-bom.version' ] = ' Californium-SR1'
2939 ext[' rsocket.version' ] = ' 0.11.9'
3040 ext[' rsocket-rpc.version' ] = ' 0.2.4'
@@ -163,4 +173,35 @@ subprojects {
163173 testCompile ' io.rsocket:rsocket-transport-local'
164174 testCompile ' org.mockito:mockito-core'
165175 }
176+
177+ // Build Source Jars
178+ def sourcesJarMap = [name : ' sourcesJar' , type : Jar , dependsOn : classes]
179+ project. tasks. create(sourcesJarMap, {
180+ classifier = ' sources'
181+ from sourceSets. main. allSource
182+ version = " ${ project.version} "
183+ })
184+
185+ // Build Javadoc Jars
186+ def javadocJarMap = [name : ' javadocJar' , type : Jar , dependsOn : javadoc]
187+ project. tasks. create(javadocJarMap, {
188+ classifier = ' javadoc'
189+ from javadoc. destinationDir
190+ version = " ${ project.version} "
191+ })
192+
193+ artifacts {
194+ archives sourcesJar
195+ archives javadocJar
196+ }
197+
198+ publishing {
199+ publications {
200+ mavenJava(MavenPublication ) {
201+ from components. java
202+ artifact sourcesJar
203+ artifact javadocJar
204+ }
205+ }
206+ }
166207}
0 commit comments