diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index bd3cb47..0fb0210 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -1,9 +1,8 @@ --- # kics-scan ignore -name: "Pull request linter" +name: "Pull Request - Validate PR title" -on: - pull_request: +on: [pull_request] jobs: lint_pr: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 400fd60..fcc383c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,13 +1,12 @@ --- # kics-scan ignore -name: "Linter" +name: "Pull Request - Mega Linter" defaults: run: shell: bash -on: - pull_request: +on: [pull_request] jobs: lint: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3a77e28..ac39a68 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,5 +1,6 @@ --- -name: Build and Test +# kics-scan ignore +name: "Pull Request - Build & Test" defaults: run: @@ -15,11 +16,7 @@ env: ATALA_GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }} ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} -on: - push: - branches: - - "main" - pull_request: +on: [pull_request] jobs: @@ -54,13 +51,12 @@ jobs: - name: Gradle Build run: | - ./gradlew build test + ./gradlew allTests - # Container action is only supported on Linux -# - name: Publish test results -# if: always() -# uses: EnricoMi/publish-unit-test-result-action@v2 -# with: -# files: "${{ github.workspace }}/atala-prism-sdk/build/test-results/testReleaseUnitTest/TEST-*.xml" -# comment_title: "Unit Test Results" -# check_name: "Unit Test Results" + - name: Publish test results + if: always() + uses: EnricoMi/publish-unit-test-result-action/composite@v2 + with: + files: "${{ github.workspace }}/atala-prism-sdk/build/test-results/testReleaseUnitTest/TEST-*.xml" + comment_title: "Unit Test Results" + check_name: "Unit Test Results" diff --git a/didcomm/LICENSE b/didcomm/LICENSE deleted file mode 100644 index f49a4e1..0000000 --- a/didcomm/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/didcomm/README.md b/didcomm/README.md deleted file mode 100644 index 1ec54cb..0000000 --- a/didcomm/README.md +++ /dev/null @@ -1,216 +0,0 @@ -# DIDCommV2 - -[![Kotlin](https://img.shields.io/badge/kotlin-1.8.20-blue.svg?logo=kotlin)](http://kotlinlang.org) - -![android](https://camo.githubusercontent.com/b1d9ad56ab51c4ad1417e9a5ad2a8fe63bcc4755e584ec7defef83755c23f923/687474703a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d616e64726f69642d3645444238442e7376673f7374796c653d666c6174) -![ios](https://camo.githubusercontent.com/1fec6f0d044c5e1d73656bfceed9a78fd4121b17e82a2705d2a47f6fd1f0e3e5/687474703a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d696f732d4344434443442e7376673f7374796c653d666c6174) -![jvm](https://camo.githubusercontent.com/700f5dcd442fd835875568c038ae5cd53518c80ae5a0cf12c7c5cf4743b5225b/687474703a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d6a766d2d4442343133442e7376673f7374796c653d666c6174) -![js](https://camo.githubusercontent.com/3e0a143e39915184b54b60a2ecedec75e801f396d34b5b366c94ec3604f7e6bd/687474703a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d6a732d4638444235442e7376673f7374796c653d666c6174) -![getNode-js](https://camo.githubusercontent.com/d08fda729ceebcae0f23c83499ca8f06105350f037661ac9a4cc7f58edfdbca9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d6e6f64656a732d3638613036332e7376673f7374796c653d666c6174) - -![Atala Prism Logo](../Logo.png) - -Basic [DIDComm v2](https://identity.foundation/didcomm-messaging/spec) support in Kotlin Multiplatform. - -This implementation is a re-implementation of this repo but for Kotlin Multiplatform - -- [didcomm-jvm](https://github.com/sicpa-dlab/didcomm-jvm) - -## Assumptions and Limitations -- Java 8+ -- In order to use the library, `SecretResolver` and `DIDDocResolver` interfaces must be implemented on the application level. - Implementation of that interfaces is out of DIDComm library scope. - - Verification materials are expected in JWK, Base58 and Multibase formats. - - In Base58 and Multibase formats, keys using only X25519 and Ed25519 curves are supported. - - For private keys in Base58 and Multibase formats, the verification material value contains both private and public parts (concatenated bytes). - - In Multibase format, bytes of the verification material value is prefixed with the corresponding Multicodec code. - - Key IDs (kids) used in `SecretResolver` must match the corresponding key IDs from DID Doc verification methods. - - Key IDs (kids) in DID Doc verification methods and secrets must be a full [DID Fragment](https://www.w3.org/TR/did-core/#fragment), that is `did#key-id`. - - Verification methods referencing another DID Document are not supported (see [Referring to Verification Methods](https://www.w3.org/TR/did-core/#referring-to-verification-methods)). -- The following curves and algorithms are supported: - - Encryption: - - Curves: X25519, P-384, P-256, P-521 - - Content encryption algorithms: - - XC20P (to be used with ECDH-ES only, default for anoncrypt), - - A256GCM (to be used with ECDH-ES only), - - A256CBC-HS512 (default for authcrypt) - - Key wrapping algorithms: ECDH-ES+A256KW, ECDH-1PU+A256KW - - Signing: - - Curves: Ed25519, Secp256k1 (currently JDK < 15 only), P-256 - - Algorithms: EdDSA (with crv=Ed25519), ES256, ES256K (currently JDK < 15 only) -- DID rotation (`fromPrior` field) is supported. -- Forward protocol is implemented and used by default. -- Limitations and known issues: - - Secp256k1 is supported on JDK < 15 only -- DIDComm has been implemented under the following [Assumptions](https://hackmd.io/i3gLqgHQR2ihVFV5euyhqg) - -## Examples - -See demo scripts for details: -- [DIDComm examples](lib/src/test/kotlin/org/didcommx/didcomm/DIDCommDemoTest.kt) -- [Routing examples](lib/src/test/kotlin/org/didcommx/didcomm/protocols/routing/DIDCommRoutingTest.kt) - -A general usage of the API is the following: -- Sender Side: - - Build a `Message` (plaintext, payload). - - Convert a message to a DIDComm Message for further transporting by calling one of the following: - - `packEncrypted` to build an Encrypted DIDComm message - - `packSigned` to build a Signed DIDComm message - - `packPlaintext` to build a Plaintext DIDComm message -- Receiver side: - - Call `unpack` on receiver side that will decrypt the message, verify signature if needed - and return a `Message` for further processing on the application level. - -### 1. Build an Encrypted DIDComm message for the given recipient - -This is the most common DIDComm message to be used in most of the applications. - -A DIDComm encrypted message is an encrypted JWM (JSON Web Messages) that -- hides its content from all but authorized recipients -- (optionally) discloses and proves the sender to only those recipients -- provides message integrity guarantees - -It is important in privacy-preserving routing. It is what normally moves over network transports in DIDComm -applications, and is the safest format for storing DIDComm data at rest. - -See `packEncrypted` documentation for more details. - -**Authentication encryption** example (most common case): -```kotlin -val didComm = DIDComm(DIDDocResolverMock(), SecretResolverMock()) - -// ALICE -val message = Message.builder( - id = "1234567890", - body = mapOf("messagespecificattribute" to "and its value"), - type = "http://example.com/protocols/lets_do_lunch/1.0/proposal" -) - .from(ALICE_DID) - .to(listOf(BOB_DID)) - .createdTime(1516269022) - .expiresTime(1516385931) - .build() -val packResult = didComm.packEncrypted( - PackEncryptedParams.builder(message, BOB_DID) - .from(JWM.ALICE_DID) - .build() -) -println("Sending ${packResult.packedMessage} to ${packResult.serviceMetadata?.serviceEndpoint ?: ""}") - -// BOB -val unpackResult = didComm.unpack( - UnpackParams.Builder(packResult.packedMessage).build() -) -println("Got ${unpackResult.message} message") -``` - -**Anonymous encryption** example: -```kotlin -val didComm = DIDComm(DIDDocResolverMock(), SecretResolverMock()) -val message = Message.builder( - id = "1234567890", - body = mapOf("messagespecificattribute" to "and its value"), - type = "http://example.com/protocols/lets_do_lunch/1.0/proposal" -) - .to(listOf(BOB_DID)) - .createdTime(1516269022) - .expiresTime(1516385931) - .build() -val packResult = didComm.packEncrypted( - PackEncryptedParams.builder(message, BOB_DID).build() -) -) -``` - -**Encryption with non-repudiation** example: -```kotlin -val didComm = DIDComm(DIDDocResolverMock(), SecretResolverMock()) -val message = Message.builder( - id = "1234567890", - body = mapOf("messagespecificattribute" to "and its value"), - type = "http://example.com/protocols/lets_do_lunch/1.0/proposal" -) - .from(ALICE_DID) - .to(listOf(BOB_DID)) - .createdTime(1516269022) - .expiresTime(1516385931) - .build() -val packResult = didComm.packEncrypted( - PackEncryptedParams.builder(message, BOB_DID) - .signFrom(ALICE_DID) - .from(ALICE_DID) - .build() -) -``` - -### 2. Build an unencrypted but Signed DIDComm message - -Signed messages are only necessary when -- the origin of plaintext must be provable to third parties -- or the sender can’t be proven to the recipient by authenticated encryption because the recipient is not known in advance (e.g., in a - broadcast scenario). - -Adding a signature when one is not needed can degrade rather than enhance security because it -relinquishes the sender’s ability to speak off the record. - -See `packSigned` documentation for more details. -```kotlin -val didComm = DIDComm(DIDDocResolverMock(), SecretResolverMock()) - -// ALICE -val message = Message.builder( - id = "1234567890", - body = mapOf("messagespecificattribute" to "and its value"), - type = "http://example.com/protocols/lets_do_lunch/1.0/proposal" -) - .from(ALICE_DID) - .to(listOf(BOB_DID)) - .createdTime(1516269022) - .expiresTime(1516385931) - .build() -val packResult = didComm.packSigned( - PackSignedParams.builder(message, ALICE_DID).build() -) -println("Publishing ${packResult.packedMessage}") - -// BOB -val unpackResult = didComm.unpack( - UnpackParams.Builder(packResult.packedMessage).build() -) -println("Got ${unpackResult.message} message") -``` - -### 3. Build a Plaintext DIDComm message - -A DIDComm message in its plaintext form that -- is not packaged into any protective envelope -- lacks confidentiality and integrity guarantees -- repudiable - -They are therefore not normally transported across security boundaries. -```kotlin -val didComm = DIDComm(DIDDocResolverMock(), SecretResolverMock()) - -// ALICE -val message = Message.builder( - id = "1234567890", - body = mapOf("messagespecificattribute" to "and its value"), - type = "http://example.com/protocols/lets_do_lunch/1.0/proposal" -) - .from(ALICE_DID) - .to(listOf(BOB_DID)) - .createdTime(1516269022) - .expiresTime(1516385931) - .build() -val packResult = didComm.packPlaintext( - PackPlaintextParams.builder(message) - .build() -) -println("Publishing ${packResult.packedMessage}") - -// BOB -val unpackResult = didComm.unpack( - UnpackParams.Builder(packResult.packedMessage).build() -) -println("Got ${unpackResult.message} message") -``` \ No newline at end of file diff --git a/didcomm/build.gradle.kts b/didcomm/build.gradle.kts deleted file mode 100644 index 387f04e..0000000 --- a/didcomm/build.gradle.kts +++ /dev/null @@ -1,192 +0,0 @@ -import org.gradle.internal.os.OperatingSystem -import org.jetbrains.dokka.gradle.DokkaTask -import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackOutput.Target - -val currentModuleName: String = "DIDComm" -val os: OperatingSystem = OperatingSystem.current() - -plugins { - kotlin("multiplatform") - kotlin("native.cocoapods") - id("com.android.library") - id("org.jetbrains.dokka") -} - -kotlin { - android { - publishAllLibraryVariants() - } - jvm { - compilations.all { - kotlinOptions { - jvmTarget = "11" - } - } - testRuns["test"].executionTask.configure { - useJUnitPlatform() - } - } - if (os.isMacOsX) { - ios() -// tvos() -// watchos() -// macosX64() - if (System.getProperty("os.arch") != "x86_64") { // M1Chip - iosSimulatorArm64() -// tvosSimulatorArm64() -// watchosSimulatorArm64() -// macosArm64() - } - } - js(IR) { - this.moduleName = currentModuleName - this.binaries.library() - this.useCommonJs() - generateTypeScriptDefinitions() - this.compilations["main"].packageJson { - this.version = rootProject.version.toString() - } - this.compilations["test"].packageJson { - this.version = rootProject.version.toString() - } - browser { - this.webpackTask { - this.output.library = currentModuleName - this.output.libraryTarget = Target.VAR - } - this.testTask { - this.useKarma { - this.useChromeHeadless() - } - } - } - nodejs { - this.testTask { - this.useKarma { - this.useChromeHeadless() - } - } - } - } - - if (os.isMacOsX) { - cocoapods { - this.summary = "Mercury around Atala PRISM" - this.version = rootProject.version.toString() - this.authors = "IOG" - this.ios.deploymentTarget = "13.0" - this.osx.deploymentTarget = "12.0" - this.tvos.deploymentTarget = "13.0" - this.watchos.deploymentTarget = "8.0" - framework { - this.baseName = currentModuleName - export(project(":didpeer")) - } - } - } - - sourceSets { - val commonMain by getting { - dependencies { - api(project(":didpeer")) - } - } - val commonTest by getting { - dependencies { - implementation(kotlin("test")) - } - } - val jvmMain by getting - val jvmTest by getting { - dependencies { - implementation("junit:junit:4.13.2") - } - } - val androidMain by getting - val androidTest by getting { - dependencies { - implementation("junit:junit:4.13.2") - } - } - val jsMain by getting - val jsTest by getting - if (os.isMacOsX) { - val iosMain by getting - val iosTest by getting -// val tvosMain by getting -// val tvosTest by getting -// val watchosMain by getting -// val watchosTest by getting -// val macosX64Main by getting -// val macosX64Test by getting - if (System.getProperty("os.arch") != "x86_64") { // M1Chip - val iosSimulatorArm64Main by getting { - this.dependsOn(iosMain) - } - val iosSimulatorArm64Test by getting { - this.dependsOn(iosTest) - } -// val tvosSimulatorArm64Main by getting { -// this.dependsOn(tvosMain) -// } -// val tvosSimulatorArm64Test by getting { -// this.dependsOn(tvosTest) -// } -// val watchosSimulatorArm64Main by getting { -// this.dependsOn(watchosMain) -// } -// val watchosSimulatorArm64Test by getting { -// this.dependsOn(watchosTest) -// } -// val macosArm64Main by getting { -// this.dependsOn(macosX64Main) -// } -// val macosArm64Test by getting { -// this.dependsOn(macosX64Test) -// } - } - } - all { - languageSettings.optIn("kotlin.RequiresOptIn") - } - } -} - -android { - compileSdk = 32 - sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") - defaultConfig { - minSdk = 21 - targetSdk = 32 - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - /** - * Because Software Components will not be created automatically for Maven publishing from - * Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android. - * disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new - * publishing DSL. - */ - publishing { - multipleVariants { - withSourcesJar() - withJavadocJar() - allVariants() - } - } -} - -// Dokka implementation -tasks.withType { - moduleName.set(project.name) - moduleVersion.set(rootProject.version.toString()) - 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") - } - } -} diff --git a/didcomm/didcomm.podspec b/didcomm/didcomm.podspec deleted file mode 100644 index e139a3b..0000000 --- a/didcomm/didcomm.podspec +++ /dev/null @@ -1,42 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'didcomm' - spec.version = '1.0.4-alpha' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = 'IOG' - spec.license = '' - spec.summary = 'Mercury around Atala PRISM' - spec.vendored_frameworks = 'build/cocoapods/framework/DIDComm.framework' - spec.libraries = 'c++' - spec.ios.deployment_target = '13.0' - spec.osx.deployment_target = '12.0' - spec.tvos.deployment_target = '13.0' - spec.watchos.deployment_target = '8.0' - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':didcomm', - 'PRODUCT_MODULE_NAME' => 'DIDComm', - } - - spec.script_phases = [ - { - :name => 'Build didcomm', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/didcomm/src/androidMain/AndroidManifest.xml b/didcomm/src/androidMain/AndroidManifest.xml deleted file mode 100644 index be19858..0000000 --- a/didcomm/src/androidMain/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/didpeer/build.gradle.kts b/didpeer/build.gradle.kts index 86885e4..888f4d4 100644 --- a/didpeer/build.gradle.kts +++ b/didpeer/build.gradle.kts @@ -8,7 +8,6 @@ val os: OperatingSystem = OperatingSystem.current() plugins { kotlin("multiplatform") kotlin("plugin.serialization") version "1.7.20" - kotlin("native.cocoapods") id("com.android.library") id("org.jetbrains.dokka") } @@ -70,21 +69,6 @@ kotlin { } } - if (os.isMacOsX) { - cocoapods { - this.summary = "Mercury DIDPeer Atala PRISM" - this.version = rootProject.version.toString() - this.authors = "IOG" - this.ios.deploymentTarget = "13.0" - this.osx.deploymentTarget = "12.0" - this.tvos.deploymentTarget = "13.0" - this.watchos.deploymentTarget = "8.0" - framework { - this.baseName = currentModuleName - } - } - } - sourceSets { val commonMain by getting { dependencies { diff --git a/didpeer/didpeer.podspec b/didpeer/didpeer.podspec deleted file mode 100644 index 1efbc35..0000000 --- a/didpeer/didpeer.podspec +++ /dev/null @@ -1,42 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'didpeer' - spec.version = '1.0.4-alpha' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = 'IOG' - spec.license = '' - spec.summary = 'Mercury DIDPeer Atala PRISM' - spec.vendored_frameworks = 'build/cocoapods/framework/DIDCommDIDPeer.framework' - spec.libraries = 'c++' - spec.ios.deployment_target = '13.0' - spec.osx.deployment_target = '12.0' - spec.tvos.deployment_target = '13.0' - spec.watchos.deployment_target = '8.0' - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':didpeer', - 'PRODUCT_MODULE_NAME' => 'DIDCommDIDPeer', - } - - spec.script_phases = [ - { - :name => 'Build didpeer', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index b06e687..31d411a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,5 +7,4 @@ pluginManagement { } rootProject.name = "DIDComm" -include(":didcomm") include(":didpeer")