From 3f2112027ca5a885ee9d5fa84859364e0fd6317e Mon Sep 17 00:00:00 2001 From: Jean-Pierre Fortune Date: Fri, 20 Sep 2024 10:49:11 +0200 Subject: [PATCH] feat: upgrade dependencies and API compliance in C# client --- CHANGELOG.md | 14 ++++++++++++++ client/android/app/build.gradle.kts | 10 +++++----- client/android/gradle.properties | 2 +- client/dotnet/domain/api/MainServiceApiAdapter.cs | 3 ++- client/dotnet/domain/data/ApiInfo.cs | 2 +- client/dotnet/domain/data/command/CardRequest.cs | 4 ++-- client/dotnet/domain/data/command/CardSelector.cs | 4 ++-- .../data/command/TransmitCardRequestCmdBody.cs | 4 ++-- .../data/endremoteservice/EndRemoteServiceBody.cs | 3 ++- .../ExecuteRemoteServiceBody.cs | 6 ++++++ server/build.gradle.kts | 14 +++++++------- server/dashboard-app/package.json | 2 +- server/gradle.properties | 2 +- 13 files changed, 46 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0182319..1e9bea9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed +- Android client build. + +### Upgraded +- Keyple components + - keyple-service-java-lib `3.2.1` -> `3.3.1` + - keyple-service-resource-java-lib `3.0.1` -> `3.1.0` + - keyple-distributed-network-java-lib `2.3.1` -> `2.5.1` + - keyple-distributed-remote-java-lib `2.3.1` -> `2.5.1` + - keyple-distributed-local-java-lib `2.3.1` -> `2.5.1` + - keyple-card-calypso-java-lib `3.1.1` -> `3.1.3` + - keyple-card-calypso-crypto-legacysam-java-lib `0.7.0` -> `0.8.0` + - keyple-plugin-pcsc-java-lib `2.2.1` -> `2.2.3` +- C# application to comply with the **Keyple Distributed JSON API** 2.1 ## [2024.04.23] ### Upgraded diff --git a/client/android/app/build.gradle.kts b/client/android/app/build.gradle.kts index f2d234a..2eaa4c0 100644 --- a/client/android/app/build.gradle.kts +++ b/client/android/app/build.gradle.kts @@ -62,7 +62,7 @@ android { buildTypes { getByName("release") { - isMinifyEnabled = true // Enables code shrinking for the release build type. + isMinifyEnabled = false // Disables code shrinking for the release build type. proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" @@ -123,10 +123,10 @@ dependencies { implementation("org.eclipse.keypop:keypop-calypso-card-java-api:2.1.0") implementation("org.eclipse.keyple:keyple-common-java-api:2.0.1") implementation("org.eclipse.keyple:keyple-util-java-lib:2.4.0") - implementation("org.eclipse.keyple:keyple-service-java-lib:3.2.1") - implementation("org.eclipse.keyple:keyple-distributed-network-java-lib:2.3.1") - implementation("org.eclipse.keyple:keyple-distributed-local-java-lib:2.3.1") - implementation("org.eclipse.keyple:keyple-card-calypso-java-lib:3.1.1") + implementation("org.eclipse.keyple:keyple-service-java-lib:3.3.1") + implementation("org.eclipse.keyple:keyple-distributed-network-java-lib:2.5.1") + implementation("org.eclipse.keyple:keyple-distributed-local-java-lib:2.5.1") + implementation("org.eclipse.keyple:keyple-card-calypso-java-lib:3.1.3") implementation("org.eclipse.keyple:keyple-plugin-android-nfc-java-lib:2.2.0") implementation("org.eclipse.keyple:keyple-plugin-android-omapi-java-lib:2.1.0") // End Keyple configuration diff --git a/client/android/gradle.properties b/client/android/gradle.properties index 1ab6586..ca0fbb5 100644 --- a/client/android/gradle.properties +++ b/client/android/gradle.properties @@ -1,4 +1,4 @@ -version = YYYY.MM.DD +version = 2024.09.20 archivesBaseName = keyple-demo-remote-client-android # Project-wide Gradle settings. diff --git a/client/dotnet/domain/api/MainServiceApiAdapter.cs b/client/dotnet/domain/api/MainServiceApiAdapter.cs index de72673..b29b4f6 100644 --- a/client/dotnet/domain/api/MainServiceApiAdapter.cs +++ b/client/dotnet/domain/api/MainServiceApiAdapter.cs @@ -103,7 +103,8 @@ private string ExecuteRemoteService(string serviceId, InputData inputData) ExecuteRemoteServiceBody bodyContent = new ExecuteRemoteServiceBody { ServiceId = serviceId, - InputData = inputData + InputData = inputData, + IsReaderContactless = true }; // Create and fill RemoteServiceDto object diff --git a/client/dotnet/domain/data/ApiInfo.cs b/client/dotnet/domain/data/ApiInfo.cs index a22e15b..70ee920 100644 --- a/client/dotnet/domain/data/ApiInfo.cs +++ b/client/dotnet/domain/data/ApiInfo.cs @@ -18,7 +18,7 @@ namespace App.domain.data { internal class ApiInfo { - public const int API_LEVEL = 2; + public const int API_LEVEL = 3; public const int CORE_API_LEVEL = 2; } } diff --git a/client/dotnet/domain/data/command/CardRequest.cs b/client/dotnet/domain/data/command/CardRequest.cs index 5f76fd3..79512f2 100644 --- a/client/dotnet/domain/data/command/CardRequest.cs +++ b/client/dotnet/domain/data/command/CardRequest.cs @@ -26,7 +26,7 @@ public class CardRequest /// /// A value indicating whether status codes verification is enabled. /// - [JsonProperty("isStatusCodesVerificationEnabled")] - public bool IsStatusCodesVerificationEnabled { get; set; } + [JsonProperty("stopOnUnsuccessfulStatusWord")] + public bool stopOnUnsuccessfulStatusWord { get; set; } } } diff --git a/client/dotnet/domain/data/command/CardSelector.cs b/client/dotnet/domain/data/command/CardSelector.cs index bdbe091..fcd0aac 100644 --- a/client/dotnet/domain/data/command/CardSelector.cs +++ b/client/dotnet/domain/data/command/CardSelector.cs @@ -21,8 +21,8 @@ public class CardSelector /// /// Card protocol. /// - [JsonProperty("cardProtocol")] - public string? CardProtocol { get; set; } + [JsonProperty("logicalProtocolName")] + public string? LogicalProtocolName { get; set; } /// /// Power On Data regular expression filter. diff --git a/client/dotnet/domain/data/command/TransmitCardRequestCmdBody.cs b/client/dotnet/domain/data/command/TransmitCardRequestCmdBody.cs index a0bc677..52d5ce0 100644 --- a/client/dotnet/domain/data/command/TransmitCardRequestCmdBody.cs +++ b/client/dotnet/domain/data/command/TransmitCardRequestCmdBody.cs @@ -21,13 +21,13 @@ public class TransmitCardRequestCmdBody /// Core API level. /// [JsonProperty("coreApiLevel")] - public required int CoreApiLevel { get; set; } + public int CoreApiLevel = ApiInfo.CORE_API_LEVEL; /// /// Service name. /// [JsonProperty("service")] - public required string Service { get; set; } + public const string Service = "TRANSMIT_CARD_SELECTION_REQUESTS"; /// /// Parameters for transmitting a card request. diff --git a/client/dotnet/domain/data/endremoteservice/EndRemoteServiceBody.cs b/client/dotnet/domain/data/endremoteservice/EndRemoteServiceBody.cs index 95e10cd..c998b4f 100644 --- a/client/dotnet/domain/data/endremoteservice/EndRemoteServiceBody.cs +++ b/client/dotnet/domain/data/endremoteservice/EndRemoteServiceBody.cs @@ -8,6 +8,7 @@ // // SPDX-License-Identifier: EPL-2.0 +using App.domain.data; using Newtonsoft.Json; /// @@ -19,7 +20,7 @@ public class EndRemoteServiceBody /// Core API level. /// [JsonProperty("coreApiLevel")] - public required int CoreApiLevel { get; set; } + public const int CoreApiLevel = ApiInfo.CORE_API_LEVEL; /// /// Gets or sets the OutputData. diff --git a/client/dotnet/domain/data/executeremoteservice/ExecuteRemoteServiceBody.cs b/client/dotnet/domain/data/executeremoteservice/ExecuteRemoteServiceBody.cs index 87cc0af..a394ce7 100644 --- a/client/dotnet/domain/data/executeremoteservice/ExecuteRemoteServiceBody.cs +++ b/client/dotnet/domain/data/executeremoteservice/ExecuteRemoteServiceBody.cs @@ -29,6 +29,12 @@ class ExecuteRemoteServiceBody [JsonProperty("serviceId")] public required string ServiceId { get; set; } + /// + /// A value indicating whether the reader is contactless. + /// + [JsonProperty("isReaderContactless")] + public bool IsReaderContactless { get; set; } + /// /// Input data. /// diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 0c12b12..88600a7 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -49,13 +49,13 @@ dependencies { implementation("org.eclipse.keypop:keypop-calypso-crypto-legacysam-java-api:0.6.0") implementation("org.eclipse.keyple:keyple-common-java-api:2.0.1") implementation("org.eclipse.keyple:keyple-util-java-lib:2.4.0") - implementation("org.eclipse.keyple:keyple-service-java-lib:3.2.1") - implementation("org.eclipse.keyple:keyple-service-resource-java-lib:3.0.1") - implementation("org.eclipse.keyple:keyple-distributed-network-java-lib:2.3.1") - implementation("org.eclipse.keyple:keyple-distributed-remote-java-lib:2.3.1") - implementation("org.eclipse.keyple:keyple-card-calypso-java-lib:3.1.1") - implementation("org.eclipse.keyple:keyple-card-calypso-crypto-legacysam-java-lib:0.7.0") - implementation("org.eclipse.keyple:keyple-plugin-pcsc-java-lib:2.2.1") + implementation("org.eclipse.keyple:keyple-service-java-lib:3.3.1") + implementation("org.eclipse.keyple:keyple-service-resource-java-lib:3.1.0") + implementation("org.eclipse.keyple:keyple-distributed-network-java-lib:2.5.1") + implementation("org.eclipse.keyple:keyple-distributed-remote-java-lib:2.5.1") + implementation("org.eclipse.keyple:keyple-card-calypso-java-lib:3.1.3") + implementation("org.eclipse.keyple:keyple-card-calypso-crypto-legacysam-java-lib:0.8.0") + implementation("org.eclipse.keyple:keyple-plugin-pcsc-java-lib:2.2.3") // End Keyple configuration // Quarkus diff --git a/server/dashboard-app/package.json b/server/dashboard-app/package.json index 0f463f7..3fb3345 100644 --- a/server/dashboard-app/package.json +++ b/server/dashboard-app/package.json @@ -1,6 +1,6 @@ { "name": "dashboard-app", - "version": "YYYY.MM.DD", + "version": "2024.09.20", "private": true, "dependencies": { "@material-ui/core": "^4.11.3", diff --git a/server/gradle.properties b/server/gradle.properties index cfb53b0..22125c2 100644 --- a/server/gradle.properties +++ b/server/gradle.properties @@ -1,5 +1,5 @@ # don't forget to keep the version string in server/dashboard-app/src/package.json synchronized with the following -version = YYYY.MM.DD +version = 2024.09.20 title = "Keyple Reload Demo - Remote Server" archivesBaseName = keyple-demo-remote-server