Skip to content

Commit

Permalink
Merge pull request #121 from velocitycareerlabs/VL-7982-align-apis
Browse files Browse the repository at this point in the history
v2.5.0 API alignment
  • Loading branch information
michaelavoyan authored Jul 25, 2024
2 parents 4c494c0 + 43c47ec commit 592b191
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 29 deletions.
16 changes: 8 additions & 8 deletions VCL/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ plugins {
}

android {
compileSdk 34
compileSdk 35
namespace 'io.velocitycareerlabs'

defaultConfig {
minSdk 24
targetSdk 34
versionName "2.4.6"
targetSdk 35
versionName "2.5.0"
versionCode 142
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -217,9 +217,9 @@ repositories {
*/

dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.core:core-ktx:1.13.1'

implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3'
implementation 'com.nimbusds:nimbus-jose-jwt:9.40'
//noinspection GradleDependency
implementation "androidx.security:security-crypto:1.0.0"

Expand All @@ -229,7 +229,7 @@ dependencies {
// Required -- JUnit 4 framework
testImplementation 'junit:junit:4.13.2'
// Optional -- Robolectric environment
testImplementation 'androidx.test:core:1.5.0'
testImplementation 'androidx.test:core:1.6.1'
testImplementation 'org.robolectric:robolectric:4.12'
// Optional -- Mockito framework
testImplementation "org.mockito:mockito-core:5.11.0"
Expand All @@ -239,6 +239,6 @@ dependencies {
// json assert
testImplementation 'org.skyscreamer:jsonassert:1.5.1'

androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.json.JSONObject

data class VCLFinalizeOffersDescriptor(
val credentialManifest: VCLCredentialManifest,
val offers: VCLOffers,
val challenge: String? = null,
val approvedOfferIds: List<String>,
val rejectedOfferIds: List<String>
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal class FinalizeOffersUseCaseImpl(
completionBlock: (VCLResult<VCLJwtVerifiableCredentials>) -> Unit
) {
executor.runOnBackground {
finalizeOffersDescriptor.offers.challenge?.let { challenge ->
finalizeOffersDescriptor.challenge?.let { challenge ->
this.jwtServiceRepository.generateSignedJwt(
jwtDescriptor = VCLJwtDescriptor(
iss = finalizeOffersDescriptor.didJwk.did,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class VCLFinalizeOffersDescriptorTest {

subject = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifest,
offers = offers,
challenge = offers.challenge,
approvedOfferIds = approvedOfferIds,
rejectedOfferIds = rejectedOfferIds
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ internal class FinalizeOffersUseCaseTest {

finalizeOffersDescriptorFailed = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifestFailed,
offers = offers,
challenge = offers.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
finalizeOffersDescriptorPassed = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifestPassed,
offers = offers,
challenge = offers.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ internal class CredentialDidVerifierTest {
)
finalizeOffersDescriptorOfNotaryIssuer = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifestFromNotaryIssuer,
offers = OffersMock,
challenge = OffersMock.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
Expand All @@ -64,7 +64,7 @@ internal class CredentialDidVerifierTest {
)
finalizeOffersDescriptorOfRegularIssuer = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifestFromRegularIssuer,
offers = OffersMock,
challenge = OffersMock.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ internal class CredentialIssuerVerifierTest {
)
finalizeOffersDescriptorWithoutPermittedServices = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifestWithoutPermittedServices,
offers = OffersMock,
challenge = OffersMock.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
Expand All @@ -90,7 +90,7 @@ internal class CredentialIssuerVerifierTest {
)
finalizeOffersDescriptorOfNotaryIssuer = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifestFromNotaryIssuer,
offers = OffersMock,
challenge = OffersMock.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
Expand All @@ -102,7 +102,7 @@ internal class CredentialIssuerVerifierTest {
)
finalizeOffersDescriptorOfRegularIssuer = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifestFromRegularIssuer,
offers = OffersMock,
challenge = OffersMock.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
Expand All @@ -114,7 +114,7 @@ internal class CredentialIssuerVerifierTest {
)
finalizeOffersDescriptorOfIdentityIssuer = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifestFromIdentityIssuer,
offers = OffersMock,
challenge = OffersMock.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
Expand All @@ -131,7 +131,7 @@ internal class CredentialIssuerVerifierTest {
)
finalizeOffersDescriptorOfMicrosoftQa = VCLFinalizeOffersDescriptor(
credentialManifest = CredentialManifestForValidCredentialMicrsoftQa,
offers = OffersMock,
challenge = OffersMock.challenge,
approvedOfferIds = listOf(),
rejectedOfferIds = listOf()
)
Expand Down
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ plugins {
}

android {
compileSdk 34
compileSdk 35
// buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.vcl.wallet"
minSdk 24
targetSdk 34
targetSdk 35

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -43,15 +43,15 @@ android {
}

dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
// Must: be added:
implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3'
implementation 'com.nimbusds:nimbus-jose-jwt:9.40'
implementation project(':VCL')

// implementation "io.velocitycareerlabs:vcl:x.y.z"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/vcl/wallet/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class MainActivity : AppCompatActivity() {
val approvedRejectedOfferIds = Utils.getApprovedRejectedOfferIdsMock(offers)
val finalizeOffersDescriptor = VCLFinalizeOffersDescriptor(
credentialManifest = credentialManifest,
offers = offers,
challenge = offers.challenge,
approvedOfferIds = approvedRejectedOfferIds.first,
rejectedOfferIds = approvedRejectedOfferIds.second
)
Expand Down

0 comments on commit 592b191

Please sign in to comment.