CORDA-3327: Fix API scanning for Java 11. (#5645)

This commit is contained in:
Chris Rankin 2019-10-30 17:24:34 +00:00 committed by Rick Parker
parent b7273f931e
commit 346410a2e1
3 changed files with 17 additions and 17 deletions

View File

@ -34,6 +34,7 @@ buildscript {
ext.quasar_classifier = constants.getProperty("quasarClassifier") ext.quasar_classifier = constants.getProperty("quasarClassifier")
ext.jdkClassifier = constants.getProperty("jdkClassifier") ext.jdkClassifier = constants.getProperty("jdkClassifier")
} }
ext.cordaScanApiClassifier = jdkClassifier
ext.quasar_exclusions = [ ext.quasar_exclusions = [
'co.paralleluniverse**', 'co.paralleluniverse**',
'groovy**', 'groovy**',
@ -186,9 +187,6 @@ plugins {
id 'com.bmuschko.docker-remote-api' id 'com.bmuschko.docker-remote-api'
} }
ext {
}
apply plugin: 'project-report' apply plugin: 'project-report'
apply plugin: 'com.github.ben-manes.versions' apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'net.corda.plugins.publish-utils' apply plugin: 'net.corda.plugins.publish-utils'
@ -201,16 +199,17 @@ apply plugin: 'com.jfrog.artifactory'
// the resulting import. This fixes it. // the resulting import. This fixes it.
apply plugin: 'java' apply plugin: 'java'
println "Java version: " + JavaVersion.current() logger.lifecycle("Java version: {}", JavaVersion.current())
sourceCompatibility = VERSION_1_8 sourceCompatibility = VERSION_1_8
if (JavaVersion.current() == JavaVersion.VERSION_1_8) if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
targetCompatibility = VERSION_1_8 targetCompatibility = VERSION_1_8
else } else {
targetCompatibility = VERSION_11 targetCompatibility = VERSION_11
println "Java source compatibility: " + sourceCompatibility }
println "Java target compatibility: " + targetCompatibility logger.lifecycle("Java source compatibility: {}", sourceCompatibility)
println "Quasar version: " + quasar_version logger.lifecycle("Java target compatibility: {}", targetCompatibility)
println "Quasar classifier: " + quasar_classifier logger.lifecycle("Quasar version: {}", quasar_version)
logger.lifecycle("Quasar classifier: {}", quasar_classifier.toString())
allprojects { allprojects {
apply plugin: 'kotlin' apply plugin: 'kotlin'
@ -241,10 +240,11 @@ allprojects {
} }
} }
sourceCompatibility = VERSION_1_8 sourceCompatibility = VERSION_1_8
if (JavaVersion.current() == JavaVersion.VERSION_1_8) if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
targetCompatibility = VERSION_1_8 targetCompatibility = VERSION_1_8
else } else {
targetCompatibility = VERSION_11 targetCompatibility = VERSION_11
}
jacoco { jacoco {
// JDK11 official support (https://github.com/jacoco/jacoco/releases/tag/v0.8.3) // JDK11 official support (https://github.com/jacoco/jacoco/releases/tag/v0.8.3)
@ -319,11 +319,12 @@ allprojects {
} }
} }
if (jdkClassifier) {
jar { jar {
// JDK11 built and published artifacts to include classifier // JDK11 built and published artifacts to include classifier
if (jdkClassifier != null)
archiveClassifier = jdkClassifier archiveClassifier = jdkClassifier
} }
}
group 'net.corda' group 'net.corda'
version "$corda_release_version" version "$corda_release_version"

View File

@ -3,7 +3,7 @@
# their own projects. So don't get fancy with syntax! # their own projects. So don't get fancy with syntax!
cordaVersion=4.4-SNAPSHOT cordaVersion=4.4-SNAPSHOT
gradlePluginsVersion=5.0.4 gradlePluginsVersion=5.0.5
kotlinVersion=1.2.71 kotlinVersion=1.2.71
java8MinUpdateVersion=171 java8MinUpdateVersion=171
# ***************************************************************# # ***************************************************************#

View File

@ -2,7 +2,6 @@ apply plugin: 'kotlin'
apply plugin: 'kotlin-jpa' apply plugin: 'kotlin-jpa'
apply plugin: 'net.corda.plugins.quasar-utils' apply plugin: 'net.corda.plugins.quasar-utils'
apply plugin: 'net.corda.plugins.publish-utils' apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'net.corda.plugins.api-scanner'
description 'Corda core tests' description 'Corda core tests'