/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ plugins { id 'com.gradle.build-scan' version '2.4.2' id 'com.github.sherter.google-java-format' version '0.8' apply false id 'com.jfrog.artifactory' version '4.9.10' apply false id 'com.jfrog.bintray' version '1.8.4' apply false id 'me.champeau.gradle.jmh' version '0.4.8' apply false id 'io.spring.dependency-management' version '1.0.7.RELEASE' apply false id 'io.morethan.jmhreport' version '0.9.0' apply false } subprojects { apply plugin: 'io.spring.dependency-management' apply plugin: 'com.github.sherter.google-java-format' ext['reactor-bom.version'] = 'Dysprosium-RELEASE' ext['logback.version'] = '1.2.3' ext['findbugs.version'] = '3.0.2' ext['netty-bom.version'] = '4.1.37.Final' ext['netty-boringssl.version'] = '2.0.25.Final' ext['hdrhistogram.version'] = '2.1.10' ext['mockito.version'] = '2.25.1' ext['slf4j.version'] = '1.7.25' ext['jmh.version'] = '1.21' ext['junit.version'] = '5.5.2' ext['hamcrest.version'] = '1.3' ext['micrometer.version'] = '1.0.6' ext['assertj.version'] = '3.11.1' group = "io.rsocket" googleJavaFormat { toolVersion = '1.6' } ext { if (project.hasProperty('versionSuffix')) { project.version += project.getProperty('versionSuffix') } } dependencyManagement { imports { mavenBom "io.projectreactor:reactor-bom:${ext['reactor-bom.version']}" mavenBom "io.netty:netty-bom:${ext['netty-bom.version']}" mavenBom "org.junit:junit-bom:${ext['junit.version']}" } dependencies { dependency "ch.qos.logback:logback-classic:${ext['logback.version']}" dependency "com.google.code.findbugs:jsr305:${ext['findbugs.version']}" dependency "io.netty:netty-tcnative-boringssl-static:${ext['netty-boringssl.version']}" dependency "io.micrometer:micrometer-core:${ext['micrometer.version']}" dependency "org.assertj:assertj-core:${ext['assertj.version']}" dependency "org.hdrhistogram:HdrHistogram:${ext['hdrhistogram.version']}" dependency "org.slf4j:slf4j-api:${ext['slf4j.version']}" dependencySet(group: 'org.mockito', version: ext['mockito.version']) { entry 'mockito-junit-jupiter' entry 'mockito-core' } // TODO: Remove after JUnit5 migration dependency 'junit:junit:4.12' dependency "org.hamcrest:hamcrest-library:${ext['hamcrest.version']}" dependencySet(group: 'org.openjdk.jmh', version: ext['jmh.version']) { entry 'jmh-core' entry 'jmh-generator-annprocess' } } generatedPomCustomization { enabled = false } } repositories { mavenCentral() if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) { maven { url 'http://repo.spring.io/libs-snapshot' } } } plugins.withType(JavaPlugin) { compileJava { sourceCompatibility = 1.8 // TODO: Cleanup warnings so no need to exclude options.compilerArgs << '-Xlint:all,-overloads,-rawtypes,-unchecked' } javadoc { options.with { links 'https://docs.oracle.com/javase/8/docs/api/' links 'https://projectreactor.io/docs/core/release/api/' links 'https://netty.io/4.1/api/' } } test { useJUnitPlatform() systemProperty "io.netty.leakDetection.level", "ADVANCED" } tasks.named("javadoc").configure { onlyIf { System.getenv('SKIP_RELEASE') != "true" } } } plugins.withType(JavaLibraryPlugin) { task sourcesJar(type: Jar) { classifier 'sources' from sourceSets.main.allJava } task javadocJar(type: Jar, dependsOn: javadoc) { classifier 'javadoc' from javadoc.destinationDir } plugins.withType(MavenPublishPlugin) { publishing { publications { maven(MavenPublication) { from components.java artifact sourcesJar artifact javadocJar } } } } } } apply from: "${rootDir}/gradle/publications.gradle" buildScan { termsOfServiceUrl = 'https://gradle.com/terms-of-service' termsOfServiceAgree = 'yes' } description = 'RSocket: Stream Oriented Messaging Passing with Reactive Stream Semantics.' repositories { mavenCentral() }