Skip to content

Commit

Permalink
CORE-15789: upgrade api repo to use Java 17 but compile to 11 bytecode (
Browse files Browse the repository at this point in the history
#1196)

upgraded API repo to use Java 17 but made it compile to 11 bytecode
  • Loading branch information
jennyang-r3 authored Aug 2, 2023
1 parent 120a5d7 commit 0393fa0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .ci/JenkinsfileSnykDelta
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

snykDelta(
snykOrgId: 'corda5-snyk-org-id',
snykTokenId: 'r3-snyk-corda5'
snykTokenId: 'r3-snyk-corda5',
javaVersion: '17'
)
3 changes: 2 additions & 1 deletion .ci/nightly/JenkinsfileNightly
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ cordaPipelineKubernetesAgent(
runIntegrationTests: false,
dailyBuildCron: 'H 02 * * *',
gradleAdditionalArgs: '-Dscan.tag.Nightly-Build',
generateSbom: true
generateSbom: true,
javaVersion: '17'
)
3 changes: 2 additions & 1 deletion .ci/nightly/JenkinsfileSnykScan
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@Library('[email protected]') _

cordaSnykScanPipeline (
snykTokenId: 'r3-snyk-corda5'
snykTokenId: 'r3-snyk-corda5',
javaVersion: '17'
)
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ cordaPipeline(
localPublishVersionSuffixOverride: '-beta-9999999999999',
// allow publishing artifacts to S3 bucket
publishToMavenS3Repository: true,
javaVersion: '17'
)
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import static org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
import static org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_8
import static org.gradle.api.JavaVersion.VERSION_11
import static org.gradle.api.JavaVersion.VERSION_17
import static org.gradle.jvm.toolchain.JavaLanguageVersion.of
import org.jetbrains.dokka.gradle.DokkaTask

Expand Down Expand Up @@ -71,7 +71,7 @@ void configureKotlinForOSGi(Configuration configuration) {
}

def releaseType = System.getenv('RELEASE_TYPE') ?: "SNAPSHOT"
def javaVersion = VERSION_11
def javaVersion = VERSION_17

logger.quiet("********************** CORDA BUILD **********************")
if (!JavaVersion.current().isCompatibleWith(javaVersion)) {
Expand Down Expand Up @@ -129,8 +129,8 @@ subprojects {

tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-parameters'

options.encoding = 'UTF-8'
options.release.set(11)
}

// Added to support junit5 tests
Expand Down Expand Up @@ -406,4 +406,4 @@ if (project.hasProperty('generateSBOM')) {
artifactoryPublish {
publications('sbom')
}
}
}

0 comments on commit 0393fa0

Please sign in to comment.