Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade dependencies - part 1 #102

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Git clone repository
uses: actions/checkout@v4
# Setup java
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
Expand Down
24 changes: 12 additions & 12 deletions VCL/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
defaultConfig {
minSdk 24
targetSdk 33
versionName "2.3.4"
versionCode 134
versionName "2.4.1-rc.1"
versionCode 135
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
Expand Down Expand Up @@ -107,10 +107,11 @@ afterEvaluate {
groupId getGroupId()
artifactId getArtifactId()

// define rc version name
def vers = getVersionName()
def rcSuffix = rootProject.ext.rcSuffix
version = "${vers}-${rcSuffix}"
// // define rc version name
// def vers = getVersionName()
// def rcSuffix = rootProject.ext.rcSuffix
// version = "${vers}-${rcSuffix}"
version getVersionName()

// Two artifacts, the `aar` (or `jar`) and the sources
if (project.plugins.findPlugin("com.android.library")) {
Expand Down Expand Up @@ -217,7 +218,7 @@ repositories {
dependencies {
implementation 'androidx.core:core-ktx:1.9.0'

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

Expand All @@ -228,13 +229,12 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
// Optional -- Robolectric environment
testImplementation 'androidx.test:core:1.5.0'
testImplementation 'org.robolectric:robolectric:4.10'
testImplementation 'org.robolectric:robolectric:4.11.1'
// Optional -- Mockito framework
def mockito_version = "4.0.0"
testImplementation "org.mockito:mockito-core:$mockito_version"
testImplementation "org.mockito:mockito-inline:$mockito_version"
testImplementation "org.mockito:mockito-core:5.11.0"
testImplementation "org.mockito:mockito-inline:5.2.0"
// Required -- JSON framework
testImplementation 'org.json:json:20201115'
testImplementation 'org.json:json:20240303'
// jsonassert
testImplementation 'org.skyscreamer:jsonassert:1.5.1'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ data class VCLCredentialManifest(
)?.toString() ?: ""

private fun retrieveAud() =
((jwt.payload?.toJSONObject()?.getOrDefault(CodingKeys.KeyMetadata, HashMap<String, Any>()) as? Map<String, Any> )?.getOrDefault(CodingKeys.KeyFinalizeOffersUri, "") as? String ?: "").substringBefore("/issue/")
((jwt.payload?.toJSONObject()
?.getOrDefault(CodingKeys.KeyMetadata, HashMap<String, Any>()) as? Map<*, *> )
?.getOrDefault(CodingKeys.KeyFinalizeOffersUri, "") as? String ?: "")
.substringBefore("/issue/")
companion object CodingKeys {
const val KeyIssuingRequest = "issuing_request"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ class VCLJwt {

val kid: String?
get() = header?.keyID
?: ((header?.toJSONObject()?.getOrDefault(
CodingKeys.KeyJwk,
null
)) as? Map<String, String>)?.getOrDefault(CodingKeys.KeyKid, null)
?: ((header?.toJSONObject()
?.getOrDefault(CodingKeys.KeyJwk, null)) as? Map<*, *>)
?.getOrDefault(CodingKeys.KeyKid, null) as? String
val iss: String?
get() = this.payload?.toJSONObject()?.getOrDefault(CodingKeys.KeyIss, null) as? String
val aud: String?
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
// Must: be added:
implementation "com.nimbusds:nimbus-jose-jwt:9.37"
implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3'
implementation project(':VCL')

// implementation "io.velocitycareerlabs:vcl:x.y.z"

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
}