tirbofish/dropbear · commit
3d0d680f4c66f792d5cbfe2c4a97306c1338090f
fixed lack of ExperimentalNativeAPI, general housekeeping and some plugin updates. it still doesn't work but hey more to come amirite???
Signature present but could not be verified.
Unverified
@@ -16,6 +16,7 @@ If you might have not realised, all the crates/projects names are after Australi ### Related Projects - [magna-carta](https://github.com/4tkbytes/dropbear/tree/main/magna-carta) is a rust library used to generate compile-time Kotlin/Native and Kotlin/JVM metadata for searching. +- [magna-carta-plugin](https://github.com/4tkbytes/dropbear/tree/main/magna-carta-plugin) is a Gradle plugin for generating metadata during compile time with the help of the magna-carta cli tool. - [dropbear_future-queue](https://github.com/4tkbytes/dropbear/tree/main/dropbear_future-queue) is a handy library for dealing with async in a sync context - [model_to_image](https://github.com/4tkbytes/model_to_image) is a library used to generate thumbnails and images from a 3D model with the help of `russimp-ng` and a custom made rasteriser. _(very crude but usable)_ @@ -35,17 +35,29 @@ class MagnaCartaPlugin : Plugin<Project> { project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") { val kotlin = project.extensions.getByType(KotlinMultiplatformExtension::class) + kotlin.sourceSets.apply { - val jvmMain = getByName("jvmMain") - jvmMain.kotlin.srcDir(generateJvmTask.map { it.outputDir }) + if (names.contains("jvmMain")) { + val jvmMain = getByName("jvmMain") + jvmMain.kotlin.srcDir(generateJvmTask.map { it.outputDir }) + } - val nativeMain = maybeCreate("nativeMain") + val nativeMain = findByName("nativeMain") ?: create("nativeMain") nativeMain.kotlin.srcDir(generateNativeTask.map { it.outputDir }) kotlin.targets.withType(KotlinNativeTarget::class.java) { compilations.getByName("main").defaultSourceSet.dependsOn(nativeMain) } } + + + kotlin.targets.all { + this.compilations.all { + this.compileTaskProvider.configure { + this.dependsOn(generateJvmTask, generateNativeTask) + } + } + } } } }
Large diffs are not rendered by default. Showing the first 50 of 97 lines. Show full diff