Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into kenken/pass_clock_to_…
Browse files Browse the repository at this point in the history
…controll_time_in_preview
  • Loading branch information
tkhs0604 committed Sep 17, 2023
2 parents 046fba6 + ae4742f commit d456d3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@ package io.github.droidkaigi.confsched2023.primitive
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.get
import org.jetbrains.kotlin.gradle.plugin.KaptExtension

@Suppress("unused")
class KmpAndroidHiltPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("kotlin-kapt")
apply("com.google.devtools.ksp")
apply("dagger.hilt.android.plugin")
}
kotlin {
sourceSets.getByName("androidMain") {
val kaptConfiguration = configurations["kapt"]
kaptConfiguration.dependencies.add(
val kspConfiguration = configurations["kspAndroid"]
kspConfiguration.dependencies.add(
libs.library("daggerHiltAndroidCompiler").let {
DefaultExternalModuleDependency(
it.module.group,
Expand All @@ -34,9 +32,6 @@ class KmpAndroidHiltPlugin : Plugin<Project> {
}
}
}
extensions.configure<KaptExtension> {
correctErrorTypes = true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ import org.gradle.api.plugins.ExtensionAware
import org.gradle.kotlin.dsl.DependencyHandlerScope
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions

fun DependencyHandlerScope.kapt(
artifact: MinimalExternalModuleDependency,
) {
add("kapt", artifact)
}

fun TestedExtension.kotlinOptions(block: KotlinJvmOptions.() -> Unit) {
(this as ExtensionAware).extensions.configure("kotlinOptions", block)
}
Expand Down

0 comments on commit d456d3f

Please sign in to comment.