Skip to content

Commit

Permalink
Introduce base provider to share implementation details between diffe…
Browse files Browse the repository at this point in the history
…rent providers
  • Loading branch information
whyoleg committed Oct 9, 2024
1 parent a483def commit d774e59
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 12 deletions.
1 change: 1 addition & 0 deletions build-logic/src/main/kotlin/ckbuild/artifacts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ val artifacts
"cryptography-serialization-asn1",
"cryptography-serialization-asn1-modules",
"cryptography-core",
"cryptography-provider-base",
"cryptography-provider-jdk",
"cryptography-provider-apple",
"cryptography-provider-webcrypto",
Expand Down
4 changes: 1 addition & 3 deletions cryptography-providers/apple/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ kotlin {

sourceSets.commonMain.dependencies {
api(projects.cryptographyCore)
implementation(projects.cryptographySerializationPem)
implementation(projects.cryptographySerializationAsn1)
implementation(projects.cryptographySerializationAsn1Modules)
implementation(projects.cryptographyProviderBase)
}
}

Expand Down
3 changes: 3 additions & 0 deletions cryptography-providers/base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Module cryptography-provider-base

Shared implementation details for providers
25 changes: 25 additions & 0 deletions cryptography-providers/base/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
*/

import ckbuild.*

plugins {
id("ckbuild.multiplatform-library")
}

description = "cryptography-kotlin base provider"

kotlin {
jvmTarget()
jsTarget()
nativeTargets()
wasmTargets()

sourceSets.commonMain.dependencies {
api(projects.cryptographyCore)
api(projects.cryptographySerializationPem)
api(projects.cryptographySerializationAsn1)
api(projects.cryptographySerializationAsn1Modules)
}
}
4 changes: 1 addition & 3 deletions cryptography-providers/jdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ kotlin {
sourceSets {
jvmMain.dependencies {
api(projects.cryptographyCore)
implementation(projects.cryptographySerializationPem)
implementation(projects.cryptographySerializationAsn1)
implementation(projects.cryptographySerializationAsn1Modules)
implementation(projects.cryptographyProviderBase)
}
jvmTest.dependencies {
implementation(libs.bouncycastle)
Expand Down
4 changes: 1 addition & 3 deletions cryptography-providers/openssl3/api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ kotlin {

sourceSets.commonMain.dependencies {
api(projects.cryptographyCore)

implementation(projects.cryptographySerializationAsn1)
implementation(projects.cryptographySerializationAsn1Modules)
implementation(projects.cryptographyProviderBase)
}

targets.withType<KotlinNativeTarget>().configureEach {
Expand Down
4 changes: 1 addition & 3 deletions cryptography-providers/webcrypto/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ kotlin {

sourceSets.commonMain.dependencies {
api(projects.cryptographyCore)
implementation(projects.cryptographySerializationPem)
implementation(projects.cryptographySerializationAsn1)
implementation(projects.cryptographySerializationAsn1Modules)
implementation(projects.cryptographyProviderBase)
}
}

Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ projects("cryptography-kotlin") {

// providers
folder("cryptography-providers", prefix = "cryptography-provider") {
module("base")
module("jdk") {
module("android-tests")
}
Expand Down

0 comments on commit d774e59

Please sign in to comment.