Skip to content

Commit

Permalink
Update Kotlin to 1.5.0 and OpenSSL to 1.1.1k
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepianca98 committed May 15, 2021
1 parent a639b37 commit 4b6bb40
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 18 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kotlin.code.style=official
serializationVersion=1.1.0
serializationVersion=1.2.0
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
20 changes: 13 additions & 7 deletions src/linuxX64Main/resources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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/

Expand Down
14 changes: 7 additions & 7 deletions src/linuxX64Main/resources/openssl.def
Original file line number Diff line number Diff line change
@@ -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
Binary file modified src/nativeInterop/openssl-linux-arm32-hfp.klib
Binary file not shown.
Binary file modified src/nativeInterop/openssl-linux-x64.klib
Binary file not shown.
Binary file modified src/nativeInterop/openssl-mingw-x64.klib
Binary file not shown.
2 changes: 1 addition & 1 deletion src/nativeInterop/openssl.def
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4b6bb40

Please sign in to comment.