From e06ece7eb4951fecb458603b2c713cb1c2cddcfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernd=20Pr=C3=BCnster?= Date: Wed, 11 Oct 2023 11:08:07 +0200 Subject: [PATCH] add KMP Crypto Composite Build --- .gitmodules | 5 ++++- conventions-vclib/build.gradle.kts | 16 +--------------- conventions-vclib/gradle-conventions-plugin | 2 +- .../src/main/kotlin/VcLibVersions.kt | 1 + gradle.properties | 1 + kmp-crypto | 1 + settings.gradle.kts | 8 ++++++++ vclib/build.gradle.kts | 2 ++ 8 files changed, 19 insertions(+), 17 deletions(-) create mode 160000 kmp-crypto diff --git a/.gitmodules b/.gitmodules index 5fe9be192..3d799b328 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "conventions-vclib/gradle-conventions-plugin"] path = conventions-vclib/gradle-conventions-plugin - url = https://github.com/a-sit-plus/gradle-conventions-plugin.git + url = https://github.com/a-sit-plus/gradle-conventions-plugin.git +[submodule "kmp-crypto"] + path = kmp-crypto + url = git@github.com:a-sit-plus/kmp-crypto.git diff --git a/conventions-vclib/build.gradle.kts b/conventions-vclib/build.gradle.kts index 7c9fe6f49..2591b2efc 100644 --- a/conventions-vclib/build.gradle.kts +++ b/conventions-vclib/build.gradle.kts @@ -4,12 +4,6 @@ plugins { } group = "at.asitplus.gradle" -idea { - project { - jdkName = "11" //TODO use from ASP conventions plugin? - } -} - dependencies { api("at.asitplus.gradle:conventions") } @@ -19,15 +13,7 @@ repositories { mavenCentral() gradlePluginPortal() } -kotlin { - jvmToolchain { - (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(11/*TODO share*/)) - } - /*compilerOptions { - languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9) - apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9) - }*/ -} + gradlePlugin { plugins.register("vclib-conventions") { diff --git a/conventions-vclib/gradle-conventions-plugin b/conventions-vclib/gradle-conventions-plugin index 547265c8d..970ed0536 160000 --- a/conventions-vclib/gradle-conventions-plugin +++ b/conventions-vclib/gradle-conventions-plugin @@ -1 +1 @@ -Subproject commit 547265c8d424c42109677da6de274e656c3ebb54 +Subproject commit 970ed0536535b44641dd0417e566d76dfa3387b0 diff --git a/conventions-vclib/src/main/kotlin/VcLibVersions.kt b/conventions-vclib/src/main/kotlin/VcLibVersions.kt index 01319540d..30518364b 100644 --- a/conventions-vclib/src/main/kotlin/VcLibVersions.kt +++ b/conventions-vclib/src/main/kotlin/VcLibVersions.kt @@ -3,6 +3,7 @@ object VcLibVersions { const val resultlib = "1.5.3" const val encoding = "1.2.3" const val okio = "3.5.0" + const val kmpcrypto = "1.0-SNAPSHOT" object Jvm { const val `jose-jwt` = "9.31" diff --git a/gradle.properties b/gradle.properties index 972ae27b5..a212515f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,3 +19,4 @@ kotlin.experimental.tryK2=false org.jetbrains.dokka.classpath.excludePlatformDependencyFiles=true artifactVersion = 3.0.2-SNAPSHOT +#jvm.version=17 \ No newline at end of file diff --git a/kmp-crypto b/kmp-crypto new file mode 160000 index 000000000..77fb58973 --- /dev/null +++ b/kmp-crypto @@ -0,0 +1 @@ +Subproject commit 77fb58973524e8ffabdf19c41e205eebe935754d diff --git a/settings.gradle.kts b/settings.gradle.kts index 38186681d..cf2c3ca2d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -12,3 +12,11 @@ rootProject.name = "vclibrary" include(":vclib") include(":vclib-aries") include(":vclib-openid") + +includeBuild("kmp-crypto") { + dependencySubstitution { + substitute(module("at.asitplus.crypto:datatypse")).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")) + } +} diff --git a/vclib/build.gradle.kts b/vclib/build.gradle.kts index 99b5e0022..5ce27e55f 100644 --- a/vclib/build.gradle.kts +++ b/vclib/build.gradle.kts @@ -22,6 +22,8 @@ kotlin { val commonMain by getting { dependencies { commonImplementationDependencies() + api("at.asitplus.crypto:datatypes-cose:${VcLibVersions.kmpcrypto}") + api("at.asitplus.crypto:datatypes-jws:${VcLibVersions.kmpcrypto}") api(datetime()) api(serialization("cbor")) api("at.asitplus:kmmresult:${VcLibVersions.resultlib}")