From 55ec56fd4aa4df5a62e4407d2a8143b235c6f437 Mon Sep 17 00:00:00 2001 From: Phillip Schichtel Date: Wed, 3 Jul 2024 00:29:25 +0200 Subject: [PATCH] add dockcross as a submodule --- .gitmodules | 3 +++ .../kotlin/tel.schich.javacan.convention.native.gradle.kts | 4 ++-- dockcross | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 160000 dockcross diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c2b3e7b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dockcross"] + path = dockcross + url = ../dockcross-gradle-plugin.git diff --git a/conventions/src/main/kotlin/tel.schich.javacan.convention.native.gradle.kts b/conventions/src/main/kotlin/tel.schich.javacan.convention.native.gradle.kts index a665e2e..cd6fcf6 100644 --- a/conventions/src/main/kotlin/tel.schich.javacan.convention.native.gradle.kts +++ b/conventions/src/main/kotlin/tel.schich.javacan.convention.native.gradle.kts @@ -87,8 +87,7 @@ fun DockcrossRunTask.baseConfigure(linkMode: NativeLinkMode, outputTo: Directory dependsOn(tasks.compileJava) - val toolchainHome = javaToolchains.launcherFor(java.toolchain).map { it.metadata.installationPath } - javaHome = toolchainHome + javaHome = javaToolchains.launcherFor(java.toolchain).map { it.metadata.installationPath } output = outputTo.dir("native") val relativePathToProject = output.get().asFile.toPath().relativize(project.layout.projectDirectory.asFile.toPath()).toString() @@ -163,6 +162,7 @@ for (target in targets) { val nativeForHostOutputDir: Directory = project.layout.buildDirectory.dir("dockcross/host").get() val compileNativeForHost by tasks.registering(DockcrossRunTask::class) { baseConfigure(NativeLinkMode.DYNAMIC, nativeForHostOutputDir) + image = "host" runner(NonContainerRunner) } diff --git a/dockcross b/dockcross new file mode 160000 index 0000000..95399d3 --- /dev/null +++ b/dockcross @@ -0,0 +1 @@ +Subproject commit 95399d33abb0b08f1b39f0f07f267140414cc01e