Skip to content

Commit

Permalink
Introduce kmp native coroutines
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Aug 22, 2023
1 parent f625f17 commit 0879708
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-ios-shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id("droidkaigi.primitive.kmp")
id("droidkaigi.primitive.kmp.ios")
id("droidkaigi.primitive.kover")
id("droidkaigi.primitive.kmp.native.coroutines")
}

kotlin {
Expand Down
5 changes: 5 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ gradlePlugin {
id = "droidkaigi.primitive.kmp.compose"
implementationClass = "io.github.droidkaigi.confsched2023.primitive.KmpComposePlugin"
}
register("kotlinMppNativeCoroutines") {
id = "droidkaigi.primitive.kmp.native.coroutines"
implementationClass = "io.github.droidkaigi.confsched2023.primitive.KmpNativeCoroutinesPlugin"
}
register("kotlinMppKtorfit") {
id = "droidkaigi.primitive.kmp.ktorfit"
implementationClass = "io.github.droidkaigi.confsched2023.primitive.KmpKtorfitPlugin"
Expand All @@ -101,6 +105,7 @@ gradlePlugin {
implementationClass = "io.github.droidkaigi.confsched2023.primitive.DetektPlugin"
}


// Conventions
register("androidFeature") {
id = "droidkaigi.convention.androidfeature"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.github.droidkaigi.confsched2023.primitive

import org.gradle.api.Plugin
import org.gradle.api.Project

@Suppress("unused")
class KmpNativeCoroutinesPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply(libs.plugin("kspGradlePlugin").pluginId)
apply("com.rickclephas.kmp.nativecoroutines")
}
kotlin {
sourceSets.all {
languageSettings.optIn("kotlin.experimental.ExperimentalObjCName")
}
}
}
}
}
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ roborazziGradlePlugin = { id = "io.github.takahirom.roborazzi", version.ref = "r
kspGradlePlugin = { id = "com.google.devtools.ksp", version.ref = "ksp" }
kotlinxKover = { id = "org.jetbrains.kotlinx.kover", version = "0.7.3" }
detektGradlePlugin = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
kmpNativeCoroutines = { id = "com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin", veresion = "1.0.0-ALPHA-17" }

[bundles]
plugins = [
Expand Down

0 comments on commit 0879708

Please sign in to comment.