Didier Villevalois
12/28/2025, 1:47 PMDidier Villevalois
12/28/2025, 1:49 PM// `UsesKotlinNativeBundleBuildService` and `KotlinNativeProvider` are `internal` KGP APIs
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
abstract class ClangKonanTask<T : ClangKonanTask<T>>(
@get:Input val konanTarget: KonanTarget,
taskType: KClass<T>
) : AbstractExecTask<T>(taskType.java), UsesKotlinNativeBundleBuildService {
@get:OutputDirectory
val outputDirectory: DirectoryProperty = objectFactory.directoryProperty().convention(
project.layout.dir(
project.provider {
temporaryDirFactory.create()!!
}
)
)
protected abstract fun setup()
final override fun exec() {
val bundleService = kotlinNativeBundleBuildService.get()
// recreate output directory
outputDirectory.get().asFile.apply {
deleteRecursively()
mkdirs()
}
// clang will produce output into the current working directory
workingDir(outputDirectory.get())
// run clang vis K/N toolchain
executable(bundleService.bundleDirectory.map { "${it.asFile.absolutePath}/bin/run_konan" })
args("clang", "clang", konanTarget.name)
setup()
super.exec()
}
}
But bundleService.bundleDirectory is not defined and I cannot figure out what is the new equivalent.Banee Ishaque K
12/28/2025, 1:59 PMDidier Villevalois
12/28/2025, 2:00 PMBanee Ishaque K
12/28/2025, 2:14 PMbundleService.bundleDirectory comes). You can simply lock that version in your code. Then everything works. But, that is not recommended. Especially in the case of KMP.
You can use git to identify the changes on that source file. Then you can identify where bundleService.bundleDirectory goes (or what replaces that). You can act according to that.
This always works. In my case, I am using kotlin EAP & ktor EAP plugins in most of my KMP projects. And also configured Renovate for dependency updation & GitHub actions (or Azure DevOps Pipelines) to build Renovate PRs. So, Renovate makes PRs whenever a new version is available for any of the dependencies - and there will be no documentation (most of the time). If building pipelines are happy, I simply merge them, otherwise I will deep dive to fix migration problems.Didier Villevalois
12/28/2025, 2:20 PM@get:Internal
private val kotlinNativeProvider = chooseKotlinNativeProvider(
enabledOnCurrenHost = true,
konanTarget = konanTarget,
project = project,
)
Now kotlinNativeProvider has the bundleDirectory property.