Skip to content

Commit

Permalink
Add Automatic-Module-Name manigest entry
Browse files Browse the repository at this point in the history
For JDK 9 module system interoperability.

Automatic-Module-Name: reactor.rabbitmq
  • Loading branch information
acogoluegnes committed Nov 8, 2017
1 parent 9e17710 commit e10469e
Showing 1 changed file with 8 additions and 227 deletions.
235 changes: 8 additions & 227 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ configure(rootProject) {
archivesBaseName = 'reactor-rabbitmq'
description = 'Reactor RabbitMQ: A reactive API for RabbitMQ'

jar {
manifest {
attributes("Automatic-Module-Name": "reactor.rabbitmq",
"Implementation-Version": version)
}
}

artifacts {
archives sourcesJar
archives javadocJar
Expand Down Expand Up @@ -255,230 +262,4 @@ project(':reactor-rabbitmq-samples') {
archives sourcesJar
archives javadocJar
}
}

/*
buildscript {
repositories {
maven { url "http://repo.spring.io/plugins-release" }
}
dependencies {
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7',
'io.spring.gradle:spring-io-plugin:0.0.4.RELEASE',
'com.github.jengelman.gradle.plugins:shadow:1.2.0',
'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.8',
'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
}
}
plugins {
id 'org.asciidoctor.convert' version '1.5.2'
}
description = 'Reactive Streams RabbitMQ extensions'
group = 'io.projectreactor.rabbitmq'
ext {
gradleVersion = '3.4'
gradleScriptDir = "${rootProject.projectDir}/gradle"
reactorCoreVersion = "3.1.1.RELEASE"
// Logging
slf4jVersion = '1.7.25'
logbackVersion = '1.2.3'
// Libraries
rabbitMqJavaClientVersion = '5.0.0'
// Testing
mockitoVersion = '1.10.19'
awaitilityVersion = '3.0.0'
junitPlatformVersion = '1.0.0'
junitJupiterVersion = '5.0.0'
javadocLinks = ["http://docs.oracle.com/javase/7/docs/api/",
"http://docs.oracle.com/javaee/6/api/",
"http://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/",
"http://projectreactor.io/docs/core/release/api/",
"http://www.rabbitmq.com/releases/rabbitmq-java-client/current-javadoc/",] as String[]
}
apply from: "$gradleScriptDir/setup.gradle"
apply from: "$gradleScriptDir/doc.gradle"
configure(rootProject) { project ->
apply plugin: 'propdeps'
apply plugin: 'java'
apply from: "${gradleScriptDir}/ide.gradle"
apply plugin: 'osgi'
apply plugin: 'org.junit.platform.gradle.plugin'
ext.bundleImportPackages = ['*']
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:varargs",
"-Xlint:cast",
"-Xlint:classfile",
"-Xlint:dep-ann",
"-Xlint:divzero",
"-Xlint:empty",
"-Xlint:finally",
"-Xlint:overrides",
"-Xlint:path",
"-Xlint:processing",
"-Xlint:static",
"-Xlint:try",
"-Xlint:deprecation",
"-Xlint:unchecked",
"-Xlint:-serial", // intentionally disabled
"-Xlint:-options", // intentionally disabled
"-Xlint:-fallthrough", // intentionally disabled
"-Xlint:-rawtypes" // TODO enable and fix warnings
]
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
junitPlatform {
filters {
includeClassNamePattern '.*Tests'
}
// store test results where Bamboo expects them or the build will fail
reportsDir file('build/test-results/test')
}
// to generate HTML test reports
// from https://stackoverflow.com/questions/39444908/how-to-create-an-html-report-for-junit-5-tests/39455463#39455463
configurations {
junitXmlToHtml
}
task generateHtmlTestReports << {
def reportsDir = new File(buildDir, 'reports/tests/test')
reportsDir.mkdirs()
ant.taskdef(
name: 'junitReport',
classname: 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
classpath: configurations.junitXmlToHtml.asPath
)
ant.junitReport(todir: "$buildDir/test-results/test", tofile: "aggregated-test-results.xml") {
fileset(dir: "$buildDir/test-results/test")
report(format: 'frames', todir: reportsDir)
}
}
afterEvaluate {
def junitPlatformTestTask = tasks.getByName('junitPlatformTest')
generateHtmlTestReports.dependsOn(junitPlatformTestTask)
test.dependsOn(generateHtmlTestReports)
}
// end of HTML test reports
if (JavaVersion.current().isJava8Compatible()) {
compileTestJava.options.compilerArgs += "-parameters"
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.test.resources.srcDirs = ["src/test/resources", "src/test/java"]
configurations.all {
exclude group: 'commons-logging', module: 'commons-logging'
}
project.tasks.withType(Test).all {
systemProperty("java.awt.headless", "true")
systemProperty("reactor.trace.cancel", "true")
systemProperty("reactor.trace.nocapacity", "true")
systemProperty("testGroups", project.properties.get("testGroups"))
scanForTestClasses = false
*/
// include '**/*Tests.*'
// include '**/*Spec.*'
// exclude '**/*Abstract*.*'
// }

/**
repositories {
if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) {
mavenLocal()
maven { url 'http://repo.spring.io/libs-snapshot' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
maven { url 'http://repo.spring.io/libs-milestone' }
maven { url 'http://repo.spring.io/libs-release' }
maven { url "https://dl.bintray.com/rabbitmq/maven-milestones" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
jcenter()
mavenCentral()
}
// dependencies that are common across all java projects
dependencies {
compile "io.projectreactor:reactor-core:$reactorCoreVersion"
compile "com.rabbitmq:amqp-client:$rabbitMqJavaClientVersion"
// Testing
// JUnit Jupiter API and TestEngine implementation
testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
// Only needed to run tests in an (IntelliJ) IDE(A) that bundles an older version
testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
testCompile "io.projectreactor:reactor-test:$reactorCoreVersion"
testCompile "org.awaitility:awaitility:$awaitilityVersion",
"org.mockito:mockito-core:$mockitoVersion"
testRuntime "org.slf4j:jcl-over-slf4j:$slf4jVersion"
testRuntime "org.slf4j:slf4j-api:$slf4jVersion"
testRuntime "ch.qos.logback:logback-classic:$logbackVersion"
// to generate HTML test reports
junitXmlToHtml 'org.apache.ant:ant-junit:1.9.7'
}
// force test runs even when there are no test changes
test.outputs.upToDateWhen { false }
if (project.hasProperty('platformVersion')) {
apply plugin: 'spring-io'
repositories {
maven { url 'http://repo.spring.io/libs-snapshot' }
}
dependencyManagement {
springIoTestRuntime {
imports {
mavenBom "io.spring.platform:platform-bom:$platformVersion"
}
}
}
}
jar {
manifest {
instruction 'Import-Package', bundleImportPackages.join(',')
}
}
}
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
*/
}

0 comments on commit e10469e

Please sign in to comment.