Skip to content

Commit 490ab7c

Browse files
committed
Introduce base provider to share implementation details between different providers
1 parent a861a73 commit 490ab7c

File tree

8 files changed

+34
-12
lines changed

8 files changed

+34
-12
lines changed

build-logic/src/main/kotlin/ckbuild/artifacts.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ val artifacts
1313
"cryptography-serialization-asn1",
1414
"cryptography-serialization-asn1-modules",
1515
"cryptography-core",
16+
"cryptography-provider-base",
1617
"cryptography-provider-jdk",
1718
"cryptography-provider-apple",
1819
"cryptography-provider-webcrypto",

cryptography-providers/apple/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ kotlin {
2727

2828
sourceSets.commonMain.dependencies {
2929
api(projects.cryptographyCore)
30-
implementation(projects.cryptographySerializationPem)
31-
implementation(projects.cryptographySerializationAsn1)
32-
implementation(projects.cryptographySerializationAsn1Modules)
30+
implementation(projects.cryptographyProviderBase)
3331
}
3432
}
3533

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Module cryptography-provider-base
2+
3+
Shared implementation details for providers
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
3+
*/
4+
5+
import ckbuild.*
6+
7+
plugins {
8+
id("ckbuild.multiplatform-library")
9+
}
10+
11+
description = "cryptography-kotlin base provider"
12+
13+
kotlin {
14+
jvmTarget()
15+
jsTarget()
16+
nativeTargets()
17+
wasmTargets()
18+
19+
sourceSets.commonMain.dependencies {
20+
api(projects.cryptographyCore)
21+
api(projects.cryptographySerializationPem)
22+
api(projects.cryptographySerializationAsn1)
23+
api(projects.cryptographySerializationAsn1Modules)
24+
}
25+
}

cryptography-providers/jdk/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ kotlin {
2626
sourceSets {
2727
jvmMain.dependencies {
2828
api(projects.cryptographyCore)
29-
implementation(projects.cryptographySerializationPem)
30-
implementation(projects.cryptographySerializationAsn1)
31-
implementation(projects.cryptographySerializationAsn1Modules)
29+
implementation(projects.cryptographyProviderBase)
3230
}
3331
jvmTest.dependencies {
3432
implementation(libs.bouncycastle)

cryptography-providers/openssl3/api/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ kotlin {
3030

3131
sourceSets.commonMain.dependencies {
3232
api(projects.cryptographyCore)
33-
34-
implementation(projects.cryptographySerializationAsn1)
35-
implementation(projects.cryptographySerializationAsn1Modules)
33+
implementation(projects.cryptographyProviderBase)
3634
}
3735

3836
targets.withType<KotlinNativeTarget>().configureEach {

cryptography-providers/webcrypto/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ kotlin {
2727

2828
sourceSets.commonMain.dependencies {
2929
api(projects.cryptographyCore)
30-
implementation(projects.cryptographySerializationPem)
31-
implementation(projects.cryptographySerializationAsn1)
32-
implementation(projects.cryptographySerializationAsn1Modules)
30+
implementation(projects.cryptographyProviderBase)
3331
}
3432
}
3533

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ projects("cryptography-kotlin") {
4646

4747
// providers
4848
folder("cryptography-providers", prefix = "cryptography-provider") {
49+
module("base")
4950
module("jdk") {
5051
module("android-tests")
5152
}

0 commit comments

Comments
 (0)