Skip to content

Commit

Permalink
Merge branch 'main' into update/1.9.20
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed Moussa <[email protected]>
  • Loading branch information
hamada147 committed Nov 22, 2023
2 parents 57949ec + 12c3416 commit 1875403
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 259 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
ATALA_GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
ATALA_NPM_TOKEN: ${{ secrets.ATALA_NPM_TOKEN }}

on:
workflow_dispatch:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [1.1.1](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.1.0...v1.1.1) (2023-11-21)


### Bug Fixes

* add ec pub key validation checks ([#112](https://github.com/input-output-hk/atala-prism-apollo/issues/112)) ([023beb7](https://github.com/input-output-hk/atala-prism-apollo/commit/023beb78d6dba1bd70a9d60a711c86ef7c6a251a))
* Base32 re-implemented as per RFC-4648 ([#111](https://github.com/input-output-hk/atala-prism-apollo/issues/111)) ([4170ac1](https://github.com/input-output-hk/atala-prism-apollo/commit/4170ac10def15fad8281777e285929bf3623517e))
* Update npm configuration for npmjs repository ([#114](https://github.com/input-output-hk/atala-prism-apollo/issues/114)) ([c8a0ca4](https://github.com/input-output-hk/atala-prism-apollo/commit/c8a0ca4d0bd752ffb94e6300f3f72fa71ab29e32))

# [1.1.0](https://github.com/input-output-hk/atala-prism-apollo/compare/v1.0.3...v1.1.0) (2023-11-13)


Expand Down
62 changes: 29 additions & 33 deletions apollo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,30 @@ kotlin {
export(project(":hashing"))
}
}
iosSimulatorArm64 {
binaries.framework {
baseName = "ApolloLibrary"
export(project(":cryptography"))
export(project(":multibase"))
export(project(":base64"))
export(project(":base58"))
export(project(":base32"))
export(project(":utils"))
export(project(":hashing"))
}
}
macosArm64 {
binaries.framework {
baseName = "ApolloLibrary"
export(project(":cryptography"))
export(project(":multibase"))
export(project(":base64"))
export(project(":base58"))
export(project(":base32"))
export(project(":utils"))
export(project(":hashing"))
}
}
multiplatformSwiftPackage {
packageName("Apollo")
swiftToolsVersion("5.3")
Expand All @@ -50,33 +74,6 @@ kotlin {
}
outputDirectory(File(rootDir, "apollo/build/packages/ApolloSwift"))
}
// M1Chip
if (System.getProperty("os.arch") != "x86_64") {
iosSimulatorArm64 {
binaries.framework {
baseName = "ApolloLibrary"
export(project(":cryptography"))
export(project(":multibase"))
export(project(":base64"))
export(project(":base58"))
export(project(":base32"))
export(project(":utils"))
export(project(":hashing"))
}
}
macosArm64 {
binaries.framework {
baseName = "ApolloLibrary"
export(project(":cryptography"))
export(project(":multibase"))
export(project(":base64"))
export(project(":base58"))
export(project(":base32"))
export(project(":utils"))
export(project(":hashing"))
}
}
}

js(IR) {
this.moduleName = currentModuleName
Expand Down Expand Up @@ -223,13 +220,13 @@ tasks.withType<DokkaTask> {
}

npmPublish {
organization.set("input-output-hk")
organization.set("atala")
version.set(rootProject.version.toString())
access.set(NpmAccess.PUBLIC)
packages {
access.set(NpmAccess.PUBLIC)
named("js") {
scope.set("input-output-hk")
scope.set("atala")
packageName.set("apollo")
packageJson {
author {
Expand All @@ -244,10 +241,9 @@ npmPublish {
}
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"))
register("npmjs") {
uri.set("https://registry.npmjs.org")
authToken.set(System.getenv("ATALA_NPM_TOKEN"))
}
}
}
Expand Down
19 changes: 3 additions & 16 deletions base16/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,9 @@ kotlin {
useJUnitPlatform()
}
}
if (os.isMacOsX) {
ios()
// tvos()
// watchos()
// macosX64()
// M1Chip
if (System.getProperty("os.arch") != "x86_64") {
iosSimulatorArm64()
// tvosSimulatorArm64()
// watchosSimulatorArm64()
macosArm64()
}
}
// if (os.isWindows) {
// mingwX64()
// }
ios()
iosSimulatorArm64()
macosArm64()
js(IR) {
this.moduleName = currentModuleName
this.binaries.library()
Expand Down
19 changes: 3 additions & 16 deletions base32/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,9 @@ kotlin {
useJUnitPlatform()
}
}
if (os.isMacOsX) {
ios()
// tvos()
// watchos()
// macosX64()
// M1Chip
if (System.getProperty("os.arch") != "x86_64") {
iosSimulatorArm64()
// tvosSimulatorArm64()
// watchosSimulatorArm64()
macosArm64()
}
}
// if (os.isWindows) {
// mingwX64()
// }
ios()
iosSimulatorArm64()
macosArm64()
js(IR) {
this.moduleName = currentModuleName
this.binaries.library()
Expand Down
19 changes: 3 additions & 16 deletions base58/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,9 @@ kotlin {
useJUnitPlatform()
}
}
if (os.isMacOsX) {
ios()
// tvos()
// watchos()
// macosX64()
// M1Chip
if (System.getProperty("os.arch") != "x86_64") {
iosSimulatorArm64()
// tvosSimulatorArm64()
// watchosSimulatorArm64()
macosArm64()
}
}
// if (os.isWindows) {
// mingwX64()
// }
ios()
iosSimulatorArm64()
macosArm64()
js(IR) {
this.moduleName = currentModuleName
this.binaries.library()
Expand Down
18 changes: 3 additions & 15 deletions base64/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,9 @@ kotlin {
useJUnitPlatform()
}
}
if (os.isMacOsX) {
ios()
// tvos()
// watchos()
// M1Chip
if (System.getProperty("os.arch") != "x86_64") {
iosSimulatorArm64()
// tvosSimulatorArm64()
// watchosSimulatorArm64()
macosArm64()
}
}
// if (os.isWindows) {
// mingwX64()
// }
ios()
iosSimulatorArm64()
macosArm64()
js(IR) {
this.moduleName = currentModuleName
this.binaries.library()
Expand Down
51 changes: 25 additions & 26 deletions cryptography/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,36 @@ kotlin {
useJUnitPlatform()
}
}
ios {
binaries.framework {
baseName = currentModuleName
embedBitcode("disable")
}

if (os.isMacOsX) {
ios {
binaries.framework {
baseName = currentModuleName
embedBitcode("disable")
}
swiftCinterop("IOHKCryptoKit", name)
swiftCinterop("IOHKSecureRandomGeneration", name)
}
iosSimulatorArm64 {
binaries.framework {
baseName = currentModuleName
embedBitcode("disable")
}

swiftCinterop("IOHKCryptoKit", name)
swiftCinterop("IOHKSecureRandomGeneration", name)
swiftCinterop("IOHKCryptoKit", name)
swiftCinterop("IOHKSecureRandomGeneration", name)
}
macosArm64 {
binaries.framework {
baseName = currentModuleName
embedBitcode("disable")
}

swiftCinterop("IOHKCryptoKit", name)
swiftCinterop("IOHKSecureRandomGeneration", name)
}
if (os.isMacOsX) {
// M1Chip
if (System.getProperty("os.arch") != "x86_64") {
iosSimulatorArm64 {
binaries.framework {
baseName = currentModuleName
embedBitcode("disable")
}

swiftCinterop("IOHKCryptoKit", name)
swiftCinterop("IOHKSecureRandomGeneration", name)
}
macosArm64 {
binaries.framework {
baseName = currentModuleName
embedBitcode("disable")
}

swiftCinterop("IOHKCryptoKit", name)
swiftCinterop("IOHKSecureRandomGeneration", name)
}
// tvosSimulatorArm64()
// watchosSimulatorArm64()
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 1.1.0
version = 1.1.1
org.gradle.jvmargs = -Xmx3072M -Dkotlin.daemon.jvm.options="-Xmx3072M"
kotlin.code.style = official
android.useAndroidX = true
Expand Down
34 changes: 11 additions & 23 deletions hashing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,9 @@ kotlin {
useJUnitPlatform()
}
}
if (os.isMacOsX) {
ios()
// tvos()
// watchos()
// M1Chip
if (System.getProperty("os.arch") != "x86_64") {
iosSimulatorArm64()
// tvosSimulatorArm64()
// watchosSimulatorArm64()
macosArm64()
}
}
if (os.isWindows) {
mingwX64()
}
ios()
iosSimulatorArm64()
macosArm64()
js(IR) {
this.moduleName = currentModuleName
this.binaries.library()
Expand Down Expand Up @@ -164,14 +152,14 @@ kotlin {
}
}
}
if (os.isWindows) {
val mingwX64Main by getting {
this.dependsOn(allButJSMain)
}
val mingwX64Test by getting {
this.dependsOn(allButJSTest)
}
}
// if (os.isWindows) {
// val mingwX64Main by getting {
// this.dependsOn(allButJSMain)
// }
// val mingwX64Test by getting {
// this.dependsOn(allButJSTest)
// }
// }
all {
languageSettings.optIn("kotlin.RequiresOptIn")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package io.iohk.atala.prism.apollo.hashing.sha2

import io.iohk.atala.prism.apollo.hashing.BaseHashTests
import io.iohk.atala.prism.apollo.hashing.SHA224
import io.iohk.atala.prism.apollo.hashing.internal.JsIgnore
import io.iohk.atala.prism.apollo.hashing.internal.toBinary
import io.iohk.atala.prism.apollo.hashing.internal.toHexString
import kotlinx.coroutines.test.runTest
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.time.Duration.Companion.seconds

class SHA224Tests : BaseHashTests() {
override val valueForHash: List<String>
Expand Down Expand Up @@ -42,9 +42,9 @@ class SHA224Tests : BaseHashTests() {
}

@Test
@JsIgnore
@Ignore
@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
fun test_VeryLong() = runTest {
fun test_VeryLong() = runTest(timeout = 60.seconds) {
val hash = SHA224()
repeat(16_777_216) {
hash.update("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno".encodeToByteArray())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package io.iohk.atala.prism.apollo.hashing.sha2

import io.iohk.atala.prism.apollo.hashing.BaseHashTests
import io.iohk.atala.prism.apollo.hashing.SHA256
import io.iohk.atala.prism.apollo.hashing.internal.JsIgnore
import io.iohk.atala.prism.apollo.hashing.internal.toBinary
import io.iohk.atala.prism.apollo.hashing.internal.toHexString
import kotlinx.coroutines.test.runTest
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.time.Duration.Companion.seconds

class SHA256Tests : BaseHashTests() {
override val valueForHash: List<String>
Expand Down Expand Up @@ -42,9 +42,9 @@ class SHA256Tests : BaseHashTests() {
}

@Test
@JsIgnore
@Ignore
@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
fun test_VeryLong() = runTest {
fun test_VeryLong() = runTest(timeout = 60.seconds) {
val hash = SHA256()
repeat(16_777_216) {
hash.update("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno".encodeToByteArray())
Expand Down
Loading

0 comments on commit 1875403

Please sign in to comment.