app.cash.sqldelight.gradle.kotlin.LinkSqlite.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugin Show documentation
Show all versions of gradle-plugin Show documentation
Gradle plugin for generating kotlin interfaces for sqlite files
package app.cash.sqldelight.gradle.kotlin
import org.gradle.api.Project
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeCompilation
fun Project.linkSqlite() {
val extension = project.extensions.findByType(KotlinMultiplatformExtension::class.java) ?: return
extension.targets
.flatMap { it.compilations }
.filterIsInstance()
.forEach { compilationUnit ->
compilationUnit.kotlinOptions.freeCompilerArgs += arrayOf("-linker-options", "-lsqlite3")
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy