Skip to content

Commit

Permalink
build: update version
Browse files Browse the repository at this point in the history
- update kotlin
- code enhancements
  • Loading branch information
hamada147 committed Oct 4, 2023
1 parent 03a97f3 commit 2544187
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 58 deletions.
26 changes: 2 additions & 24 deletions didcomm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ kotlin {
this.moduleName = currentModuleName
this.binaries.library()
this.useCommonJs()
generateTypeScriptDefinitions()
this.compilations["main"].packageJson {
this.version = rootProject.version.toString()
}
Expand All @@ -53,25 +54,14 @@ kotlin {
this.output.library = currentModuleName
this.output.libraryTarget = Target.VAR
}
this.commonWebpackConfig {
this.cssSupport {
this.enabled = true
}
}
this.testTask {
if (os.isWindows) {
this.enabled = false
}
this.useKarma {
this.useChromeHeadless()
}
}
}
nodejs {
this.testTask {
if (os.isWindows) {
this.enabled = false
}
this.useKarma {
this.useChromeHeadless()
}
Expand Down Expand Up @@ -192,23 +182,11 @@ android {
tasks.withType<DokkaTask> {
moduleName.set(project.name)
moduleVersion.set(rootProject.version.toString())
description = """
This is a Kotlin Multiplatform Library for Mercury
""".trimIndent()
description = "This is a Kotlin Multiplatform Library for Mercury"
dokkaSourceSets {
// TODO: Figure out how to include files to the documentations
named("commonMain") {
includes.from("Module.md", "docs/Module.md")
}
}
}

// afterEvaluate {
// tasks.withType<AbstractTestTask> {
// testLogging {
// events("passed", "skipped", "failed", "standard_out", "standard_error")
// showExceptions = true
// showStackTraces = true
// }
// }
// }
2 changes: 1 addition & 1 deletion didcomm/didcomm.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'didcomm'
spec.version = '1.0.3-alpha'
spec.version = '1.0.4-alpha'
spec.homepage = ''
spec.source = { :http=> ''}
spec.authors = 'IOG'
Expand Down
34 changes: 6 additions & 28 deletions didpeer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ kotlin {
this.moduleName = currentModuleName
this.binaries.library()
this.useCommonJs()
generateTypeScriptDefinitions()
this.compilations["main"].packageJson {
this.version = rootProject.version.toString()
}
Expand All @@ -54,25 +55,14 @@ kotlin {
this.output.library = currentModuleName
this.output.libraryTarget = Target.VAR
}
this.commonWebpackConfig {
this.cssSupport {
this.enabled = true
}
}
this.testTask {
if (os.isWindows) {
this.enabled = false
}
this.useKarma {
this.useChromeHeadless()
}
}
}
nodejs {
this.testTask {
if (os.isWindows) {
this.enabled = false
}
this.useKarma {
this.useChromeHeadless()
}
Expand All @@ -98,10 +88,10 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("io.iohk.atala.prism.apollo:multibase:1.7.0-alpha")
implementation("io.iohk.atala.prism.apollo:varint:1.7.0-alpha")
implementation("io.iohk.atala.prism.apollo:base64:1.7.0-alpha")
implementation("io.iohk.atala.prism.apollo:base58:1.7.0-alpha")
implementation("io.iohk.atala.prism.apollo:multibase:1.0.2")
implementation("io.iohk.atala.prism.apollo:varint:1.0.2")
implementation("io.iohk.atala.prism.apollo:base64:1.0.2")
implementation("io.iohk.atala.prism.apollo:base58:1.0.2")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1")
implementation("com.squareup.okio:okio:3.2.0")
}
Expand Down Expand Up @@ -197,23 +187,11 @@ android {
tasks.withType<DokkaTask> {
moduleName.set(project.name)
moduleVersion.set(rootProject.version.toString())
description = """
This is a Kotlin Multiplatform Library for Mercury DIDPeer
""".trimIndent()
description = "This is a Kotlin Multiplatform Library for Mercury DIDPeer"
dokkaSourceSets {
// TODO: Figure out how to include files to the documentations
named("commonMain") {
includes.from("Module.md", "docs/Module.md")
}
}
}

// afterEvaluate {
// tasks.withType<AbstractTestTask> {
// testLogging {
// events("passed", "skipped", "failed", "standard_out", "standard_error")
// showExceptions = true
// showStackTraces = true
// }
// }
// }
2 changes: 1 addition & 1 deletion didpeer/didpeer.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'didpeer'
spec.version = '1.0.3-alpha'
spec.version = '1.0.4-alpha'
spec.homepage = ''
spec.source = { :http=> ''}
spec.authors = 'IOG'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import io.iohk.atala.prism.didcomm.didpeer.core.toJsonElement
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.jsonObject
import kotlin.jvm.JvmOverloads

const val SERVICE_ID = "id"
const val SERVICE_TYPE = "type"
Expand All @@ -14,7 +15,7 @@ const val SERVICE_ROUTING_KEYS = "routingKeys"
const val SERVICE_ACCEPT = "accept"

@Serializable
data class DIDDocPeerDID(
data class DIDDocPeerDID @JvmOverloads constructor(
val did: String,
val authentication: List<VerificationMethodPeerDID>,
val keyAgreement: List<VerificationMethodPeerDID> = emptyList(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
package io.iohk.atala.prism.didcomm.didpeer

import kotlin.jvm.JvmOverloads

/**
* The base class for all PeerDID errors and exceptions.
*
* @param message - the detail message.
* @param cause - the cause of this.
*/
open class PeerDIDException(message: String, cause: Throwable? = null) : Throwable(message, cause)
open class PeerDIDException @JvmOverloads constructor(message: String, cause: Throwable? = null) : Throwable(message, cause)

/**
* Raised if the peer DID to be resolved in not a valid peer DID.
*
* @param message - the detail message.
* @param cause - the cause of this.
*/
class MalformedPeerDIDException(message: String, cause: Throwable? = null) :
class MalformedPeerDIDException @JvmOverloads constructor(message: String, cause: Throwable? = null) :
PeerDIDException("Invalid peer DID provided. $message", cause)

/**
* Raised if the resolved peer DID Doc to be resolved in not a valid peer DID.
*
* @param cause - the cause of this.
*/
class MalformedPeerDIDDOcException(cause: Throwable? = null) :
class MalformedPeerDIDDOcException @JvmOverloads constructor(cause: Throwable? = null) :
PeerDIDException("Invalid peer DID Doc", cause)
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import io.iohk.atala.prism.didcomm.didpeer.core.getVerificationMethod
import io.iohk.atala.prism.didcomm.didpeer.core.validateAgreementMaterialType
import io.iohk.atala.prism.didcomm.didpeer.core.validateAuthenticationMaterialType
import kotlin.jvm.JvmName
import kotlin.jvm.JvmOverloads

/** Resolves [DIDDocPeerDID] from [PeerDID]
* @param [peerDID] PeerDID to resolve
Expand All @@ -18,6 +19,7 @@ import kotlin.jvm.JvmName
* - if a valid DIDDoc cannot be produced from the [peerDID]
* @return resolved [DIDDocPeerDID] as JSON string
*/
@JvmOverloads
fun resolvePeerDID(
peerDID: PeerDID,
format: VerificationMaterialFormatPeerDID = VerificationMaterialFormatPeerDID.MULTIBASE
Expand Down

0 comments on commit 2544187

Please sign in to comment.