mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 07:29:22 +08:00
Update dependency gradle to v8 (#1630)
* Update dependency gradle to v8 * Remove VERSION_CATALOGS feature * Match JDK 19 in toolchain * Update forces + fix japicmp version * ??? * Another * Update japicmp * Update shadow plugin --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Zac Sweers <pandanomic@gmail.com>
This commit is contained in:
@@ -72,7 +72,7 @@ subprojects {
|
||||
pluginManager.withPlugin("java") {
|
||||
configure<JavaPluginExtension> {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(18))
|
||||
languageVersion.set(JavaLanguageVersion.of(19))
|
||||
}
|
||||
}
|
||||
if (project.name != "records-tests") {
|
||||
|
@@ -10,10 +10,10 @@ ktlint = "0.48.2"
|
||||
|
||||
[plugins]
|
||||
dokka = { id = "org.jetbrains.dokka", version = "1.7.20" }
|
||||
japicmp = { id = "me.champeau.gradle.japicmp", version = "0.2.9" }
|
||||
japicmp = { id = "me.champeau.gradle.japicmp", version = "0.4.1" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.24.0" }
|
||||
mavenShadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" }
|
||||
mavenShadow = { id = "com.github.johnrengelman.shadow", version = "8.0.0" }
|
||||
spotless = { id = "com.diffplug.spotless", version = "6.15.0" }
|
||||
|
||||
[libraries]
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@@ -9,22 +9,24 @@ val baseline = configurations.create("baseline")
|
||||
val latest = configurations.create("latest")
|
||||
|
||||
dependencies {
|
||||
baseline("com.squareup.moshi:moshi-adapters:1.13.0") {
|
||||
baseline("com.squareup.moshi:moshi-adapters:1.14.0") {
|
||||
isTransitive = false
|
||||
isForce = true
|
||||
version {
|
||||
strictly("1.14.0")
|
||||
}
|
||||
}
|
||||
latest(project(":moshi-adapters"))
|
||||
}
|
||||
|
||||
val japicmp = tasks.register<JapicmpTask>("japicmp") {
|
||||
dependsOn("jar")
|
||||
oldClasspath = baseline
|
||||
newClasspath = latest
|
||||
isOnlyBinaryIncompatibleModified = true
|
||||
isFailOnModification = true
|
||||
txtOutputFile = file("$buildDir/reports/japi.txt")
|
||||
isIgnoreMissingClasses = true
|
||||
isIncludeSynthetic = true
|
||||
oldClasspath.from(baseline)
|
||||
newClasspath.from(latest)
|
||||
onlyBinaryIncompatibleModified.set(true)
|
||||
failOnModification.set(true)
|
||||
txtOutputFile.set(layout.buildDirectory.file("reports/japi.txt"))
|
||||
ignoreMissingClasses.set(true)
|
||||
includeSynthetic.set(true)
|
||||
}
|
||||
|
||||
tasks.named("check").configure {
|
||||
|
@@ -11,21 +11,23 @@ val latest = configurations.create("latest")
|
||||
dependencies {
|
||||
baseline("com.squareup.moshi:moshi:1.14.0") {
|
||||
isTransitive = false
|
||||
isForce = true
|
||||
version {
|
||||
strictly("1.14.0")
|
||||
}
|
||||
}
|
||||
latest(project(":moshi"))
|
||||
}
|
||||
|
||||
val japicmp = tasks.register<JapicmpTask>("japicmp") {
|
||||
dependsOn("jar")
|
||||
oldClasspath = baseline
|
||||
newClasspath = latest
|
||||
isOnlyBinaryIncompatibleModified = true
|
||||
isFailOnModification = true
|
||||
txtOutputFile = file("$buildDir/reports/japi.txt")
|
||||
isIgnoreMissingClasses = true
|
||||
isIncludeSynthetic = true
|
||||
classExcludes = listOf(
|
||||
oldClasspath.from(baseline)
|
||||
newClasspath.from(latest)
|
||||
onlyBinaryIncompatibleModified.set(true)
|
||||
failOnModification.set(true)
|
||||
txtOutputFile.set(layout.buildDirectory.file("reports/japi.txt"))
|
||||
ignoreMissingClasses.set(true)
|
||||
includeSynthetic.set(true)
|
||||
classExcludes.addAll(
|
||||
"com.squareup.moshi.AdapterMethodsFactory", // Internal.
|
||||
"com.squareup.moshi.ClassJsonAdapter", // Internal.
|
||||
"com.squareup.moshi.RecordJsonAdapter\$ComponentBinding", // Package-private
|
||||
@@ -36,7 +38,7 @@ val japicmp = tasks.register<JapicmpTask>("japicmp") {
|
||||
"com.squareup.moshi.internal.Util\$ParameterizedTypeImpl", // Internal.
|
||||
"com.squareup.moshi.internal.Util\$WildcardTypeImpl", // Internal.
|
||||
)
|
||||
methodExcludes = listOf(
|
||||
methodExcludes.addAll(
|
||||
"com.squareup.moshi.JsonAdapter#indent(java.lang.String)", // Was unintentionally open before
|
||||
"com.squareup.moshi.internal.Util#hasNullable(java.lang.annotation.Annotation[])",
|
||||
"com.squareup.moshi.internal.Util#jsonAnnotations(java.lang.annotation.Annotation[])",
|
||||
@@ -46,7 +48,7 @@ val japicmp = tasks.register<JapicmpTask>("japicmp") {
|
||||
"com.squareup.moshi.internal.Util#resolve(java.lang.reflect.Type, java.lang.Class, java.lang.reflect.Type)",
|
||||
"com.squareup.moshi.internal.Util#typeAnnotatedWithAnnotations(java.lang.reflect.Type, java.util.Set)",
|
||||
)
|
||||
fieldExcludes = listOf(
|
||||
fieldExcludes.addAll(
|
||||
"com.squareup.moshi.CollectionJsonAdapter#FACTORY", // False-positive, class is not public anyway
|
||||
"com.squareup.moshi.MapJsonAdapter#FACTORY", // Class is not public
|
||||
"com.squareup.moshi.ArrayJsonAdapter#FACTORY", // Class is not public
|
||||
|
@@ -364,7 +364,7 @@ public final class JsonQualifiersTest {
|
||||
.hasMessageThat()
|
||||
.isEqualTo(
|
||||
"No @FromJson adapter for class java.lang.String annotated "
|
||||
+ "[@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"
|
||||
+ "[@com.squareup.moshi.JsonQualifiersTest.FooPrefix()]"
|
||||
+ "\nfor class java.lang.String b"
|
||||
+ "\nfor class com.squareup.moshi.JsonQualifiersTest$StringAndFooString");
|
||||
assertThat(expected).hasCauseThat().isInstanceOf(IllegalArgumentException.class);
|
||||
@@ -372,13 +372,13 @@ public final class JsonQualifiersTest {
|
||||
.hasMessageThat()
|
||||
.isEqualTo(
|
||||
"No @FromJson adapter for class java.lang.String "
|
||||
+ "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]");
|
||||
+ "annotated [@com.squareup.moshi.JsonQualifiersTest.FooPrefix()]");
|
||||
assertThat(expected.getCause()).hasCauseThat().isInstanceOf(IllegalArgumentException.class);
|
||||
assertThat(expected.getCause().getCause())
|
||||
.hasMessageThat()
|
||||
.isEqualTo(
|
||||
"No next JsonAdapter for class "
|
||||
+ "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]");
|
||||
+ "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest.FooPrefix()]");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ public final class JsonQualifiersTest {
|
||||
.hasMessageThat()
|
||||
.isEqualTo(
|
||||
"No @ToJson adapter for class java.lang.String annotated "
|
||||
+ "[@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"
|
||||
+ "[@com.squareup.moshi.JsonQualifiersTest.FooPrefix()]"
|
||||
+ "\nfor class java.lang.String b"
|
||||
+ "\nfor class com.squareup.moshi.JsonQualifiersTest$StringAndFooString");
|
||||
assertThat(expected).hasCauseThat().isInstanceOf(IllegalArgumentException.class);
|
||||
@@ -410,13 +410,13 @@ public final class JsonQualifiersTest {
|
||||
.hasMessageThat()
|
||||
.isEqualTo(
|
||||
"No @ToJson adapter for class java.lang.String "
|
||||
+ "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]");
|
||||
+ "annotated [@com.squareup.moshi.JsonQualifiersTest.FooPrefix()]");
|
||||
assertThat(expected.getCause()).hasCauseThat().isInstanceOf(IllegalArgumentException.class);
|
||||
assertThat(expected.getCause().getCause())
|
||||
.hasMessageThat()
|
||||
.isEqualTo(
|
||||
"No next JsonAdapter for class "
|
||||
+ "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]");
|
||||
+ "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest.FooPrefix()]");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -876,7 +876,7 @@ public final class MoshiTest {
|
||||
.hasMessageThat()
|
||||
.isEqualTo(
|
||||
"No JsonAdapter for java.util.List<java.lang.String> "
|
||||
+ "annotated [@com.squareup.moshi.MoshiTest$Uppercase()]");
|
||||
+ "annotated [@com.squareup.moshi.MoshiTest.Uppercase()]");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -893,7 +893,7 @@ public final class MoshiTest {
|
||||
.hasMessageThat()
|
||||
.isEqualTo(
|
||||
"No JsonAdapter for class java.lang.String "
|
||||
+ "annotated [@com.squareup.moshi.MoshiTest$Uppercase()]");
|
||||
+ "annotated [@com.squareup.moshi.MoshiTest.Uppercase()]");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -17,5 +17,3 @@ include(":moshi-kotlin-codegen")
|
||||
include(":moshi-kotlin-tests")
|
||||
include(":moshi-kotlin-tests:codegen-only")
|
||||
include(":moshi-kotlin-tests:extra-moshi-test-module")
|
||||
|
||||
enableFeaturePreview("VERSION_CATALOGS")
|
||||
|
Reference in New Issue
Block a user