Skip to content
Open
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
11 changes: 6 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
target_jvmTarget=17
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand All @@ -24,22 +25,22 @@ compile_sdk_version=34
min_sdk_version=27
target_sdk_version=34

dagger_version=2.44
dagger_version=2.53.1
androidx_room_persistence_version=2.4.3
androidx_preference_version=1.1.1
retrofit2_version=2.9.0
com_squareup_okhttp3_okhttp_version=4.9.3
lifecycle_ktx_version=2.6.1
nimbus_jose_jwt_version=9.4.2
kotlin_serialization_version=1.4.0
kotlin_version=1.8.20
kotlin_version=2.0.21
collections_ktx_version=1.1.0
androidx_core_version=1.10.1
androidx_test_runner_version=1.4.0
androidx_test_junit_version=1.1.3
assertj_test_version=3.11.1
mockk_version=1.12.2
junit_version=4.13.2
com_android_tools_build_gradle_version=7.3.1
mockk_version=1.13.13
junit_version=4.14.1
com_android_tools_build_gradle_version=8.3.0
correlation_vector_version=1.0
picasso_version=2.71828
29 changes: 16 additions & 13 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
id("com.google.devtools.ksp")
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'jacoco'

jacoco {
Expand All @@ -16,6 +16,7 @@ repositories {
}

android {
namespace 'com.microsoft.did.sdk'
compileSdkVersion compile_sdk_version as Integer

defaultConfig {
Expand All @@ -25,11 +26,9 @@ android {
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
}
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
}
}
buildTypes {
Expand All @@ -46,8 +45,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility target_jvmTarget
targetCompatibility target_jvmTarget
}

testOptions {
Expand All @@ -57,10 +56,14 @@ android {
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = target_jvmTarget
freeCompilerArgs += "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"
}

lint {
disable 'MissingClass'
}

lintOptions {
abortOnError false
warningsAsErrors false
Expand All @@ -83,15 +86,15 @@ android {

dependencies {
implementation "com.google.dagger:dagger:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
ksp "com.google.dagger:dagger-compiler:$dagger_version"

implementation "com.squareup.retrofit2:retrofit:$retrofit2_version"
implementation "com.squareup.retrofit2:converter-scalars:$retrofit2_version"
implementation "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0"

implementation "androidx.room:room-runtime:$androidx_room_persistence_version"
implementation "androidx.room:room-ktx:$androidx_room_persistence_version"
kapt "androidx.room:room-compiler:$androidx_room_persistence_version"
ksp "androidx.room:room-compiler:$androidx_room_persistence_version"
testImplementation "androidx.room:room-testing:$androidx_room_persistence_version"

implementation "com.squareup.okhttp3:okhttp:$com_squareup_okhttp3_okhttp_version"
Expand Down Expand Up @@ -141,8 +144,8 @@ dependencies {
*/
task jacocoCoverageReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) {
reports {
xml.enabled = true
html.enabled = true
xml.required = true
html.required = true
}

final def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*',
Expand Down
13 changes: 0 additions & 13 deletions sdk/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microsoft.did.sdk"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -8,17 +7,5 @@
<application
android:allowBackup="true"
android:supportsRtl="true">
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
tools:replace="android:exported"
android:exported="false"/>
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
tools:replace="android:exported"
android:exported="false"/>
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
tools:replace="android:exported"
android:exported="false"/>
</application>
</manifest>
2 changes: 1 addition & 1 deletion sdk/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="com.microsoft.did.sdk" />
<manifest />
75 changes: 0 additions & 75 deletions sdk/src/main/java/com/microsoft/did/sdk/BackupService.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.microsoft.correlationvector.CorrelationVectorVersion
import com.microsoft.did.sdk.util.Constants
import javax.inject.Inject
import javax.inject.Singleton
import androidx.core.content.edit

@Singleton
class CorrelationVectorService @Inject constructor(private val sharedPreferences: SharedPreferences) {
Expand All @@ -37,7 +38,8 @@ class CorrelationVectorService @Inject constructor(private val sharedPreferences

private fun saveCorrelationVector(sharedPreferences: SharedPreferences, correlationId: String) {
if (correlationId.isNotEmpty())
sharedPreferences.edit()
.putString(Constants.CORRELATION_VECTOR_IN_PREF, correlationId).apply()
sharedPreferences.edit {
putString(Constants.CORRELATION_VECTOR_IN_PREF, correlationId)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.microsoft.did.sdk.util.logTime
import kotlinx.serialization.json.Json
import javax.inject.Inject
import javax.inject.Singleton
import androidx.core.net.toUri

@Singleton
class PresentationService @Inject constructor(
Expand Down Expand Up @@ -59,7 +60,7 @@ class PresentationService @Inject constructor(
}

private fun verifyUri(uri: String): Uri {
val url = Uri.parse(uri)
val url = uri.toUri()
if (!DidDeepLinkUtil.isDidDeepLink(url)) {
throw PresentationException("Request Protocol not supported.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,9 @@ object VerifiableCredentialSdk {
@JvmStatic
lateinit var correlationVectorService: CorrelationVectorService

@JvmStatic
lateinit var backupService: BackupService

@JvmStatic
lateinit var identifierService: IdentifierService


/**
* Initializes VerifiableCredentialSdk
*
Expand Down Expand Up @@ -82,7 +78,6 @@ object VerifiableCredentialSdk {
revocationService = sdkComponent.revocationService()
correlationVectorService = sdkComponent.correlationVectorService()
identifierService = sdkComponent.identifierManager()
backupService = sdkComponent.backupAndRestoreService()

correlationVectorService.startNewFlowAndSave()

Expand Down
30 changes: 0 additions & 30 deletions sdk/src/main/java/com/microsoft/did/sdk/backup/BackupParser.kt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading