mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Update dependencies + Kotlin 1.7 + KotlinPoet 1.12.0 (#1543)
This commit is contained in:
@@ -16,10 +16,10 @@ tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
@Suppress("SuspiciousCollectionReassignment")
|
||||
freeCompilerArgs += listOf(
|
||||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
"-Xopt-in=com.squareup.kotlinpoet.metadata.KotlinPoetMetadataPreview",
|
||||
"-Xopt-in=com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview",
|
||||
"-Xopt-in=com.squareup.moshi.kotlin.codegen.api.InternalMoshiCodegenApi",
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
"-opt-in=com.squareup.kotlinpoet.metadata.KotlinPoetMetadataPreview",
|
||||
"-opt-in=com.squareup.kotlinpoet.ksp.KotlinPoetKspPreview",
|
||||
"-opt-in=com.squareup.moshi.kotlin.codegen.api.InternalMoshiCodegenApi",
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,6 @@ val shade: Configuration = configurations.maybeCreate("compileShaded")
|
||||
configurations.getByName("compileOnly").extendsFrom(shade)
|
||||
dependencies {
|
||||
implementation(project(":moshi"))
|
||||
implementation(kotlin("reflect"))
|
||||
shade(libs.kotlinxMetadata) {
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
|
||||
}
|
||||
@@ -54,10 +53,7 @@ dependencies {
|
||||
exclude(group = "com.squareup", module = "kotlinpoet")
|
||||
exclude(group = "com.google.guava")
|
||||
}
|
||||
shade(libs.kotlinpoet.ksp) {
|
||||
exclude(group = "org.jetbrains.kotlin")
|
||||
exclude(group = "com.squareup", module = "kotlinpoet")
|
||||
}
|
||||
implementation(libs.kotlinpoet.ksp)
|
||||
implementation(libs.guava)
|
||||
implementation(libs.asm)
|
||||
|
||||
@@ -72,6 +68,7 @@ dependencies {
|
||||
testImplementation(libs.ksp)
|
||||
testImplementation(libs.ksp.api)
|
||||
testImplementation(libs.kotlin.compilerEmbeddable)
|
||||
testImplementation(libs.kotlin.annotationProcessingEmbeddable)
|
||||
testImplementation(libs.kotlinCompileTesting.ksp)
|
||||
|
||||
// Copy these again as they're not automatically included since they're shaded
|
||||
|
@@ -184,7 +184,7 @@ public class AdapterGenerator(
|
||||
|
||||
val generatedAdapter = generateType().let(typeHook)
|
||||
val result = FileSpec.builder(className.packageName, adapterName)
|
||||
result.addComment("Code generated by moshi-kotlin-codegen. Do not edit.")
|
||||
result.addFileComment("Code generated by moshi-kotlin-codegen. Do not edit.")
|
||||
result.addAnnotation(COMMON_SUPPRESS)
|
||||
result.addType(generatedAdapter)
|
||||
val proguardConfig = if (generateProguardRules) {
|
||||
|
Reference in New Issue
Block a user