diff --git a/build.gradle.kts b/build.gradle.kts index 7432092..ffa0a90 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,6 +6,7 @@ plugins { group = "com.rootsid.wal" version = "1.0.1-SNAPSHOT" +java.sourceCompatibility = JavaVersion.VERSION_11 repositories { mavenCentral() @@ -47,6 +48,12 @@ dependencies { implementation("org.didcommx:peerdid:0.3.0") implementation("org.junit.jupiter:junit-jupiter:5.8.2") + + // Align versions of all Kotlin components + implementation(platform("org.jetbrains.kotlin:kotlin-bom")) + + // Use the Kotlin JDK 8 standard library. + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") } publishing { @@ -69,6 +76,10 @@ publishing { } } +tasks.withType() { + kotlinOptions.jvmTarget = "11" +} + tasks.withType().configureEach { kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } diff --git a/src/main/kotlin/com/rootsid/wal/library/DLT.kt b/src/main/kotlin/com/rootsid/wal/library/DLT.kt index a273f65..d3b1be6 100644 --- a/src/main/kotlin/com/rootsid/wal/library/DLT.kt +++ b/src/main/kotlin/com/rootsid/wal/library/DLT.kt @@ -231,6 +231,11 @@ fun getDidDocumentJson(wallet: Wallet, didAlias: String): String { return getDidDocument(wallet, didAlias).didData.toProto().encodeToJsonString() } +@OptIn(PrismSdkInternal::class) +fun getDidDocumentJson(did: String): String { + return getDidDocument(did).didData.toProto().encodeToJsonString() +} + /** * Get did document *