mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Add KSP2 testing
This commit is contained in:
@@ -11,19 +11,27 @@ plugins {
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.addAll(
|
||||
"-opt-in=com.squareup.kotlinpoet.metadata.KotlinPoetMetadataPreview",
|
||||
"-opt-in=com.squareup.moshi.kotlin.codegen.api.InternalMoshiCodegenApi",
|
||||
optIn.addAll(
|
||||
"com.squareup.kotlinpoet.metadata.KotlinPoetMetadataPreview",
|
||||
"com.squareup.moshi.kotlin.codegen.api.InternalMoshiCodegenApi",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.compileTestKotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-opt-in=org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi")
|
||||
optIn.add("org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
// KSP2 needs more memory to run until 1.0.21
|
||||
minHeapSize = "2048m"
|
||||
maxHeapSize = "2048m"
|
||||
// Disable the annoying GradleWorkerMain apps that pop up while running
|
||||
jvmArgs("-Djava.awt.headless=true")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":moshi"))
|
||||
api(libs.kotlinpoet)
|
||||
|
Reference in New Issue
Block a user