Skip to content

Commit

Permalink
Declare the extrnal tasks i,compatible with the configuration cache
Browse files Browse the repository at this point in the history
  • Loading branch information
masah517 committed Aug 22, 2023
1 parent 7e67abb commit daec763
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.github.droidkaigi.confsched2023.primitive

import com.google.devtools.ksp.gradle.KspTaskMetadata
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.withType

@Suppress("unused")
class KmpAndroidPlugin : Plugin<Project> {
Expand Down Expand Up @@ -34,6 +36,9 @@ class KmpAndroidPlugin : Plugin<Project> {
}
}
}
tasks.withType<KspTaskMetadata>().configureEach {
notCompatibleWithConfigurationCache("Configuration cache not supported due to serialization")
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package io.github.droidkaigi.confsched2023.primitive
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension

@Suppress("unused")
Expand All @@ -15,6 +16,9 @@ class KmpPlugin : Plugin<Project> {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java) {
kotlinOptions.jvmTarget = "11"
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink>().configureEach {
notCompatibleWithConfigurationCache("Configuration chache not supported for a system property read at configuration time")
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ org.gradle.caching=true
org.gradle.parallel=true
# configuration-cache
org.gradle.configuration-cache=true
org.gradle.configuration-cache-problems=warn
org.gradle.configuration-cache.max-problems=5

# android
android.useAndroidX=true
Expand Down

0 comments on commit daec763

Please sign in to comment.