Skip to content

Commit

Permalink
build: update dependencies (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-cristea committed Feb 24, 2023
1 parent 9af005d commit 6aba44d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 31 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [2023.02.24]
### Upgraded
- `calypsonet-terminal-reader-java-api:1.2.0`
- `calypsonet-terminal-calypso-java-api:1.6.0`
- `keyple-service-java-lib:2.1.3`
- `keyple-card-calypso-java-lib:2.3.2`
- `com.google.code.gson:gson:2.10.1`

## [2022.11.18]
### Fixed
- Various erroneous behaviors and displays.
Expand All @@ -27,6 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- `keyple-plugin-cna-bluebird-specific-nfc-java-lib-2.1.1-mock` (mocked library)
- `keyple-plugin-cna-flowbird-android-java-lib-2.0.2-mock` (mocked library)
- `keyple-util-java-lib:2.3.0`

[Unreleased]: https://github.com/calypsonet/keyple-android-demo-control/compare/2022.11.18...HEAD

[Unreleased]: https://github.com/calypsonet/keyple-android-demo-control/compare/2023.02.24...HEAD
[2023.02.24]: https://github.com/calypsonet/keyple-android-demo-control/compare/2022.11.18...2023.02.24
[2022.11.18]: https://github.com/calypsonet/keyple-android-demo-control/compare/v2021.11...2022.11.18
10 changes: 5 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar"))))

// Keyple core
implementation("org.calypsonet.terminal:calypsonet-terminal-reader-java-api:1.1.0")
implementation("org.calypsonet.terminal:calypsonet-terminal-calypso-java-api:1.4.1")
implementation("org.calypsonet.terminal:calypsonet-terminal-reader-java-api:1.2.0")
implementation("org.calypsonet.terminal:calypsonet-terminal-calypso-java-api:1.6.0")
implementation("org.eclipse.keyple:keyple-common-java-api:2.0.0")
implementation("org.eclipse.keyple:keyple-util-java-lib:2.3.0")
implementation("org.eclipse.keyple:keyple-service-java-lib:2.1.1")
implementation("org.eclipse.keyple:keyple-card-calypso-java-lib:2.2.5")
implementation("org.eclipse.keyple:keyple-service-java-lib:2.1.3")
implementation("org.eclipse.keyple:keyple-card-calypso-java-lib:2.3.2")

// Keyple reader plugins
implementation("org.eclipse.keyple:keyple-plugin-android-nfc-java-lib:2.0.1")
Expand Down Expand Up @@ -141,7 +141,7 @@ dependencies {
implementation("io.reactivex.rxjava2:rxandroid:2.0.2")

// Google GSON
implementation("com.google.code.gson:gson:2.8.9")
implementation("com.google.code.gson:gson:2.10.1")

// Devnied - Byte Utils
implementation("com.github.devnied:bit-lib4j:1.4.5") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,17 @@ class CardRepository {
calypsoExtensionService.createCardTransactionWithoutSecurity(cardReader, calypsoCard)
}

// Step 2 - Read and unpack environment structure from the binary present in the environment
// record.
cardTransaction.prepareReadRecord(CardConstant.SFI_ENVIRONMENT_AND_HOLDER, 1)

if (isSecureSessionMode) {
// Open a transaction to read/write the Calypso Card and read the Environment file
cardTransaction.processOpening(WriteAccessLevel.DEBIT)
} else {
// Just read the Environment file
cardTransaction.processCommands()
cardTransaction.prepareOpenSecureSession(WriteAccessLevel.DEBIT)
}

// Step 2 - Read and unpack environment structure from the binary present in the environment
// record.
cardTransaction
.prepareReadRecord(CardConstant.SFI_ENVIRONMENT_AND_HOLDER, 1)
.processCommands(false)

val efEnvironmentHolder = calypsoCard.getFileBySfi(CardConstant.SFI_ENVIRONMENT_AND_HOLDER)
val env = EnvironmentHolderStructureParser().parse(efEnvironmentHolder.data.content)

Expand All @@ -89,7 +88,7 @@ class CardRepository {
// <Abort Secure Session if any>
if (env.envVersionNumber != VersionNumber.CURRENT_VERSION) {
if (isSecureSessionMode) {
cardTransaction.processCancel()
cardTransaction.prepareCancelSecureSession().processCommands(true)
}
throw EnvironmentException("wrong version number")
}
Expand All @@ -98,14 +97,13 @@ class CardRepository {
// <Abort Secure Session if any>
if (env.envEndDate.getDate().isBefore(controlDateTime.toLocalDate())) {
if (isSecureSessionMode) {
cardTransaction.processCancel()
cardTransaction.prepareCancelSecureSession().processCommands(true)
}
throw EnvironmentException("End date expired")
}

// Step 5 - Read and unpack the last event record.
cardTransaction.prepareReadRecord(CardConstant.SFI_EVENTS_LOG, 1)
cardTransaction.processCommands()
cardTransaction.prepareReadRecord(CardConstant.SFI_EVENTS_LOG, 1).processCommands(false)

val efEventLog = calypsoCard.getFileBySfi(CardConstant.SFI_EVENTS_LOG)
val event = EventStructureParser().parse(efEventLog.data.content)
Expand All @@ -116,7 +114,7 @@ class CardRepository {
val eventVersionNumber = event.eventVersionNumber
if (eventVersionNumber != VersionNumber.CURRENT_VERSION) {
if (isSecureSessionMode) {
cardTransaction.processCancel()
cardTransaction.prepareCancelSecureSession().processCommands(true)
}
if (eventVersionNumber == VersionNumber.UNDEFINED) {
throw EventCleanCardException()
Expand Down Expand Up @@ -157,10 +155,14 @@ class CardRepository {
}

// Step 10 - CNT_READ: Read all contracts and the counter file
cardTransaction.prepareReadRecords(
CardConstant.SFI_CONTRACTS, 1, nbContractRecords, CardConstant.CONTRACT_RECORD_SIZE_BYTES)
cardTransaction.prepareReadCounter(CardConstant.SFI_COUNTERS, nbContractRecords)
cardTransaction.processCommands()
cardTransaction
.prepareReadRecords(
CardConstant.SFI_CONTRACTS,
1,
nbContractRecords,
CardConstant.CONTRACT_RECORD_SIZE_BYTES)
.prepareReadCounter(CardConstant.SFI_COUNTERS, nbContractRecords)
.processCommands(false)

val efCounters = calypsoCard.getFileBySfi(CardConstant.SFI_COUNTERS)

Expand Down Expand Up @@ -227,7 +229,7 @@ class CardRepository {
}

var validationDateTime: LocalDateTime? = null
if (contractValidated && contractUsed == record) {
if (contractValidated) {
validationDateTime = event.eventDatetime
}

Expand Down Expand Up @@ -257,11 +259,7 @@ class CardRepository {

// Step 20 - If isSecureSessionMode is true, Close the session
if (isSecureSessionMode) {
if (status == Status.TICKETS_FOUND) {
cardTransaction.processClosing()
} else {
cardTransaction.processCancel()
}
cardTransaction.prepareCloseSecureSession().processCommands(true)
}

var validationList: ArrayList<Validation>? = null
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 2022.11.18
version = 2023.02.24
archivesBaseName = keyple-android-demo-control

# Project-wide Gradle settings.
Expand Down

0 comments on commit 6aba44d

Please sign in to comment.