From 8c02cdb3a9b17e7188542151d97a604c823fb751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20Ribo=CC=81=20Labrador?= Date: Wed, 4 Oct 2023 13:41:03 +0200 Subject: [PATCH] fix: Typescript assign the correct static variable names avoiding name mangling Signed-off-by: Ahmed Moussa --- .editorconfig | 1 + .github/workflows/Deployment.yml | 2 +- .gitmodules | 1 + apollo/Apollo.podspec | 42 ------------- apollo/build.gradle.kts | 19 ++---- .../base_asymmetric_encryption.podspec | 39 ------------ base-asymmetric-encryption/build.gradle.kts | 59 +++++++++++++++---- .../atala/prism/apollo/utils/Encodable.kt | 5 ++ .../apollo/utils/KMMECSecp256k1PrivateKey.kt | 33 +++++------ .../apollo/utils/KMMECSecp256k1PublicKey.kt | 3 + .../base_symmetric_encryption.podspec | 42 ------------- base-symmetric-encryption/build.gradle.kts | 19 ++---- base16/Base16.podspec | 42 ------------- base16/build.gradle.kts | 20 ++----- .../atala/prism/apollo/base16/ByteArrayExt.kt | 2 +- base32/Base32.podspec | 42 ------------- base32/build.gradle.kts | 20 ++----- .../atala/prism/apollo/base32/ByteArrayExt.kt | 10 +++- base58/Base58.podspec | 42 ------------- base58/build.gradle.kts | 20 ++----- .../atala/prism/apollo/base58/ByteArrayExt.kt | 4 +- base64/build.gradle.kts | 10 ++-- .../atala/prism/apollo/base64/ByteArrayExt.kt | 4 ++ hashing/build.gradle.kts | 20 ++----- multibase/build.gradle.kts | 20 ++----- secp256k1-kmp/native/secp256k1 | 2 +- secure-random/build.gradle.kts | 28 +++------ utils/build.gradle.kts | 19 ++---- uuid/build.gradle.kts | 19 ++---- varint/build.gradle.kts | 19 ++---- 30 files changed, 143 insertions(+), 465 deletions(-) delete mode 100644 apollo/Apollo.podspec delete mode 100644 base-asymmetric-encryption/base_asymmetric_encryption.podspec delete mode 100644 base-symmetric-encryption/base_symmetric_encryption.podspec delete mode 100644 base16/Base16.podspec delete mode 100644 base32/Base32.podspec delete mode 100644 base58/Base58.podspec diff --git a/.editorconfig b/.editorconfig index 5784fa3f9..bd1514675 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,3 +6,4 @@ ktlint_standard_no_semi = disabled ktlint_standard_trailing-comma-on-call-site = disabled ktlint_standard_trailing-comma-on-declaration-site = disabled ktlint_standard_function-signature = disabled +ktlint_standard_max-line-length = disabled diff --git a/.github/workflows/Deployment.yml b/.github/workflows/Deployment.yml index 2b6d3af4c..9f6869d50 100644 --- a/.github/workflows/Deployment.yml +++ b/.github/workflows/Deployment.yml @@ -73,4 +73,4 @@ jobs: - name: Publish Maven artifacts to Github Packages id: publish run: | - ./gradlew publishAllPublicationsToGitHubPackagesRepository + ./gradlew publishAllPublicationsToGitHubPackagesRepository :base-asymmetric-encryption:publishJsPackageToGithubRegistry diff --git a/.gitmodules b/.gitmodules index 4c264c08f..db8b83818 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "secp256k1-kmp/native/secp256k1"] path = secp256k1-kmp/native/secp256k1 url = https://github.com/bitcoin-core/secp256k1 + branch = master diff --git a/apollo/Apollo.podspec b/apollo/Apollo.podspec deleted file mode 100644 index d0a4a1275..000000000 --- a/apollo/Apollo.podspec +++ /dev/null @@ -1,42 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'apollo' - spec.version = '1.7.0-alpha' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = 'IOG' - spec.license = '' - spec.summary = 'Apollo' - spec.vendored_frameworks = 'build/cocoapods/framework/Apollo.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' => ':apollo', - 'PRODUCT_MODULE_NAME' => 'Apollo', - } - - spec.script_phases = [ - { - :name => 'Build apollo', - :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/apollo/build.gradle.kts b/apollo/build.gradle.kts index 15d193acf..dce120572 100644 --- a/apollo/build.gradle.kts +++ b/apollo/build.gradle.kts @@ -36,6 +36,7 @@ kotlin { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -113,11 +114,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -153,9 +154,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for cryptography - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for cryptography" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -163,13 +162,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/base-asymmetric-encryption/base_asymmetric_encryption.podspec b/base-asymmetric-encryption/base_asymmetric_encryption.podspec deleted file mode 100644 index 1e82c6c22..000000000 --- a/base-asymmetric-encryption/base_asymmetric_encryption.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'base_asymmetric_encryption' - spec.version = '1.7.0-alpha' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = '' - spec.vendored_frameworks = 'build/cocoapods/framework/base_asymmetric_encryption.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':base-asymmetric-encryption', - 'PRODUCT_MODULE_NAME' => 'base_asymmetric_encryption', - } - - spec.script_phases = [ - { - :name => 'Build base_asymmetric_encryption', - :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/base-asymmetric-encryption/build.gradle.kts b/base-asymmetric-encryption/build.gradle.kts index 901b444ff..58282f10c 100644 --- a/base-asymmetric-encryption/build.gradle.kts +++ b/base-asymmetric-encryption/build.gradle.kts @@ -1,3 +1,4 @@ +import dev.petuska.npm.publish.extension.domain.NpmAccess import org.gradle.internal.os.OperatingSystem import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackOutput.Target @@ -10,6 +11,7 @@ plugins { id("io.github.luca992.multiplatform-swiftpackage") version "2.0.5-arm64" id("com.android.library") id("org.jetbrains.dokka") + id("dev.petuska.npm.publish") version "3.4.1" } kotlin { @@ -87,6 +89,7 @@ kotlin { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -150,10 +153,18 @@ kotlin { api("fr.acinq.secp256k1:secp256k1-kmp:0.9.0") } val target = when { - os.isLinux -> "linux" - os.isMacOsX -> "darwin" - os.isWindows -> "mingw" - else -> error("Unsupported OS $os") + os.isLinux -> { + "linux" + } + os.isMacOsX -> { + "darwin" + } + os.isWindows -> { + "mingw" + } + else -> { + error("Unsupported OS $os") + } } implementation("fr.acinq.secp256k1:secp256k1-kmp-jni-jvm-$target:0.9.0") implementation("com.google.guava:guava:30.1-jre") @@ -214,8 +225,6 @@ kotlin { val macosArm64Test by getting { this.dependsOn(iosTest) } } // if (os.isWindows) { -// // val mingwX86Main by getting // it depend on kotlinx-datetime lib to support this platform before we can support it as well -// // val mingwX86Test by getting // it depend on kotlinx-datetime lib to support this platform before we can support it as well // val mingwX64Main by getting // val mingwX64Test by getting // } @@ -223,11 +232,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -263,9 +272,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for Base Asymmetric Encryption - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for Base Asymmetric Encryption" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -293,3 +300,33 @@ ktlint { exclude { projectDir.toURI().relativize(it.file.toURI()).path.contains("/external/") } } } + +npmPublish { + organization.set("input-output-hk") + version.set(project.version.toString()) + access.set(NpmAccess.PUBLIC) + packages { + access.set(NpmAccess.PUBLIC) + named("js") { + scope.set("input-output-hk") + packageName.set("apollo") + packageJson { + author { + name.set("IOG") + } + repository { + type.set("git") + url.set("https://github.com/input-output-hk/atala-prism-apollo.git") + } + } + } + } + registries { + access.set(NpmAccess.PUBLIC) + github { + uri.set("https://npm.pkg.github.com/") + access.set(NpmAccess.PUBLIC) + this.authToken.set(System.getenv("ATALA_GITHUB_TOKEN")) + } + } +} diff --git a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/Encodable.kt b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/Encodable.kt index fa2b2d055..faa9b6291 100644 --- a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/Encodable.kt +++ b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/Encodable.kt @@ -1,5 +1,10 @@ package io.iohk.atala.prism.apollo.utils +import kotlin.js.ExperimentalJsExport +import kotlin.js.JsExport + +@OptIn(ExperimentalJsExport::class) +@JsExport interface Encodable { /** * @return encoded version of the entity diff --git a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PrivateKey.kt b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PrivateKey.kt index b81c4bcee..59992f2bc 100644 --- a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PrivateKey.kt +++ b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PrivateKey.kt @@ -5,12 +5,22 @@ import kotlin.js.ExperimentalJsExport import kotlin.js.JsExport import kotlin.js.JsName +@OptIn(ExperimentalJsExport::class) +@JsExport interface KMMECSecp256k1PrivateKeyCommonStaticInterface { + @JsName("secp256k1FromByteArray") + fun secp256k1FromByteArray(d: ByteArray): KMMECSecp256k1PrivateKey { + return KMMECSecp256k1PrivateKey(d) + } - fun secp256k1FromByteArray(d: ByteArray): KMMECSecp256k1PrivateKey - - @Throws(ECPrivateKeyDecodingException::class) - fun tweak(privateKeyData: ByteArray, derivationPrivateKeyData: ByteArray): KMMECSecp256k1PrivateKey + fun tweak( + privateKeyData: ByteArray, + derivationPrivateKeyData: ByteArray + ): KMMECSecp256k1PrivateKey { + val derivedKey = Secp256k1Lib().derivePrivateKey(privateKeyData, derivationPrivateKeyData) + return derivedKey?.let { KMMECSecp256k1PrivateKey(derivedKey) } + ?: run { throw ECPrivateKeyDecodingException("Error while tweaking") } + } } @OptIn(ExperimentalJsExport::class) @@ -53,18 +63,5 @@ class KMMECSecp256k1PrivateKey : Encodable { return secp256k1Lib.verify(getPublicKey().raw, signature, data) } - companion object : KMMECSecp256k1PrivateKeyCommonStaticInterface { - override fun secp256k1FromByteArray(d: ByteArray): KMMECSecp256k1PrivateKey { - return KMMECSecp256k1PrivateKey(d) - } - - override fun tweak( - privateKeyData: ByteArray, - derivationPrivateKeyData: ByteArray - ): KMMECSecp256k1PrivateKey { - val derivedKey = Secp256k1Lib().derivePrivateKey(privateKeyData, derivationPrivateKeyData) - return derivedKey?.let { KMMECSecp256k1PrivateKey(derivedKey) } - ?: run { throw ECPrivateKeyDecodingException("Error while tweaking") } - } - } + companion object : KMMECSecp256k1PrivateKeyCommonStaticInterface } diff --git a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt index 0ddbe98f7..771e94c3f 100644 --- a/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt +++ b/base-asymmetric-encryption/src/commonMain/kotlin/io/iohk/atala/prism/apollo/utils/KMMECSecp256k1PublicKey.kt @@ -16,6 +16,7 @@ interface KMMECSecp256k1PublicKeyCommonStaticInterface { * @return true if point on curve, false if not. * @exception ClassCastException This method fails in JS. To be further investigated. */ + @JsName("isPointOnSecp256k1Curve") fun isPointOnSecp256k1Curve(point: KMMECPoint): Boolean { val x = BigInteger.fromByteArray(point.x, Sign.POSITIVE) val y = BigInteger.fromByteArray(point.y, Sign.POSITIVE) @@ -24,6 +25,7 @@ interface KMMECSecp256k1PublicKeyCommonStaticInterface { return ((y * y - x * x * x - ECConfig.b) mod ECConfig.p) == BigInteger.ZERO } + @JsName("secp256k1FromBytes") fun secp256k1FromBytes(encoded: ByteArray): KMMECSecp256k1PublicKey { require(encoded.size == 33 || encoded.size == 65) { "Encoded byte array's expected length is 33 (compressed) or 65 (uncompressed), but got ${encoded.size} bytes" @@ -90,6 +92,7 @@ class KMMECSecp256k1PublicKey { * Get compressed key * @return compressed ByteArray */ + @JsName("getCompressed") fun getCompressed(): ByteArray { return Secp256k1Lib().compressPublicKey(raw) } diff --git a/base-symmetric-encryption/base_symmetric_encryption.podspec b/base-symmetric-encryption/base_symmetric_encryption.podspec deleted file mode 100644 index 228489b70..000000000 --- a/base-symmetric-encryption/base_symmetric_encryption.podspec +++ /dev/null @@ -1,42 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'base_symmetric_encryption' - spec.version = '1.7.0-alpha' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = 'IOG' - spec.license = '' - spec.summary = 'ApolloBaseSymmetricEncryption is a base for symmetric encryption libs' - spec.vendored_frameworks = 'build/cocoapods/framework/ApolloBaseSymmetricEncryption.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' => ':base-symmetric-encryption', - 'PRODUCT_MODULE_NAME' => 'ApolloBaseSymmetricEncryption', - } - - spec.script_phases = [ - { - :name => 'Build base_symmetric_encryption', - :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/base-symmetric-encryption/build.gradle.kts b/base-symmetric-encryption/build.gradle.kts index bdc376a7d..4a1913d72 100644 --- a/base-symmetric-encryption/build.gradle.kts +++ b/base-symmetric-encryption/build.gradle.kts @@ -44,6 +44,7 @@ kotlin { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -149,11 +150,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -189,9 +190,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for Base Symmetric Encryption - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for Base Symmetric Encryption" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -199,13 +198,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/base16/Base16.podspec b/base16/Base16.podspec deleted file mode 100644 index c7c3204d7..000000000 --- a/base16/Base16.podspec +++ /dev/null @@ -1,42 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'base16' - spec.version = '1.7.0-alpha' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = 'IOG' - spec.license = '' - spec.summary = 'ApolloBase16 is a Base16 lib' - spec.vendored_frameworks = 'build/cocoapods/framework/ApolloBase16.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' => ':base16', - 'PRODUCT_MODULE_NAME' => 'ApolloBase16', - } - - spec.script_phases = [ - { - :name => 'Build base16', - :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/base16/build.gradle.kts b/base16/build.gradle.kts index 64cba7b03..c4e92cda7 100644 --- a/base16/build.gradle.kts +++ b/base16/build.gradle.kts @@ -38,13 +38,13 @@ kotlin { } } // if (os.isWindows) { -// // mingwX86() // it depend on kotlinx-datetime lib to support this platform before we can support it as well // mingwX64() // } js(IR) { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -139,11 +139,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -179,9 +179,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for Base16 - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for Base16" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -189,13 +187,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/base16/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base16/ByteArrayExt.kt b/base16/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base16/ByteArrayExt.kt index 93def7b92..7eb7a5d4a 100644 --- a/base16/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base16/ByteArrayExt.kt +++ b/base16/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base16/ByteArrayExt.kt @@ -4,7 +4,7 @@ package io.iohk.atala.prism.apollo.base16 * Convert [ByteArray] to [CharArray] * @return [CharArray] */ -internal fun ByteArray.asCharArray(): CharArray { +fun ByteArray.asCharArray(): CharArray { val chars = CharArray(size) for (i in chars.indices) { chars[i] = get(i).toInt().toChar() diff --git a/base32/Base32.podspec b/base32/Base32.podspec deleted file mode 100644 index e994a71d5..000000000 --- a/base32/Base32.podspec +++ /dev/null @@ -1,42 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'base32' - spec.version = '1.7.0-alpha' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = 'IOG' - spec.license = '' - spec.summary = 'ApolloBase32 is a Base32 lib' - spec.vendored_frameworks = 'build/cocoapods/framework/ApolloBase32.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' => ':base32', - 'PRODUCT_MODULE_NAME' => 'ApolloBase32', - } - - spec.script_phases = [ - { - :name => 'Build base32', - :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/base32/build.gradle.kts b/base32/build.gradle.kts index 9502b69fa..0d4d55e51 100644 --- a/base32/build.gradle.kts +++ b/base32/build.gradle.kts @@ -38,13 +38,13 @@ kotlin { } } // if (os.isWindows) { -// // mingwX86() // it depend on kotlinx-datetime lib to support this platform before we can support it as well // mingwX64() // } js(IR) { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -143,11 +143,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -183,9 +183,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for Base32 - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for Base32" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -193,13 +191,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/base32/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base32/ByteArrayExt.kt b/base32/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base32/ByteArrayExt.kt index 44e92bd94..73e0ecabe 100644 --- a/base32/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base32/ByteArrayExt.kt +++ b/base32/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base32/ByteArrayExt.kt @@ -4,7 +4,7 @@ package io.iohk.atala.prism.apollo.base32 * Convert [ByteArray] to [CharArray] * @return [CharArray] */ -internal fun ByteArray.asCharArray(): CharArray { +fun ByteArray.asCharArray(): CharArray { val chars = CharArray(size) for (i in chars.indices) { chars[i] = get(i).toInt().toChar() @@ -13,6 +13,7 @@ internal fun ByteArray.asCharArray(): CharArray { } // Standard + /** * Encode a [ByteArray] to Base32 [String] standard */ @@ -26,6 +27,7 @@ val ByteArray.base32Decoded: String get() = asCharArray().concatToString().base32Encoded // Standard with padding + /** * Encode a [ByteArray] to Base32 [String] standard with padding */ @@ -39,6 +41,7 @@ val ByteArray.base32PadDecoded: String get() = asCharArray().concatToString().base32PadEncoded // Upper + /** * Encode a [ByteArray] to Base32 [String] upper */ @@ -52,6 +55,7 @@ val ByteArray.base32UpperDecoded: String get() = asCharArray().concatToString().base32UpperEncoded // Upper with padding + /** * Encode a [ByteArray] to Base32 [String] Upper with padding */ @@ -65,6 +69,7 @@ val ByteArray.base32UpperPadDecoded: String get() = asCharArray().concatToString().base32UpperPadEncoded // Hex + /** * Encode a [ByteArray] to Base32 [String] hex */ @@ -78,6 +83,7 @@ val ByteArray.base32HexDecoded: String get() = asCharArray().concatToString().base32HexEncoded // Hex with padding + /** * Encode a [ByteArray] to Base32 [String] Hex with padding */ @@ -91,6 +97,7 @@ val ByteArray.base32HexPadDecoded: String get() = asCharArray().concatToString().base32HexPadEncoded // Hex Upper + /** * Encode a [ByteArray] to Base32 [String] Hex Upper */ @@ -104,6 +111,7 @@ val ByteArray.base32HexUpperDecoded: String get() = asCharArray().concatToString().base32HexUpperEncoded // Hex Upper with padding + /** * Encode a [ByteArray] to Base32 [String] Hex Upper with padding */ diff --git a/base58/Base58.podspec b/base58/Base58.podspec deleted file mode 100644 index da2af6bd3..000000000 --- a/base58/Base58.podspec +++ /dev/null @@ -1,42 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'base58' - spec.version = '1.7.0-alpha' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = 'IOG' - spec.license = '' - spec.summary = 'ApolloBase58 is a Base58 lib' - spec.vendored_frameworks = 'build/cocoapods/framework/ApolloBase58.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' => ':base58', - 'PRODUCT_MODULE_NAME' => 'ApolloBase58', - } - - spec.script_phases = [ - { - :name => 'Build base58', - :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/base58/build.gradle.kts b/base58/build.gradle.kts index 465c2b01e..3471740e8 100644 --- a/base58/build.gradle.kts +++ b/base58/build.gradle.kts @@ -38,13 +38,13 @@ kotlin { } } // if (os.isWindows) { -// // mingwX86() // it depend on kotlinx-datetime lib to support this platform before we can support it as well // mingwX64() // } js(IR) { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -143,11 +143,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -183,9 +183,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for Base58 - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for Base58" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -193,13 +191,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/base58/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base58/ByteArrayExt.kt b/base58/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base58/ByteArrayExt.kt index ec8e52fe5..f581dc852 100644 --- a/base58/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base58/ByteArrayExt.kt +++ b/base58/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base58/ByteArrayExt.kt @@ -4,7 +4,7 @@ package io.iohk.atala.prism.apollo.base58 * Convert [ByteArray] to [CharArray] * @return [CharArray] */ -internal fun ByteArray.asCharArray(): CharArray { +fun ByteArray.asCharArray(): CharArray { val chars = CharArray(size) for (i in chars.indices) { chars[i] = get(i).toInt().toChar() @@ -13,6 +13,7 @@ internal fun ByteArray.asCharArray(): CharArray { } // BTC + /** * Encode a [ByteArray] to Base58 [String] standard */ @@ -26,6 +27,7 @@ val ByteArray.base58BtcDecoded: String get() = asCharArray().concatToString().base58BtcEncoded // Flickr + /** * Encode a [ByteArray] to Base58 [String] standard */ diff --git a/base64/build.gradle.kts b/base64/build.gradle.kts index 13eb068f5..d1f06674f 100644 --- a/base64/build.gradle.kts +++ b/base64/build.gradle.kts @@ -37,13 +37,13 @@ kotlin { } } // if (os.isWindows) { -// // mingwX86() // it depend on kotlinx-datetime lib to support this platform before we can support it as well // mingwX64() // } js(IR) { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -138,11 +138,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -178,9 +178,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for Base64 - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for Base64" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { diff --git a/base64/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base64/ByteArrayExt.kt b/base64/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base64/ByteArrayExt.kt index 75621c00c..fc02b60c9 100644 --- a/base64/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base64/ByteArrayExt.kt +++ b/base64/src/commonMain/kotlin/io/iohk/atala/prism/apollo/base64/ByteArrayExt.kt @@ -13,6 +13,7 @@ fun ByteArray.asCharArray(): CharArray { } // Base64Standard + /** * Encode a [ByteArray] to Base64 [String] standard encoding * RFC 4648 Section 4 @@ -28,6 +29,7 @@ val ByteArray.base64Decoded: String get() = Base64.decode(this.decodeToString()).decodeToString() // Base64Standard with padding + /** * Encode a [ByteArray] to Base64 [String] standard encoding * RFC 4648 Section 4 @@ -43,6 +45,7 @@ val ByteArray.base64PadDecoded: String get() = Base64.decode(this.decodeToString(), Encoding.StandardPad).decodeToString() // Base64URL + /** * Decode a [ByteArray] Base64 URL-safe encoded to [String]. * RFC 4648 Section 5 @@ -58,6 +61,7 @@ val ByteArray.base64UrlEncoded: String get() = Base64.encodeToString(this, Encoding.UrlSafe) // Base64URL with padding + /** * Decode a [ByteArray] Base64 URL-safe encoded to [String]. * RFC 4648 Section 5 diff --git a/hashing/build.gradle.kts b/hashing/build.gradle.kts index 0edc53814..ff6838b61 100644 --- a/hashing/build.gradle.kts +++ b/hashing/build.gradle.kts @@ -37,13 +37,13 @@ kotlin { } } if (os.isWindows) { - mingwX86() mingwX64() } js(IR) { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -177,11 +177,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -217,9 +217,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for Hashing in cryptography - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for Hashing in cryptography" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -227,13 +225,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/multibase/build.gradle.kts b/multibase/build.gradle.kts index 36d4c41f1..824e36a47 100644 --- a/multibase/build.gradle.kts +++ b/multibase/build.gradle.kts @@ -37,13 +37,13 @@ kotlin { } } // if (os.isWindows) { -// // mingwX86() // it depend on kotlinx-datetime lib to support this platform before we can support it as well // mingwX64() // } js(IR) { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -145,11 +145,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -185,9 +185,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for Multibase - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for Multibase" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -195,13 +193,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/secp256k1-kmp/native/secp256k1 b/secp256k1-kmp/native/secp256k1 index c9ebca95f..b314cf283 160000 --- a/secp256k1-kmp/native/secp256k1 +++ b/secp256k1-kmp/native/secp256k1 @@ -1 +1 @@ -Subproject commit c9ebca95f9184fcf25b1ed457c4e7241006f87df +Subproject commit b314cf28334a91db2fe144d04f86077e2bfd7a25 diff --git a/secure-random/build.gradle.kts b/secure-random/build.gradle.kts index 310fe4097..b7f5438e1 100644 --- a/secure-random/build.gradle.kts +++ b/secure-random/build.gradle.kts @@ -49,30 +49,30 @@ kotlin { } if (os.isMacOsX) { - ios() { + ios { swiftCinterop("IOHKSecureRandomGeneration", name) } // tvos() // watchos() if (System.getProperty("os.arch") != "x86_64") { // M1Chip - iosSimulatorArm64() { + iosSimulatorArm64 { swiftCinterop("IOHKSecureRandomGeneration", name) } // tvosSimulatorArm64() // watchosSimulatorArm64() - macosArm64() { + macosArm64 { swiftCinterop("IOHKSecureRandomGeneration", name) } } } // if (os.isWindows) { -// // mingwX86() // it depend on kotlinx-datetime lib to support this platform before we can support it as well // mingwX64() // } js(IR) { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -166,8 +166,6 @@ kotlin { } } // if (os.isWindows) { -// // val mingwX86Main by getting // it depend on kotlinx-datetime lib to support this platform before we can support it as well -// // val mingwX86Test by getting // it depend on kotlinx-datetime lib to support this platform before we can support it as well // val mingwX64Main by getting // val mingwX64Test by getting // } @@ -175,11 +173,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -215,9 +213,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library is a secure random generation module - """.trimIndent() + description = "This is a Kotlin Multiplatform Library is a secure random generation module" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -225,13 +221,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/utils/build.gradle.kts b/utils/build.gradle.kts index 4afea4641..9bbe0221d 100644 --- a/utils/build.gradle.kts +++ b/utils/build.gradle.kts @@ -44,6 +44,7 @@ kotlin { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -151,11 +152,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -191,9 +192,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library is a Utils helper module - """.trimIndent() + description = "This is a Kotlin Multiplatform Library is a Utils helper module" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -201,13 +200,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/uuid/build.gradle.kts b/uuid/build.gradle.kts index 44b81565a..e0bb8e2f2 100644 --- a/uuid/build.gradle.kts +++ b/uuid/build.gradle.kts @@ -44,6 +44,7 @@ kotlin { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -148,11 +149,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -188,9 +189,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for UUID generation - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for UUID generation" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -198,13 +197,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// } diff --git a/varint/build.gradle.kts b/varint/build.gradle.kts index a6cb0294d..3d619def9 100644 --- a/varint/build.gradle.kts +++ b/varint/build.gradle.kts @@ -45,6 +45,7 @@ kotlin { this.moduleName = currentModuleName this.binaries.library() this.useCommonJs() + generateTypeScriptDefinitions() this.compilations["main"].packageJson { this.version = rootProject.version.toString() } @@ -145,11 +146,11 @@ kotlin { if (os.isMacOsX) { tasks.getByName("iosX64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } if (System.getProperty("os.arch") != "x86_64") { // M1Chip tasks.getByName("iosSimulatorArm64Test") { - deviceId = "iPhone 14 Plus" + device.set("iPhone 14 Plus") } } } @@ -185,9 +186,7 @@ android { tasks.withType { moduleName.set(project.name) moduleVersion.set(rootProject.version.toString()) - description = """ - This is a Kotlin Multiplatform Library for ECDSA - """.trimIndent() + description = "This is a Kotlin Multiplatform Library for ECDSA" dokkaSourceSets { // TODO: Figure out how to include files to the documentations named("commonMain") { @@ -195,13 +194,3 @@ tasks.withType { } } } - -// afterEvaluate { -// tasks.withType { -// testLogging { -// events("passed", "skipped", "failed", "standard_out", "standard_error") -// showExceptions = true -// showStackTraces = true -// } -// } -// }