Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test K2 Kapt #1560

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompilerOptions
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin
import org.jetbrains.kotlin.gradle.targets.js.ir.DefaultIncrementalSyncTask
Expand Down Expand Up @@ -168,22 +167,13 @@ subprojects {
val hasCompose = !project.hasProperty("circuit.noCompose")
plugins.withType<KotlinBasePlugin> {
tasks.withType<KotlinCompilationTask<*>>().configureEach {
// Don't double apply to stub gen
if (this is KaptGenerateStubsTask) {
// TODO due to Anvil we need to force language version 1.9
compilerOptions {
progressiveMode.set(false)
languageVersion.set(KotlinVersion.KOTLIN_1_9)
}
return@configureEach
}
val isWasmTask = name.contains("wasm", ignoreCase = true)
compilerOptions {
if (isWasmTask && this is KotlinJsCompilerOptions) {
// TODO https://youtrack.jetbrains.com/issue/KT-64115
allWarningsAsErrors.set(false)
} else {
allWarningsAsErrors.set(true)
allWarningsAsErrors.set(false)
}
if (this is KotlinJvmCompilerOptions) {
jvmTarget.set(
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ android.lint.useK2Uast=true
ksp.useKSP2=true

# Use Kapt4 in K2
# TODO doesn't work with Anvil yet
kapt.use.k2=false
kapt.use.k2=true

org.gradle.parallel=true
org.gradle.configureondemand=true
Expand Down
Loading