From f3d321f015ae8ab8a37982c922b3f06ce5676295 Mon Sep 17 00:00:00 2001 From: Dries Samyn Date: Fri, 15 Dec 2023 09:20:52 +0000 Subject: [PATCH 1/2] Add Kotlin version to version catalog. (#1401) --- build.gradle | 16 ++++++++-------- corda-api/build.gradle | 6 +----- gradle.properties | 1 - gradle/libs.versions.toml | 9 +++++++++ settings.gradle | 3 --- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index e7759d4127..729514e458 100644 --- a/build.gradle +++ b/build.gradle @@ -13,9 +13,9 @@ buildscript { plugins { id 'net.corda.cordapp.cordapp-configuration' - id 'org.jetbrains.kotlin.jvm' apply false - id 'org.jetbrains.kotlin.plugin.allopen' apply false - id 'org.jetbrains.kotlin.plugin.jpa' apply false + alias libs.plugins.kotlin.jvm apply false + alias libs.plugins.kotlin.allopen apply false + alias libs.plugins.kotlin.jpa apply false alias libs.plugins.detekt apply false alias libs.plugins.snyk alias libs.plugins.grgit // used for GIT interaction (e.g. extract commit hash) @@ -52,11 +52,11 @@ def revision = { void configureKotlinForOSGi(Configuration configuration) { configuration.resolutionStrategy { dependencySubstitution { - substitute module('org.jetbrains.kotlin:kotlin-stdlib-jdk8') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") - substitute module('org.jetbrains.kotlin:kotlin-stdlib-jdk7') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") - substitute module('org.jetbrains.kotlin:kotlin-stdlib-common') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") - substitute module('org.jetbrains.kotlin:kotlin-stdlib') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") - substitute module('org.jetbrains.kotlin:kotlin-reflect') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:$kotlinVersion") + substitute module('org.jetbrains.kotlin:kotlin-stdlib-jdk8') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") + substitute module('org.jetbrains.kotlin:kotlin-stdlib-jdk7') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") + substitute module('org.jetbrains.kotlin:kotlin-stdlib-common') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") + substitute module('org.jetbrains.kotlin:kotlin-stdlib') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") + substitute module('org.jetbrains.kotlin:kotlin-reflect') using module("org.jetbrains.kotlin:kotlin-osgi-bundle:${libs.versions.kotlinVersion.get()}") } } } diff --git a/corda-api/build.gradle b/corda-api/build.gradle index 2b6a00f9cf..80550c64ea 100644 --- a/corda-api/build.gradle +++ b/corda-api/build.gradle @@ -27,11 +27,7 @@ dependencies { api project(':serialization') api(libs.javax.persistence.api) - api('org.jetbrains.kotlin:kotlin-osgi-bundle') { - version { - require kotlinVersion - } - } + api(libs.kotlin.osgi.bundle) api('org.jetbrains:annotations') { version { require jetbrainsAnnotationsVersion diff --git a/gradle.properties b/gradle.properties index 3383b4e9c0..aac3ab7b77 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,6 @@ cordaProductVersion = 5.2.0 cordaApiRevision = 15 # Main -kotlinVersion = 1.8.21 kotlin.stdlib.default.dependency = false # These are the same annotations that Kotlin uses. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3892ac59bb..b22110bf28 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -46,6 +46,12 @@ jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-datab jackson-kotlin = { group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version.ref = "jacksonVersion" } jackson-yaml = { group = "com.fasterxml.jackson.dataformat", name = "jackson-dataformat-yaml", version.ref = "jacksonVersion" } assertj-core = { group = "org.assertj", name = "assertj-core", version.ref = "assertjVersion" } +kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlinVersion" } +kotlin-stdlib-common = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-common", version.ref = "kotlinVersion" } +kotlin-stdlib-jdk7 = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk7", version.ref = "kotlinVersion" } +kotlin-stdlib-jdk8 = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlinVersion" } +kotlin-osgi-bundle = { group = "org.jetbrains.kotlin", name = "kotlin-osgi-bundle", version.ref = "kotlinVersion" } +kotlin-reflect= { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlinVersion" } kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlinVersion" } junit = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junitVersion" } junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junitVersion" } @@ -80,5 +86,8 @@ dokka = { id = "org.jetbrains.dokka", version.ref = "dokkaVersion" } gradle-data = { id = "com.gradle.common-custom-user-data-gradle-plugin", version.ref = "gradleDataVersion" } gradle-enterprise = { id = "com.gradle.enterprise", version.ref = "gradleEnterpriseVersion" } grgit = { id = "org.ajoberstar.grgit", version.ref = "grgitVersion" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlinVersion" } +kotlin-allopen = { id = "org.jetbrains.kotlin.plugin.allopen", version.ref = "kotlinVersion" } +kotlin-jpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlinVersion" } snyk = { id = "io.snyk.gradle.plugin.snykplugin", version.ref = "snykVersion" } task-tree = { id = "com.dorongold.task-tree", version.ref = "taskTreeVersion" } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 2d8523d8ec..8c83d4a9ac 100644 --- a/settings.gradle +++ b/settings.gradle @@ -28,9 +28,6 @@ pluginManagement { plugins { id 'com.gradle.enterprise' version gradleEnterpriseVersion id 'com.gradle.common-custom-user-data-gradle-plugin' version gradleDataPlugin - id 'org.jetbrains.kotlin.jvm' version kotlinVersion - id 'org.jetbrains.kotlin.plugin.allopen' version kotlinVersion - id 'org.jetbrains.kotlin.plugin.jpa' version kotlinVersion id "com.jfrog.artifactory" version artifactoryPluginVersion } } From 8c922a70c4c53dccbcb9177e3c7cbe07e8e872a6 Mon Sep 17 00:00:00 2001 From: Yiftach Kaplan <67583323+yift-r3@users.noreply.github.com> Date: Fri, 15 Dec 2023 10:22:30 +0000 Subject: [PATCH 2/2] CORE-18550: add payload reply from gateway (#1395) * CORE-18550: add ack reply from gateway * Apply review comment * Bump API version post merge --- .../avro/net/corda/data/p2p/gateway/GatewayResponse.avsc | 8 ++++++++ gradle.properties | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/gateway/GatewayResponse.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/gateway/GatewayResponse.avsc index ffebbeafd1..16ba046d64 100644 --- a/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/gateway/GatewayResponse.avsc +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/gateway/GatewayResponse.avsc @@ -8,6 +8,14 @@ "name": "id", "type": "string", "doc": "The id of the request corresponding to this response." + }, + { + "name": "payload", + "type": [ + "null", + "net.corda.data.p2p.crypto.AuthenticatedEncryptedDataMessage", + "net.corda.data.p2p.crypto.AuthenticatedDataMessage" + ] } ] } diff --git a/gradle.properties b/gradle.properties index aac3ab7b77..ff1e9484eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ cordaProductVersion = 5.2.0 # NOTE: update this each time this module contains a breaking change ## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to ## a per module property in which case module versions can change independently. -cordaApiRevision = 15 +cordaApiRevision = 16 # Main kotlin.stdlib.default.dependency = false