tapchicoma
03/21/2024, 12:52 PMJavier
03/21/2024, 1:41 PMtapchicoma
03/21/2024, 1:49 PMDmitrii Krasnov
03/21/2024, 1:55 PMJavier
03/21/2024, 1:57 PMDmitrii Krasnov
03/21/2024, 1:59 PMJavier
03/21/2024, 2:00 PMlouiscad
03/22/2024, 8:10 PMRick Clephas
03/23/2024, 8:44 PMnativeHome
to be available.tapchicoma
03/25/2024, 9:20 PMIs there any way to manually depend on the native compiler from a Gradle task?Not in this initial implementation, eventually we want to add into KGP API some interface like
UsesKotlinNativeCompiler
which tasks should implement to get K/N compiler compiler/tools (similar to Gradle JDK toolchain).
Could you show how you used it so far?Rick Clephas
03/25/2024, 9:26 PMtapchicoma
03/25/2024, 9:28 PMIs it going to break the CompletKotlin Gradle plugin?Looking at the code of CompletKotlin Gradle plugin - I am not sure. Native toolchain adds marker file into downloaded K/N distribution
provisioned.ok
to check if distribution was provisioned correctly. So it seems will override distribution provided by CompletKotlin plugin. The best way is to check your plugin against Beta5 and report any issues in this thread.
Generally it is also possible to disable native toolchain feature via kotlin.native.toolchain.enabled
Gradle propertytapchicoma
03/25/2024, 9:36 PMFor now I have added a call to downloadIfNeeded to workaround this. But that obviously isn’t a great idea.Looks like it is ok workaround as a temporary solution. Please open an issue describing your use-case.
tapchicoma
03/25/2024, 9:39 PMtasks.test {
val downloadedNativeCompilerPath = project.provider {
val compilerDownloader = NativeCompilerDownloader(project)
compilerDownloader.downloadIfNeeded()
compilerDownloader.compilerDirectory.absolutePath
}
doFirst {
systemProperty("kotlin.internal.native.test.nativeHome", downloadedNativeCompilerPath.get())
}
}
Rick Clephas
03/26/2024, 7:44 AM