@@ -54,19 +54,20 @@ Add the dependencies, based on the Maven modules mentioned above, to your `gradl
5454
5555``` toml
5656[versions ]
57- openssl = " 3.5.2"
57+ openssl = " 3.5.2.0.1"
58+ zstd = " 1.5.7"
5859nativebuilds = " 0.1.0"
5960
6061[libraries ]
6162# KMP wrapper module for libcrypto.a
62- openssl-libcrypto = { module = " com.ensody.nativebuilds:openssl-libcrypto" , version.ref = " openssl" }
63+ nativebuilds- openssl-libcrypto = { module = " com.ensody.nativebuilds:openssl-libcrypto" , version.ref = " openssl" }
6364# KMP wrapper module for libssl.a
64- openssl-libssl = { module = " com.ensody.nativebuilds:openssl-libssl" , version.ref = " openssl" }
65- # Needed to integrate the OpenSSL headers for cinterop (only if you need to call the C API directly)
66- openssl-raw = { module = " com.ensody.nativebuilds:openssl" , version.ref = " openssl" }
65+ nativebuilds- openssl-libssl = { module = " com.ensody.nativebuilds:openssl-libssl" , version.ref = " openssl" }
66+ # Needed to integrate the OpenSSL headers for cinterop (only if you need to call the C API directly).
67+ nativebuilds- openssl-raw = { module = " com.ensody.nativebuilds:openssl" , version.ref = " openssl" }
6768
68- # Note: Most libraries consist of only one binary, so a single entry is sufficient
69- zstd = { module = " com.ensody.nativebuilds:zstd" , version = " 1.5.7 " }
69+ # Most libraries consist of only one binary, so a single dependency is sufficient
70+ nativebuilds- zstd = { module = " com.ensody.nativebuilds:zstd" , version.ref = " zstd " }
7071
7172[plugins ]
7273nativebuilds = { id = " com.ensody.nativebuilds" , version.ref = " nativebuilds" }
@@ -91,19 +92,19 @@ kotlin {
9192
9293 // Add the KMP dependency containing the pre-built static library (the .a file)
9394 sourceSets.nativeMain.dependencies {
94- api(libs.openssl.libcrypto)
95+ api(libs.nativebuilds. openssl.libcrypto)
9596 }
9697
9798 // If you need direct access to the libcrypto/OpenSSL API you have to activate cinterop
9899 // for the OpenSSL header files.
99- // Note: for zstd you'd use the libs.zstd both here and in sourceSets.nativeMain.
100- cinterops(libs.openssl.raw) {
100+ // Note: for zstd you'd use libs.nativebuilds .zstd both here and in sourceSets.nativeMain.
101+ cinterops(libs.nativebuilds. openssl.raw) {
101102 definitionFile.set(file(" src/nativeMain/cinterop/openssl.def" ))
102103 }
103104}
104105```
105106
106- Create ` src/nativeMain/cinterop/openssl.def ` , but focus only on the headers . The native .a is already part of ` api(libs.openssl.libcrypto) ` above.
107+ Create ` src/nativeMain/cinterop/openssl.def ` , but don't define staticLibraries . The native .a is already part of ` api(libs.nativebuilds .openssl.libcrypto) ` above.
107108
108109```
109110package = my.package.openssl
0 commit comments