mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Explicitly denote util public APIs in japicmp (#1511)
This commit is contained in:
@@ -26,16 +26,25 @@ val japicmp = tasks.register<JapicmpTask>("japicmp") {
|
||||
isIgnoreMissingClasses = true
|
||||
isIncludeSynthetic = true
|
||||
classExcludes = listOf(
|
||||
"com.squareup.moshi.internal.NonNullJsonAdapter", // Internal.
|
||||
"com.squareup.moshi.internal.NullSafeJsonAdapter", // Internal.
|
||||
"com.squareup.moshi.internal.Util", // Internal.
|
||||
"com.squareup.moshi.StandardJsonAdapters", // Package-private
|
||||
"com.squareup.moshi.RecordJsonAdapter\$ComponentBinding", // Package-private
|
||||
"com.squareup.moshi.AdapterMethodsFactory", // Internal.
|
||||
"com.squareup.moshi.ClassJsonAdapter", // Internal.
|
||||
"com.squareup.moshi.RecordJsonAdapter\$ComponentBinding", // Package-private
|
||||
"com.squareup.moshi.StandardJsonAdapters", // Package-private
|
||||
"com.squareup.moshi.internal.NonNullJsonAdapter", // Internal.
|
||||
"com.squareup.moshi.internal.NullSafeJsonAdapter", // Internal.
|
||||
"com.squareup.moshi.internal.Util\$GenericArrayTypeImpl", // Internal.
|
||||
"com.squareup.moshi.internal.Util\$ParameterizedTypeImpl", // Internal.
|
||||
"com.squareup.moshi.internal.Util\$WildcardTypeImpl", // Internal.
|
||||
)
|
||||
methodExcludes = listOf(
|
||||
"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[])",
|
||||
"com.squareup.moshi.internal.Util#jsonAnnotations(java.lang.reflect.AnnotatedElement)",
|
||||
"com.squareup.moshi.internal.Util#jsonName(java.lang.String, com.squareup.moshi.Json)",
|
||||
"com.squareup.moshi.internal.Util#jsonName(java.lang.String, java.lang.reflect.AnnotatedElement)",
|
||||
"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(
|
||||
"com.squareup.moshi.CollectionJsonAdapter#FACTORY", // False-positive, class is not public anyway
|
||||
|
@@ -60,6 +60,7 @@ private val METADATA: Class<out Annotation>? = try {
|
||||
|
||||
// We look up the constructor marker separately because Metadata might be (justifiably)
|
||||
// stripped by R8/Proguard but the DefaultConstructorMarker is still present.
|
||||
@JvmField
|
||||
public val DEFAULT_CONSTRUCTOR_MARKER: Class<*>? = try {
|
||||
Class.forName("kotlin.jvm.internal.DefaultConstructorMarker")
|
||||
} catch (ignored: ClassNotFoundException) {
|
||||
|
Reference in New Issue
Block a user