Skip to content

Commit

Permalink
feat: upgrade dependencies and API compliance in C# client
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanpierrefortune committed Sep 20, 2024
1 parent 9cfffe1 commit 3f21120
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 24 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions client/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion client/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = YYYY.MM.DD
version = 2024.09.20
archivesBaseName = keyple-demo-remote-client-android

# Project-wide Gradle settings.
Expand Down
3 changes: 2 additions & 1 deletion client/dotnet/domain/api/MainServiceApiAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion client/dotnet/domain/data/ApiInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
4 changes: 2 additions & 2 deletions client/dotnet/domain/data/command/CardRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class CardRequest
/// <summary>
/// A value indicating whether status codes verification is enabled.
/// </summary>
[JsonProperty("isStatusCodesVerificationEnabled")]
public bool IsStatusCodesVerificationEnabled { get; set; }
[JsonProperty("stopOnUnsuccessfulStatusWord")]
public bool stopOnUnsuccessfulStatusWord { get; set; }
}
}
4 changes: 2 additions & 2 deletions client/dotnet/domain/data/command/CardSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class CardSelector
/// <summary>
/// Card protocol.
/// </summary>
[JsonProperty("cardProtocol")]
public string? CardProtocol { get; set; }
[JsonProperty("logicalProtocolName")]
public string? LogicalProtocolName { get; set; }

/// <summary>
/// Power On Data regular expression filter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public class TransmitCardRequestCmdBody
/// Core API level.
/// </summary>
[JsonProperty("coreApiLevel")]
public required int CoreApiLevel { get; set; }
public int CoreApiLevel = ApiInfo.CORE_API_LEVEL;

/// <summary>
/// Service name.
/// </summary>
[JsonProperty("service")]
public required string Service { get; set; }
public const string Service = "TRANSMIT_CARD_SELECTION_REQUESTS";

/// <summary>
/// Parameters for transmitting a card request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//
// SPDX-License-Identifier: EPL-2.0

using App.domain.data;
using Newtonsoft.Json;

/// <summary>
Expand All @@ -19,7 +20,7 @@ public class EndRemoteServiceBody
/// Core API level.
/// </summary>
[JsonProperty("coreApiLevel")]
public required int CoreApiLevel { get; set; }
public const int CoreApiLevel = ApiInfo.CORE_API_LEVEL;

/// <summary>
/// Gets or sets the OutputData.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ class ExecuteRemoteServiceBody
[JsonProperty("serviceId")]
public required string ServiceId { get; set; }

/// <summary>
/// A value indicating whether the reader is contactless.
/// </summary>
[JsonProperty("isReaderContactless")]
public bool IsReaderContactless { get; set; }

/// <summary>
/// Input data.
/// </summary>
Expand Down
14 changes: 7 additions & 7 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/dashboard-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashboard-app",
"version": "YYYY.MM.DD",
"version": "2024.09.20",
"private": true,
"dependencies": {
"@material-ui/core": "^4.11.3",
Expand Down
2 changes: 1 addition & 1 deletion server/gradle.properties
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 3f21120

Please sign in to comment.