Skip to content

Commit

Permalink
fix iOS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Mar 18, 2024
1 parent 49a7991 commit fd04bfd
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
distribution: 'temurin'
java-version: '17'
- name: Publish to Maven Local
run: ./gradlew clean publishToMavenLocal
run: ./gradlew -Dpublishing.excludeIncludedBuilds=true clean publishToMavenLocal
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PUBLISH_SIGNING_KEYID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PUBLISH_SIGNING_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
distribution: 'temurin'
java-version: '17'
- name: Publish to Sonatype
run: ./gradlew clean publishToSonatype closeSonatypeStagingRepository
run: ./gradlew -Dpublishing.excludeIncludedBuilds=true clean publishToSonatype closeSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PUBLISH_SIGNING_KEYID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PUBLISH_SIGNING_KEY }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Release NEXT:
- Improve interoperability with verifiers and issuers from <https://github.com/eu-digital-identity-wallet/>
- `OidcSiopVerifier`: Move `credentialScheme` from constructor to `createAuthnRequest`
- FIX: Add KMP-Crypto to iOS exports
- Add switch to disable composite build (useful for publishing)

Release 3.4.0:
- Target Java 17
Expand Down
3 changes: 3 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ sonatypeUsername=<user-token-name>
sonatypePassword=<user-token-password>
```

In addition, it is highly recommended to set the System property `publishing.excludeIncludedBuilds` to `true`, to
build artefacts for publishing, which **do no** depend on included builds.

To run the pipeline from GitHub, export your GPG key with `gpg --export-secret-keys --armor <keyid> | tee <keyid>.asc` and set the following environment variables:

```shell
Expand Down
5 changes: 4 additions & 1 deletion conventions-vclib/src/main/kotlin/VcLibConventions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ inline fun commonApiDependencies() = listOf(
"at.asitplus.crypto:datatypes-cose:${VcLibVersions.kmpcrypto}",
"at.asitplus.crypto:datatypes-jws:${VcLibVersions.kmpcrypto}",
datetime(),
"com.benasher44:uuid:${VcLibVersions.uuid}",
"com.squareup.okio:okio:${VcLibVersions.okio}",
"at.asitplus.crypto:datatypes:${VcLibVersions.kmpcrypto}", //for iosExport
"io.matthewnelson.kotlin-components:encoding-base16:${VcLibVersions.encoding}",
"io.matthewnelson.kotlin-components:encoding-base64:${VcLibVersions.encoding}"
)
Expand All @@ -25,14 +25,17 @@ inline fun KotlinDependencyHandler.commonImplementationAndApiDependencies() {
commonApiDependencies().forEach { dep -> api(dep) }
commonImplementationDependencies()
}

inline fun KotlinDependencyHandler.commonImplementationDependencies() {
implementation(ktor("http"))
implementation(napier())
implementation(ktor("utils"))
implementation("com.benasher44:uuid:${VcLibVersions.uuid}")
}

fun commonIosExports() = arrayOf(
datetime(),
"com.ionspin.kotlin:bignum:${VcLibVersions.bignum}",
kmmresult(),
"at.asitplus.crypto:datatypes:${VcLibVersions.kmpcrypto}",
"at.asitplus.crypto:datatypes-cose:${VcLibVersions.kmpcrypto}",
Expand Down
3 changes: 2 additions & 1 deletion conventions-vclib/src/main/kotlin/VcLibVersions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ object VcLibVersions {
const val resultlib = "1.5.3"
const val encoding = "1.2.3"
const val okio = "3.5.0"
const val kmpcrypto = "2.3.0"
const val kmpcrypto = "2.5.0-SNAPSHOT"
const val bignum = "0.3.9"

object Jvm {
const val `jose-jwt` = "9.31"
Expand Down
2 changes: 1 addition & 1 deletion kmp-crypto
21 changes: 14 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@ pluginManagement {
}
}


includeBuild("kmp-crypto") {
dependencySubstitution {
substitute(module("at.asitplus.crypto:datatypes")).using(project(":datatypes"))
substitute(module("at.asitplus.crypto:datatypes-jws")).using(project(":datatypes-jws"))
substitute(module("at.asitplus.crypto:datatypes-cose")).using(project(":datatypes-cose"))
if (System.getProperty("publishing.excludeIncludedBuilds") != "true") {
includeBuild("kmp-crypto") {
dependencySubstitution {
substitute(module("at.asitplus.crypto:datatypes")).using(project(":datatypes"))
substitute(module("at.asitplus.crypto:datatypes-jws")).using(
project(
":datatypes-jws"
)
)
substitute(module("at.asitplus.crypto:datatypes-cose")).using(
project(":datatypes-cose")
)
}
}
}
} else logger.lifecycle("Excluding KMP Crypto from this build")

rootProject.name = "vclibrary"
include(":vclib")
Expand Down

0 comments on commit fd04bfd

Please sign in to comment.