diff --git a/build.gradle.kts b/build.gradle.kts index a5c7de4..e3a61a0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,8 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { - kotlin("multiplatform") version "1.4.32" - kotlin("plugin.serialization") version "1.4.32" + kotlin("multiplatform") version "1.5.0" + kotlin("plugin.serialization") version "1.5.0" id("maven-publish") id("com.github.johnrengelman.shadow") version "5.2.0" } diff --git a/gradle.properties b/gradle.properties index 28df965..a649d87 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ kotlin.code.style=official -serializationVersion=1.1.0 +serializationVersion=1.2.0 kotlin.mpp.enableGranularSourceSetsMetadata=true kotlin.native.enableDependencyPropagation=false diff --git a/src/linuxX64Main/resources/Dockerfile b/src/linuxX64Main/resources/Dockerfile index 5b95a6b..b93f727 100644 --- a/src/linuxX64Main/resources/Dockerfile +++ b/src/linuxX64Main/resources/Dockerfile @@ -24,9 +24,9 @@ RUN set -x \ ############################################################################### ### Some env variables -ENV OPENSSL_VERSION="1.1.1j" -ENV KOTLIN_VERSION2="1.4.31" -ENV KOTLIN_VERSION="1.4.31" +ENV OPENSSL_VERSION="1.1.1k" +ENV KOTLIN_VERSION2="1.5.0" +ENV KOTLIN_VERSION="1.5.0" RUN set -x \ && wget --no-check-certificate -O /tmp/kotlin-native-linux-${KOTLIN_VERSION}.tar.gz "https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_VERSION2}/kotlin-native-linux-${KOTLIN_VERSION}.tar.gz" \ @@ -51,16 +51,22 @@ RUN set -x \ && cd /tmp/linuxX64/openssl-${OPENSSL_VERSION} \ && ./Configure --prefix=$PWD/dist no-idea no-mdc2 no-rc5 no-shared linux-x86_64 \ && make + && ar -x libssl.a + && ar -x libcrypto.a + && ar -qc libopenssl.a *.o -RUN set -x \ - && cd /tmp/mingwX64/openssl-${OPENSSL_VERSION} \ - && ./Configure --cross-compile-prefix=x86_64-w64-mingw32- no-idea no-mdc2 no-rc5 no-shared mingw64 \ - && make +#RUN set -x \ +# && cd /tmp/mingwX64/openssl-${OPENSSL_VERSION} \ +# && ./Configure --cross-compile-prefix=x86_64-w64-mingw32- no-idea no-mdc2 no-rc5 no-shared mingw64 \ +# && make RUN set -x \ && cd /tmp/linuxArm32Hfp/openssl-${OPENSSL_VERSION} \ && ./Configure no-idea no-mdc2 no-rc5 no-shared no-asm --cross-compile-prefix=arm-linux-gnueabihf- linux-armv4 \ && make + && ar -x libssl.a + && ar -x libcrypto.a + && ar -qc libopenssl.a *.o COPY openssl.def /tmp/ diff --git a/src/linuxX64Main/resources/openssl.def b/src/linuxX64Main/resources/openssl.def index 014d587..a1e6456 100644 --- a/src/linuxX64Main/resources/openssl.def +++ b/src/linuxX64Main/resources/openssl.def @@ -1,10 +1,10 @@ headers = openssl/ssl.h openssl/err.h openssl/bio.h openssl/pem.h openssl/pkcs12.h headerFilter = openssl/* package = openssl -staticLibraries = libssl.a libcrypto.a -compilerOpts.linux_x64 = -I/tmp/linuxX64/openssl-1.1.1j/include -libraryPaths.linux_x64 = /tmp/linuxX64/openssl-1.1.1j -compilerOpts.mingw_x64 = -I/tmp/mingwX64/openssl-1.1.1j/include -libraryPaths.mingw_x64 = /tmp/mingwX64/openssl-1.1.1j -compilerOpts.linux_arm32_hfp = -I/tmp/linuxArm32Hfp/openssl-1.1.1j/include -libraryPaths.linux_arm32_hfp = /tmp/linuxArm32Hfp/openssl-1.1.1j +# TODO should be libssl.a libcrypto.a but it doesn't compile in the correct order, check resources/Dockerfile for the merge commands +staticLibraries = libopenssl.a +compilerOpts.linux_x64 = -I/tmp/linuxX64/openssl-1.1.1k/include +libraryPaths.linux_x64 = /tmp/linuxX64/openssl-1.1.1k +compilerOpts.linux_arm32_hfp = -I/tmp/linuxArm32Hfp/openssl-1.1.1k/include +libraryPaths.linux_arm32_hfp = /tmp/linuxArm32Hfp/openssl-1.1.1k +# For mingw_x64 check nativeInterop/openssl.def diff --git a/src/nativeInterop/openssl-linux-arm32-hfp.klib b/src/nativeInterop/openssl-linux-arm32-hfp.klib index 6b0faa2..ee5e5a5 100644 Binary files a/src/nativeInterop/openssl-linux-arm32-hfp.klib and b/src/nativeInterop/openssl-linux-arm32-hfp.klib differ diff --git a/src/nativeInterop/openssl-linux-x64.klib b/src/nativeInterop/openssl-linux-x64.klib index fd203f3..829b106 100644 Binary files a/src/nativeInterop/openssl-linux-x64.klib and b/src/nativeInterop/openssl-linux-x64.klib differ diff --git a/src/nativeInterop/openssl-mingw-x64.klib b/src/nativeInterop/openssl-mingw-x64.klib index 1284c22..8d612b6 100644 Binary files a/src/nativeInterop/openssl-mingw-x64.klib and b/src/nativeInterop/openssl-mingw-x64.klib differ diff --git a/src/nativeInterop/openssl.def b/src/nativeInterop/openssl.def index 1b73089..9e21c8b 100644 --- a/src/nativeInterop/openssl.def +++ b/src/nativeInterop/openssl.def @@ -4,4 +4,4 @@ package = openssl staticLibraries = libssl.lib libcrypto.lib compilerOpts.mingw_x64 = -I"C:\\Program Files\\OpenSSL-Win64\\include" libraryPaths.mingw_x64 = "C:\\Program Files\\OpenSSL-Win64\\lib" -# C:\Users\39340\.konan\kotlin-native-prebuilt-windows-1.4.31\bin\cinterop.bat -def .\openssl.def -target "mingw_x64" -o openssl +# C:\Users\39340\.konan\kotlin-native-prebuilt-windows-1.5\bin\cinterop.bat -def .\openssl.def -target "mingw_x64" -o openssl