From 006372e450a9f32afecff049385946c4d8636b0a Mon Sep 17 00:00:00 2001 From: Tyler Wong Date: Mon, 23 Nov 2020 07:08:21 -0800 Subject: [PATCH] Fix error.NonExistentClass in Metalava Signature Files (#2755) * Fix error.NonExistentClass in Metalava Signature Files * Exclude internal packages * Remove SNAPSHOT version * Fix bad imports * Revert unnecessary changes * Fix matchingFallbacks API call * Bump Version 0.1.1 * Revert AGP and bump Gradle Plugin to 0.1.2 * Revert more unnecessary changes * Plugin 0.1.3 * Add signature file updates from macOS build * Metalava Gradle 0.1.4 --- apollo-android-support/api.txt | 25 +- apollo-api/api.txt | 502 ++++++++++--------- apollo-api/build.gradle.kts | 4 + apollo-coroutines-support/api.txt | 16 +- apollo-gradle-plugin/api.txt | 165 +++--- apollo-gradle-plugin/build.gradle.kts | 4 + apollo-http-cache-api/api.txt | 107 ++-- apollo-http-cache/api.txt | 9 +- apollo-http-cache/build.gradle.kts | 4 + apollo-idling-resource/api.txt | 9 +- apollo-normalized-cache-api/api.txt | 158 +++--- apollo-normalized-cache-api/build.gradle.kts | 4 + apollo-normalized-cache-sqlite/api.txt | 59 ++- apollo-normalized-cache/api.txt | 149 +++--- apollo-normalized-cache/build.gradle.kts | 4 + apollo-runtime/api.txt | 496 +++++++++--------- apollo-runtime/build.gradle.kts | 4 + apollo-rx2-support/api.txt | 24 +- apollo-rx3-support/api.txt | 24 +- buildSrc/build.gradle.kts | 1 + buildSrc/src/main/kotlin/ApiCompatibility.kt | 10 +- buildSrc/src/main/kotlin/DownloadFileTask.kt | 25 - buildSrc/src/main/kotlin/MetalavaHelper.kt | 54 -- gradle/dependencies.gradle | 1 + scripts/ci.sh | 2 +- 25 files changed, 894 insertions(+), 966 deletions(-) delete mode 100644 buildSrc/src/main/kotlin/DownloadFileTask.kt delete mode 100644 buildSrc/src/main/kotlin/MetalavaHelper.kt diff --git a/apollo-android-support/api.txt b/apollo-android-support/api.txt index 9314ae5d156..312285d61be 100644 --- a/apollo-android-support/api.txt +++ b/apollo-android-support/api.txt @@ -1,23 +1,18 @@ +// Signature format: 3.0 package com.apollographql.apollo { - public final class ApolloCallback { - ctor public ApolloCallback(ApolloCall.Callback, Handler); - method public void onFailure(ApolloException); - method public void onHttpError(ApolloHttpException); - method public void onNetworkError(ApolloNetworkException); - method public void onParseError(ApolloParseException); - method public void onResponse(Response); - method public void onStatusEvent(ApolloCall.StatusEvent); - method public static com.apollographql.apollo.ApolloCallback wrap(ApolloCall.Callback, Handler); + public final class ApolloCallback extends com.apollographql.apollo.ApolloCall.Callback { + ctor public ApolloCallback(com.apollographql.apollo.ApolloCall.Callback, android.os.Handler); + method public void onFailure(com.apollographql.apollo.exception.ApolloException); + method public void onResponse(com.apollographql.apollo.api.Response); + method public static com.apollographql.apollo.ApolloCallback! wrap(com.apollographql.apollo.ApolloCall.Callback, android.os.Handler); } - public final class ApolloPrefetchCallback { - ctor public ApolloPrefetchCallback(ApolloPrefetch.Callback, Handler); - method public void onFailure(ApolloException); - method public void onHttpError(ApolloHttpException); - method public void onNetworkError(ApolloNetworkException); + public final class ApolloPrefetchCallback extends com.apollographql.apollo.ApolloPrefetch.Callback { + ctor public ApolloPrefetchCallback(com.apollographql.apollo.ApolloPrefetch.Callback, android.os.Handler); + method public void onFailure(com.apollographql.apollo.exception.ApolloException); method public void onSuccess(); - method public static com.apollographql.apollo.ApolloPrefetchCallback wrap(ApolloPrefetch.Callback, Handler); + method public static com.apollographql.apollo.ApolloPrefetchCallback! wrap(com.apollographql.apollo.ApolloPrefetch.Callback, android.os.Handler); } } diff --git a/apollo-api/api.txt b/apollo-api/api.txt index b549ebe9673..cd808583eab 100644 --- a/apollo-api/api.txt +++ b/apollo-api/api.txt @@ -1,7 +1,8 @@ +// Signature format: 3.0 package com.apollographql.apollo { - public abstract interface Logger { - method public abstract void log(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass...); + public interface Logger { + method public void log(int priority, String message, Throwable? t, java.lang.Object... args); field public static final com.apollographql.apollo.Logger.Companion Companion; field public static final int DEBUG = 3; // 0x3 field public static final int ERROR = 6; // 0x6 @@ -18,172 +19,169 @@ package com.apollographql.apollo { package com.apollographql.apollo.api { - public abstract class ApolloExperimental implements java.lang.annotation.Annotation { + @kotlin.RequiresOptIn(level=RequiresOptIn.Level.WARNING) @kotlin.annotation.MustBeDocumented @kotlin.annotation.Retention(AnnotationRetention.BINARY) public @interface ApolloExperimental { } public final class BigDecimal { - ctor public BigDecimal(error.NonExistentClass); - ctor public BigDecimal(error.NonExistentClass); - ctor public BigDecimal(error.NonExistentClass); - ctor public BigDecimal(error.NonExistentClass); - method public com.apollographql.apollo.api.BigDecimal add(com.apollographql.apollo.api.BigDecimal); - method public com.apollographql.apollo.api.BigDecimal divide(com.apollographql.apollo.api.BigDecimal); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass hashCode(); - method public com.apollographql.apollo.api.BigDecimal multiply(com.apollographql.apollo.api.BigDecimal); + ctor public BigDecimal(String strVal); + ctor public BigDecimal(double doubleVal); + ctor public BigDecimal(int intVal); + ctor public BigDecimal(long longVal); + method public com.apollographql.apollo.api.BigDecimal add(com.apollographql.apollo.api.BigDecimal augend); + method public com.apollographql.apollo.api.BigDecimal divide(com.apollographql.apollo.api.BigDecimal divisor); + method public boolean equals(Object? other); + method public int hashCode(); + method public com.apollographql.apollo.api.BigDecimal multiply(com.apollographql.apollo.api.BigDecimal multiplicand); method public com.apollographql.apollo.api.BigDecimal negate(); - method public error.NonExistentClass signum(); - method public com.apollographql.apollo.api.BigDecimal subtract(com.apollographql.apollo.api.BigDecimal); - method public error.NonExistentClass toByte(); - method public error.NonExistentClass toChar(); - method public error.NonExistentClass toDouble(); - method public error.NonExistentClass toFloat(); - method public error.NonExistentClass toInt(); - method public error.NonExistentClass toLong(); - method public error.NonExistentClass toShort(); - method public error.NonExistentClass toString(); + method public int signum(); + method public com.apollographql.apollo.api.BigDecimal subtract(com.apollographql.apollo.api.BigDecimal subtrahend); + method public byte toByte(); + method public char toChar(); + method public double toDouble(); + method public float toFloat(); + method public int toInt(); + method public long toLong(); + method public short toShort(); + method public String toString(); } public final class BigDecimal { ctor public BigDecimal(); - ctor public BigDecimal(error.NonExistentClass); - ctor public BigDecimal(error.NonExistentClass); - ctor public BigDecimal(error.NonExistentClass); - ctor public BigDecimal(error.NonExistentClass); - method public com.apollographql.apollo.api.BigDecimal add(com.apollographql.apollo.api.BigDecimal); - method public com.apollographql.apollo.api.BigDecimal divide(com.apollographql.apollo.api.BigDecimal); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass hashCode(); - method public com.apollographql.apollo.api.BigDecimal multiply(com.apollographql.apollo.api.BigDecimal); + ctor public BigDecimal(String strVal); + ctor public BigDecimal(double doubleVal); + ctor public BigDecimal(int intVal); + ctor public BigDecimal(long longVal); + method public com.apollographql.apollo.api.BigDecimal add(com.apollographql.apollo.api.BigDecimal augend); + method public com.apollographql.apollo.api.BigDecimal divide(com.apollographql.apollo.api.BigDecimal divisor); + method public boolean equals(Object? other); + method public int hashCode(); + method public com.apollographql.apollo.api.BigDecimal multiply(com.apollographql.apollo.api.BigDecimal multiplicand); method public com.apollographql.apollo.api.BigDecimal negate(); - method public error.NonExistentClass signum(); - method public com.apollographql.apollo.api.BigDecimal subtract(com.apollographql.apollo.api.BigDecimal); - method public error.NonExistentClass toByte(); - method public error.NonExistentClass toChar(); - method public error.NonExistentClass toDouble(); - method public error.NonExistentClass toFloat(); - method public error.NonExistentClass toInt(); - method public error.NonExistentClass toLong(); - method public error.NonExistentClass toShort(); - method public error.NonExistentClass toString(); + method public int signum(); + method public com.apollographql.apollo.api.BigDecimal subtract(com.apollographql.apollo.api.BigDecimal subtrahend); + method public byte toByte(); + method public char toChar(); + method public double toDouble(); + method public float toFloat(); + method public int toInt(); + method public long toLong(); + method public short toShort(); + method public String toString(); } public final class BigDecimalKt { - ctor public BigDecimalKt(); - method public static error.NonExistentClass toNumber(com.apollographql.apollo.api.BigDecimal); + method public static Number toNumber(com.apollographql.apollo.api.BigDecimal); } public final class BigDecimalKt { - ctor public BigDecimalKt(); - method public static error.NonExistentClass toNumber(com.apollographql.apollo.api.BigDecimal); + method public static Number toNumber(com.apollographql.apollo.api.BigDecimal); } public final class BigDecimalKt { - ctor public BigDecimalKt(); - method public static error.NonExistentClass toNumber(com.apollographql.apollo.api.BigDecimal); + method public static Number toNumber(com.apollographql.apollo.api.BigDecimal); } - public abstract interface CustomTypeAdapter { - method public abstract T decode(com.apollographql.apollo.api.CustomTypeValue); - method public abstract com.apollographql.apollo.api.CustomTypeValue encode(T); + public interface CustomTypeAdapter { + method public T! decode(com.apollographql.apollo.api.CustomTypeValue value); + method public com.apollographql.apollo.api.CustomTypeValue encode(T? value); } - public sealed abstract class CustomTypeValue { - method public final T getValue(); + public abstract sealed class CustomTypeValue { + method public static final com.apollographql.apollo.api.CustomTypeValue fromRawValue(Object value); field public static final com.apollographql.apollo.api.CustomTypeValue.Companion Companion; + field public final T? value; } public static final class CustomTypeValue.Companion { - method public com.apollographql.apollo.api.CustomTypeValue fromRawValue(error.NonExistentClass); + method public com.apollographql.apollo.api.CustomTypeValue fromRawValue(Object value); } - public static final class CustomTypeValue.GraphQLBoolean extends com.apollographql.apollo.api.CustomTypeValue { - ctor public CustomTypeValue.GraphQLBoolean(error.NonExistentClass); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass hashCode(); + public static final class CustomTypeValue.GraphQLBoolean extends com.apollographql.apollo.api.CustomTypeValue { + ctor public CustomTypeValue.GraphQLBoolean(boolean value); + method public boolean equals(Object? other); + method public int hashCode(); } - public static final class CustomTypeValue.GraphQLJsonList extends com.apollographql.apollo.api.CustomTypeValue { - ctor public CustomTypeValue.GraphQLJsonList(error.NonExistentClass); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass hashCode(); + public static final class CustomTypeValue.GraphQLJsonList extends com.apollographql.apollo.api.CustomTypeValue> { + ctor public CustomTypeValue.GraphQLJsonList(java.util.List value); + method public boolean equals(Object? other); + method public int hashCode(); } - public static final class CustomTypeValue.GraphQLJsonObject extends com.apollographql.apollo.api.CustomTypeValue { - ctor public CustomTypeValue.GraphQLJsonObject(error.NonExistentClass); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass hashCode(); + public static final class CustomTypeValue.GraphQLJsonObject extends com.apollographql.apollo.api.CustomTypeValue> { + ctor public CustomTypeValue.GraphQLJsonObject(java.util.Map value); + method public boolean equals(Object? other); + method public int hashCode(); } - public static final class CustomTypeValue.GraphQLNull extends com.apollographql.apollo.api.CustomTypeValue { + public static final class CustomTypeValue.GraphQLNull extends com.apollographql.apollo.api.CustomTypeValue { field public static final com.apollographql.apollo.api.CustomTypeValue.GraphQLNull INSTANCE; } - public static final class CustomTypeValue.GraphQLNumber extends com.apollographql.apollo.api.CustomTypeValue { - ctor public CustomTypeValue.GraphQLNumber(error.NonExistentClass); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass hashCode(); + public static final class CustomTypeValue.GraphQLNumber extends com.apollographql.apollo.api.CustomTypeValue { + ctor public CustomTypeValue.GraphQLNumber(Number value); + method public boolean equals(Object? other); + method public int hashCode(); } - public static final class CustomTypeValue.GraphQLString extends com.apollographql.apollo.api.CustomTypeValue { - ctor public CustomTypeValue.GraphQLString(error.NonExistentClass); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass hashCode(); + public static final class CustomTypeValue.GraphQLString extends com.apollographql.apollo.api.CustomTypeValue { + ctor public CustomTypeValue.GraphQLString(String value); + method public boolean equals(Object? other); + method public int hashCode(); } public final class Error { - ctor public Error(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass customAttributes(); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass getCustomAttributes(); - method public error.NonExistentClass getLocations(); - method public error.NonExistentClass getMessage(); - method public error.NonExistentClass hashCode(); - method public error.NonExistentClass locations(); - method public error.NonExistentClass message(); + ctor public Error(String message, java.util.List locations, java.util.Map customAttributes); + method @Deprecated public java.util.Map customAttributes(); + method public boolean equals(Object? other); + method public java.util.Map getCustomAttributes(); + method public java.util.List getLocations(); + method public String getMessage(); + method public int hashCode(); + method @Deprecated public java.util.List locations(); + method @Deprecated public String? message(); } public static final class Error.Location { - ctor public Error.Location(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass column(); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass getColumn(); - method public error.NonExistentClass getLine(); - method public error.NonExistentClass hashCode(); - method public error.NonExistentClass line(); - } - - public abstract interface ExecutionContext { - method public abstract R fold(R, kotlin.jvm.functions.Function2); - method public operator abstract E get(com.apollographql.apollo.api.ExecutionContext.Key); - method public abstract com.apollographql.apollo.api.ExecutionContext minusKey(com.apollographql.apollo.api.ExecutionContext.Key); - method public default operator com.apollographql.apollo.api.ExecutionContext plus(com.apollographql.apollo.api.ExecutionContext); + ctor public Error.Location(long line, long column); + method @Deprecated public long column(); + method public boolean equals(Object? other); + method public long getColumn(); + method public long getLine(); + method public int hashCode(); + method @Deprecated public long line(); + } + + @com.apollographql.apollo.api.ApolloExperimental public interface ExecutionContext { + method public R! fold(R? initial, kotlin.jvm.functions.Function2 operation); + method public operator E? get(com.apollographql.apollo.api.ExecutionContext.Key key); + method public com.apollographql.apollo.api.ExecutionContext minusKey(com.apollographql.apollo.api.ExecutionContext.Key key); + method public default operator com.apollographql.apollo.api.ExecutionContext plus(com.apollographql.apollo.api.ExecutionContext context); field public static final com.apollographql.apollo.api.ExecutionContext.Companion Companion; + field public static final com.apollographql.apollo.api.ExecutionContext Empty; } public static final class ExecutionContext.Companion { - method public com.apollographql.apollo.api.ExecutionContext getEmpty(); - property public final com.apollographql.apollo.api.ExecutionContext Empty; } - public static abstract interface ExecutionContext.Element implements com.apollographql.apollo.api.ExecutionContext { - method public default R fold(R, kotlin.jvm.functions.Function2); - method public default operator E get(com.apollographql.apollo.api.ExecutionContext.Key); - method public abstract com.apollographql.apollo.api.ExecutionContext.Key getKey(); - method public default com.apollographql.apollo.api.ExecutionContext minusKey(com.apollographql.apollo.api.ExecutionContext.Key); + public static interface ExecutionContext.Element extends com.apollographql.apollo.api.ExecutionContext { + method public default R! fold(R? initial, kotlin.jvm.functions.Function2 operation); + method public default operator E? get(com.apollographql.apollo.api.ExecutionContext.Key key); + method public com.apollographql.apollo.api.ExecutionContext.Key getKey(); + method public default com.apollographql.apollo.api.ExecutionContext minusKey(com.apollographql.apollo.api.ExecutionContext.Key key); property public abstract com.apollographql.apollo.api.ExecutionContext.Key key; } - public static abstract interface ExecutionContext.Key { + public static interface ExecutionContext.Key { } public class FileUpload { - ctor public FileUpload(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass contentLength(); - method public error.NonExistentClass fileName(); - method public final error.NonExistentClass getFilePath(); - method public final error.NonExistentClass getMimetype(); - method public void writeTo(error.NonExistentClass); + ctor public FileUpload(String mimetype, String? filePath); + method public long contentLength(); + method public String? fileName(); + method public final String? getFilePath(); + method public final String getMimetype(); + method public void writeTo(okio.BufferedSink sink); field public static final com.apollographql.apollo.api.FileUpload.Companion Companion; } @@ -191,197 +189,210 @@ package com.apollographql.apollo.api { } public final class FileuploadKt { - ctor public FileuploadKt(); - method public static com.apollographql.apollo.api.FileUpload create(com.apollographql.apollo.api.FileUpload.Companion, error.NonExistentClass, error.NonExistentClass); + method public static com.apollographql.apollo.api.FileUpload create(com.apollographql.apollo.api.FileUpload.Companion, String mimetype, String filePath); } - public abstract interface GraphqlFragment { - method public abstract com.apollographql.apollo.api.internal.ResponseFieldMarshaller marshaller(); + public interface GraphqlFragment { + method public com.apollographql.apollo.api.internal.ResponseFieldMarshaller marshaller(); } public final class Input { - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass getDefined(); - method public V getValue(); - method public error.NonExistentClass hashCode(); + method public static com.apollographql.apollo.api.Input absent(); + method public boolean equals(Object? other); + method public static com.apollographql.apollo.api.Input fromNullable(V? value); + method public int hashCode(); + method public static com.apollographql.apollo.api.Input optional(V? value); field public static final com.apollographql.apollo.api.Input.Companion Companion; + field public final boolean defined; + field public final V? value; } public static final class Input.Companion { method public com.apollographql.apollo.api.Input absent(); - method public com.apollographql.apollo.api.Input fromNullable(V); - method public com.apollographql.apollo.api.Input optional(V); + method public com.apollographql.apollo.api.Input fromNullable(V? value); + method public com.apollographql.apollo.api.Input optional(V? value); } - public abstract interface InputType { - method public abstract com.apollographql.apollo.api.internal.InputFieldMarshaller marshaller(); + public interface InputType { + method public com.apollographql.apollo.api.internal.InputFieldMarshaller marshaller(); } public final class KotlinExtensions { - ctor public KotlinExtensions(); - method public static inline com.apollographql.apollo.api.Input toInput(T); - } - - public abstract interface Mutation implements com.apollographql.apollo.api.Operation { - } - - public abstract interface Operation { - method public abstract error.NonExistentClass composeRequestBody(error.NonExistentClass, error.NonExistentClass, com.apollographql.apollo.api.ScalarTypeAdapters); - method public abstract error.NonExistentClass composeRequestBody(com.apollographql.apollo.api.ScalarTypeAdapters); - method public abstract error.NonExistentClass composeRequestBody(); - method public abstract com.apollographql.apollo.api.OperationName name(); - method public abstract error.NonExistentClass operationId(); - method public abstract com.apollographql.apollo.api.Response parse(error.NonExistentClass, com.apollographql.apollo.api.ScalarTypeAdapters); - method public abstract com.apollographql.apollo.api.Response parse(error.NonExistentClass, com.apollographql.apollo.api.ScalarTypeAdapters); - method public abstract com.apollographql.apollo.api.Response parse(error.NonExistentClass); - method public abstract com.apollographql.apollo.api.Response parse(error.NonExistentClass); - method public abstract error.NonExistentClass queryDocument(); - method public abstract com.apollographql.apollo.api.internal.ResponseFieldMapper responseFieldMapper(); - method public abstract V variables(); - method public abstract T wrapData(D); + } + + public interface Mutation extends com.apollographql.apollo.api.Operation { + } + + public interface Operation { + method public okio.ByteString composeRequestBody(boolean autoPersistQueries, boolean withQueryDocument, com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters); + method public okio.ByteString composeRequestBody(com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters); + method public okio.ByteString composeRequestBody(); + method public com.apollographql.apollo.api.OperationName name(); + method public String operationId(); + method public com.apollographql.apollo.api.Response parse(okio.BufferedSource source, com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters); + method public com.apollographql.apollo.api.Response parse(okio.ByteString byteString, com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters); + method public com.apollographql.apollo.api.Response parse(okio.BufferedSource source); + method public com.apollographql.apollo.api.Response parse(okio.ByteString byteString); + method public String queryDocument(); + method public com.apollographql.apollo.api.internal.ResponseFieldMapper responseFieldMapper(); + method public V variables(); + method public T? wrapData(D? data); field public static final com.apollographql.apollo.api.Operation.Companion Companion; + field public static final com.apollographql.apollo.api.Operation.Variables EMPTY_VARIABLES; } public static final class Operation.Companion { - method public com.apollographql.apollo.api.Operation.Variables getEMPTY_VARIABLES(); - property public final com.apollographql.apollo.api.Operation.Variables EMPTY_VARIABLES; } - public static abstract interface Operation.Data { - method public abstract com.apollographql.apollo.api.internal.ResponseFieldMarshaller marshaller(); + public static interface Operation.Data { + method public com.apollographql.apollo.api.internal.ResponseFieldMarshaller marshaller(); } public static class Operation.Variables { ctor public Operation.Variables(); - method public final error.NonExistentClass marshal(); - method public final error.NonExistentClass marshal(com.apollographql.apollo.api.ScalarTypeAdapters); + method public final String marshal(); + method public final String marshal(com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters); method public com.apollographql.apollo.api.internal.InputFieldMarshaller marshaller(); - method public error.NonExistentClass valueMap(); + method public java.util.Map valueMap(); } public final class OperationDataJsonSerializer { - ctor public OperationDataJsonSerializer(); - method public static error.NonExistentClass toJson(com.apollographql.apollo.api.Operation.Data, error.NonExistentClass, com.apollographql.apollo.api.ScalarTypeAdapters); + method public static String serialize(com.apollographql.apollo.api.Operation.Data, String indent = "", com.apollographql.apollo.api.ScalarTypeAdapters scalarTypeAdapters = com.apollographql.apollo.api.ScalarTypeAdapters.DEFAULT); + method public static String serialize(com.apollographql.apollo.api.Operation.Data, String indent = ""); + method public static String serialize(com.apollographql.apollo.api.Operation.Data); } - public abstract interface OperationName { - method public abstract error.NonExistentClass name(); + public interface OperationName { + method public String name(); } - public abstract interface Query implements com.apollographql.apollo.api.Operation { + public interface Query extends com.apollographql.apollo.api.Operation { } public final class Response { - ctor public Response(com.apollographql.apollo.api.Operation, T, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, com.apollographql.apollo.api.ExecutionContext); - ctor public Response(com.apollographql.apollo.api.Response.Builder); - method public com.apollographql.apollo.api.Operation component1(); - method public T component2(); - method public error.NonExistentClass component3(); - method public error.NonExistentClass component4(); - method public error.NonExistentClass component5(); - method public error.NonExistentClass component6(); + ctor public Response(com.apollographql.apollo.api.Operation operation, T? data, java.util.List? errors, java.util.Set dependentKeys, boolean isFromCache, java.util.Map extensions, com.apollographql.apollo.api.ExecutionContext executionContext); + ctor public Response(com.apollographql.apollo.api.Response.Builder builder); + method public static com.apollographql.apollo.api.Response.Builder builder(com.apollographql.apollo.api.Operation operation); + method public com.apollographql.apollo.api.Operation component1(); + method public T? component2(); + method public java.util.List? component3(); + method public java.util.Set component4(); + method public boolean component5(); + method public java.util.Map component6(); method public com.apollographql.apollo.api.ExecutionContext component7(); - method public com.apollographql.apollo.api.Response copy(com.apollographql.apollo.api.Operation, T, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, com.apollographql.apollo.api.ExecutionContext); - method public T data(); - method public error.NonExistentClass dependentKeys(); - method public error.NonExistentClass equals(error.NonExistentClass); - method public boolean equals(java.lang.Object); - method public error.NonExistentClass errors(); - method public error.NonExistentClass extensions(); - method public error.NonExistentClass fromCache(); - method public T getData(); - method public error.NonExistentClass getDependentKeys(); - method public error.NonExistentClass getErrors(); + method public com.apollographql.apollo.api.Response copy(com.apollographql.apollo.api.Operation operation, T? data, java.util.List? errors, java.util.Set dependentKeys, boolean isFromCache, java.util.Map extensions, com.apollographql.apollo.api.ExecutionContext executionContext); + method @Deprecated public T? data(); + method @Deprecated public java.util.Set dependentKeys(); + method public boolean equals(Object? other); + method @Deprecated public java.util.List? errors(); + method @Deprecated public java.util.Map extensions(); + method @Deprecated public boolean fromCache(); + method public T? getData(); + method public java.util.Set getDependentKeys(); + method public java.util.List? getErrors(); method public com.apollographql.apollo.api.ExecutionContext getExecutionContext(); - method public error.NonExistentClass getExtensions(); - method public error.NonExistentClass getFromCache(); - method public com.apollographql.apollo.api.Operation getOperation(); - method public error.NonExistentClass hasErrors(); - method public error.NonExistentClass hashCode(); - method public error.NonExistentClass isFromCache(); - method public com.apollographql.apollo.api.Operation operation(); + method public java.util.Map getExtensions(); + method @Deprecated public boolean getFromCache(); + method public com.apollographql.apollo.api.Operation getOperation(); + method public boolean hasErrors(); + method public int hashCode(); + method public boolean isFromCache(); + method @Deprecated public com.apollographql.apollo.api.Operation operation(); method public com.apollographql.apollo.api.Response.Builder toBuilder(); - method public java.lang.String toString(); - property public final error.NonExistentClass fromCache; + method public String toString(); + property @Deprecated public final boolean fromCache; field public static final com.apollographql.apollo.api.Response.Companion Companion; } public static final class Response.Builder { method public com.apollographql.apollo.api.Response build(); - method public error.NonExistentClass data(T); - method public error.NonExistentClass dependentKeys(error.NonExistentClass); - method public error.NonExistentClass errors(error.NonExistentClass); - method public error.NonExistentClass executionContext(com.apollographql.apollo.api.ExecutionContext); - method public error.NonExistentClass extensions(error.NonExistentClass); - method public error.NonExistentClass fromCache(error.NonExistentClass); + method public com.apollographql.apollo.api.Response.Builder data(T? data); + method public com.apollographql.apollo.api.Response.Builder dependentKeys(java.util.Set? dependentKeys); + method public com.apollographql.apollo.api.Response.Builder errors(java.util.List? errors); + method public com.apollographql.apollo.api.Response.Builder executionContext(com.apollographql.apollo.api.ExecutionContext executionContext); + method public com.apollographql.apollo.api.Response.Builder extensions(java.util.Map? extensions); + method public com.apollographql.apollo.api.Response.Builder fromCache(boolean fromCache); } public static final class Response.Companion { - method public com.apollographql.apollo.api.Response.Builder builder(com.apollographql.apollo.api.Operation); + method public com.apollographql.apollo.api.Response.Builder builder(com.apollographql.apollo.api.Operation operation); } public class ResponseField { - method public final error.NonExistentClass arguments(); - method public final error.NonExistentClass conditions(); - method public error.NonExistentClass equals(error.NonExistentClass); - method public final error.NonExistentClass fieldName(); - method public final error.NonExistentClass getArguments(); - method public final error.NonExistentClass getConditions(); - method public final error.NonExistentClass getFieldName(); - method public final error.NonExistentClass getOptional(); - method public final error.NonExistentClass getResponseName(); + method @Deprecated public final java.util.Map arguments(); + method @Deprecated public final java.util.List conditions(); + method public boolean equals(Object? other); + method @Deprecated public final String fieldName(); + method public static final com.apollographql.apollo.api.ResponseField forBoolean(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField.CustomTypeField forCustomType(String responseName, String fieldName, java.util.Map? arguments, boolean optional, com.apollographql.apollo.api.ScalarType scalarType, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField forDouble(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField forEnum(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField forFragment(String responseName, String fieldName, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField forInt(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField forList(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField forLong(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField forObject(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public static final com.apollographql.apollo.api.ResponseField forString(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public final java.util.Map getArguments(); + method public final java.util.List getConditions(); + method public final String getFieldName(); + method public final boolean getOptional(); + method public final String getResponseName(); method public final com.apollographql.apollo.api.ResponseField.Type getType(); - method public error.NonExistentClass hashCode(); - method public final error.NonExistentClass optional(); - method public final error.NonExistentClass resolveArgument(error.NonExistentClass, com.apollographql.apollo.api.Operation.Variables); - method public final error.NonExistentClass responseName(); - method public final com.apollographql.apollo.api.ResponseField.Type type(); + method public int hashCode(); + method public static final boolean isArgumentValueVariableType(java.util.Map objectMap); + method @Deprecated public final boolean optional(); + method public final Object? resolveArgument(String name, com.apollographql.apollo.api.Operation.Variables variables); + method @Deprecated public final String responseName(); + method @Deprecated public final com.apollographql.apollo.api.ResponseField.Type type(); field public static final com.apollographql.apollo.api.ResponseField.Companion Companion; - field public static final java.lang.String VARIABLE_NAME_KEY = "variableName"; + field public static final String VARIABLE_NAME_KEY = "variableName"; } public static final class ResponseField.BooleanCondition extends com.apollographql.apollo.api.ResponseField.Condition { - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass getInverted(); - method public error.NonExistentClass getVariableName(); - method public error.NonExistentClass hashCode(); - method public error.NonExistentClass inverted(); - method public error.NonExistentClass isInverted(); - method public error.NonExistentClass variableName(); - property public final error.NonExistentClass inverted; + method public boolean equals(Object? other); + method @Deprecated public boolean getInverted(); + method public String getVariableName(); + method public int hashCode(); + method @Deprecated public boolean inverted(); + method public boolean isInverted(); + method @Deprecated public String variableName(); + property @Deprecated public final boolean inverted; } public static final class ResponseField.Companion { - method public com.apollographql.apollo.api.ResponseField forBoolean(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField.CustomTypeField forCustomType(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, com.apollographql.apollo.api.ScalarType, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField forDouble(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField forEnum(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField forFragment(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField forInt(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField forList(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField forLong(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField forObject(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField forString(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass isArgumentValueVariableType(error.NonExistentClass); + method public com.apollographql.apollo.api.ResponseField forBoolean(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField.CustomTypeField forCustomType(String responseName, String fieldName, java.util.Map? arguments, boolean optional, com.apollographql.apollo.api.ScalarType scalarType, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField forDouble(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField forEnum(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField forFragment(String responseName, String fieldName, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField forInt(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField forList(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField forLong(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField forObject(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public com.apollographql.apollo.api.ResponseField forString(String responseName, String fieldName, java.util.Map? arguments, boolean optional, java.util.List? conditions); + method public boolean isArgumentValueVariableType(java.util.Map objectMap); } public static class ResponseField.Condition { + method public static final com.apollographql.apollo.api.ResponseField.BooleanCondition booleanCondition(String variableName, boolean inverted); + method public static final com.apollographql.apollo.api.ResponseField.TypeNameCondition typeCondition(String![] types); field public static final com.apollographql.apollo.api.ResponseField.Condition.Companion Companion; } public static final class ResponseField.Condition.Companion { - method public com.apollographql.apollo.api.ResponseField.BooleanCondition booleanCondition(error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.api.ResponseField.TypeNameCondition typeCondition(error.NonExistentClass); + method public com.apollographql.apollo.api.ResponseField.BooleanCondition booleanCondition(String variableName, boolean inverted); + method public com.apollographql.apollo.api.ResponseField.TypeNameCondition typeCondition(String![] types); } public static final class ResponseField.CustomTypeField extends com.apollographql.apollo.api.ResponseField { method public com.apollographql.apollo.api.ScalarType getScalarType(); - method public com.apollographql.apollo.api.ScalarType scalarType(); + method @Deprecated public com.apollographql.apollo.api.ScalarType scalarType(); } - public static class ResponseField.Type { - method public static com.apollographql.apollo.api.ResponseField.Type valueOf(java.lang.String); - method public static final com.apollographql.apollo.api.ResponseField.Type[] values(); + public enum ResponseField.Type { + method public static com.apollographql.apollo.api.ResponseField.Type valueOf(String name); + method public static com.apollographql.apollo.api.ResponseField.Type[] values(); enum_constant public static final com.apollographql.apollo.api.ResponseField.Type BOOLEAN; enum_constant public static final com.apollographql.apollo.api.ResponseField.Type CUSTOM; enum_constant public static final com.apollographql.apollo.api.ResponseField.Type DOUBLE; @@ -396,30 +407,29 @@ package com.apollographql.apollo.api { } public static final class ResponseField.TypeNameCondition extends com.apollographql.apollo.api.ResponseField.Condition { - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass getTypeNames(); - method public error.NonExistentClass hashCode(); - method public error.NonExistentClass typeNames(); + method public boolean equals(Object? other); + method public java.util.List getTypeNames(); + method public int hashCode(); + method @Deprecated public java.util.List typeNames(); } - public abstract interface ScalarType { - method public abstract error.NonExistentClass className(); - method public abstract error.NonExistentClass typeName(); + public interface ScalarType { + method public String className(); + method public String typeName(); } public final class ScalarTypeAdapters { - ctor public ScalarTypeAdapters(error.NonExistentClass); - method public com.apollographql.apollo.api.CustomTypeAdapter adapterFor(com.apollographql.apollo.api.ScalarType); - method public error.NonExistentClass getCustomAdapters(); + ctor public ScalarTypeAdapters(java.util.Map> customAdapters); + method public com.apollographql.apollo.api.CustomTypeAdapter adapterFor(com.apollographql.apollo.api.ScalarType scalarType); + method public java.util.Map> getCustomAdapters(); field public static final com.apollographql.apollo.api.ScalarTypeAdapters.Companion Companion; + field public static final com.apollographql.apollo.api.ScalarTypeAdapters DEFAULT; } public static final class ScalarTypeAdapters.Companion { - method public com.apollographql.apollo.api.ScalarTypeAdapters getDEFAULT(); - property public final com.apollographql.apollo.api.ScalarTypeAdapters DEFAULT; } - public abstract interface Subscription implements com.apollographql.apollo.api.Operation { + public interface Subscription extends com.apollographql.apollo.api.Operation { } } @@ -427,8 +437,8 @@ package com.apollographql.apollo.api { package com.apollographql.apollo.exception { public class ApolloException { - ctor public ApolloException(error.NonExistentClass); - ctor public ApolloException(error.NonExistentClass, error.NonExistentClass); + ctor public ApolloException(String message); + ctor public ApolloException(String message, Throwable cause); } } diff --git a/apollo-api/build.gradle.kts b/apollo-api/build.gradle.kts index 1471ee8a2c8..14618626899 100644 --- a/apollo-api/build.gradle.kts +++ b/apollo-api/build.gradle.kts @@ -82,6 +82,10 @@ kotlin { } } +metalava { + hiddenPackages += setOf("com.apollographql.apollo.api.internal") +} + tasks.withType { exclude("**/BufferedSourceJsonReader.java") exclude("**/JsonScope.java") diff --git a/apollo-coroutines-support/api.txt b/apollo-coroutines-support/api.txt index 22131b47415..e62836fdc0e 100644 --- a/apollo-coroutines-support/api.txt +++ b/apollo-coroutines-support/api.txt @@ -1,14 +1,14 @@ +// Signature format: 3.0 package com.apollographql.apollo.coroutines { public final class CoroutinesExtensionsKt { - ctor public CoroutinesExtensionsKt(); - method public static suspend java.lang.Object await(error.NonExistentClass, java.lang.Object); - method public static suspend java.lang.Object await(error.NonExistentClass, java.lang.Object); - method public static error.NonExistentClass toDeferred(error.NonExistentClass); - method public static error.NonExistentClass toFlow(error.NonExistentClass); - method public static error.NonExistentClass toFlow(error.NonExistentClass); - method public static error.NonExistentClass toFlow(error.NonExistentClass); - method public static error.NonExistentClass toJob(error.NonExistentClass); + method public static suspend Object? await(com.apollographql.apollo.ApolloCall, kotlin.coroutines.Continuation> p); + method public static suspend Object? await(com.apollographql.apollo.ApolloPrefetch, kotlin.coroutines.Continuation p); + method @Deprecated public static kotlinx.coroutines.Deferred> toDeferred(com.apollographql.apollo.ApolloCall); + method @kotlinx.coroutines.ExperimentalCoroutinesApi public static kotlinx.coroutines.flow.Flow> toFlow(com.apollographql.apollo.ApolloCall); + method @kotlinx.coroutines.ExperimentalCoroutinesApi public static kotlinx.coroutines.flow.Flow> toFlow(com.apollographql.apollo.ApolloQueryWatcher); + method @kotlinx.coroutines.ExperimentalCoroutinesApi public static kotlinx.coroutines.flow.Flow> toFlow(com.apollographql.apollo.ApolloSubscriptionCall); + method @Deprecated public static kotlinx.coroutines.Job toJob(com.apollographql.apollo.ApolloPrefetch); } } diff --git a/apollo-gradle-plugin/api.txt b/apollo-gradle-plugin/api.txt index 8a81145f5c9..8e0383d25ef 100644 --- a/apollo-gradle-plugin/api.txt +++ b/apollo-gradle-plugin/api.txt @@ -1,103 +1,104 @@ +// Signature format: 3.0 package com.apollographql.apollo.gradle.api { public final class ApolloAttributes { - method public error.NonExistentClass getAPOLLO_SERVICE_ATTRIBUTE(); - method public error.NonExistentClass getAPOLLO_VARIANT_ATTRIBUTE(); - property public final error.NonExistentClass APOLLO_SERVICE_ATTRIBUTE; - property public final error.NonExistentClass APOLLO_VARIANT_ATTRIBUTE; + method public error.NonExistentClass! getAPOLLO_SERVICE_ATTRIBUTE(); + method public error.NonExistentClass! getAPOLLO_VARIANT_ATTRIBUTE(); + property public final error.NonExistentClass! APOLLO_SERVICE_ATTRIBUTE; + property public final error.NonExistentClass! APOLLO_VARIANT_ATTRIBUTE; field public static final com.apollographql.apollo.gradle.api.ApolloAttributes INSTANCE; } - public static abstract interface ApolloAttributes.Service { + public static interface ApolloAttributes.Service extends org.gradle.api.Named { } - public static abstract interface ApolloAttributes.Variant { + public static interface ApolloAttributes.Variant extends org.gradle.api.Named { } - public abstract interface ApolloExtension implements com.apollographql.apollo.gradle.api.CompilerParams { - method public abstract void onCompilationUnit(error.NonExistentClass); - method public abstract void service(error.NonExistentClass, error.NonExistentClass); + public interface ApolloExtension extends com.apollographql.apollo.gradle.api.CompilerParams { + method public void onCompilationUnit(org.gradle.api.Action action); + method public void service(String name, org.gradle.api.Action action); } - public abstract interface CompilationUnit implements com.apollographql.apollo.gradle.api.CompilerParams { - method public abstract error.NonExistentClass getAndroidVariant(); - method public abstract error.NonExistentClass getName(); - method public abstract error.NonExistentClass getOperationOutputFile(); - method public abstract error.NonExistentClass getOutputDir(); - method public abstract error.NonExistentClass getServiceName(); - method public abstract error.NonExistentClass getVariantName(); - property public abstract error.NonExistentClass androidVariant; - property public abstract error.NonExistentClass name; - property public abstract error.NonExistentClass operationOutputFile; - property public abstract error.NonExistentClass outputDir; - property public abstract error.NonExistentClass serviceName; - property public abstract error.NonExistentClass variantName; + public interface CompilationUnit extends com.apollographql.apollo.gradle.api.CompilerParams { + method public Object? getAndroidVariant(); + method public String getName(); + method public org.gradle.api.provider.Provider getOperationOutputFile(); + method public org.gradle.api.provider.Provider getOutputDir(); + method public String getServiceName(); + method public String getVariantName(); + property public abstract Object? androidVariant; + property public abstract String name; + property public abstract org.gradle.api.provider.Provider operationOutputFile; + property public abstract org.gradle.api.provider.Provider outputDir; + property public abstract String serviceName; + property public abstract String variantName; } - public abstract interface CompilerParams { - method public abstract error.NonExistentClass getAlwaysGenerateTypesMatching(); - method public abstract error.NonExistentClass getCustomTypeMapping(); - method public abstract error.NonExistentClass getFailOnWarnings(); - method public abstract error.NonExistentClass getGenerateApolloMetadata(); - method public abstract error.NonExistentClass getGenerateAsInternal(); - method public abstract error.NonExistentClass getGenerateKotlinModels(); - method public abstract error.NonExistentClass getGenerateModelBuilder(); - method public abstract error.NonExistentClass getGenerateOperationOutput(); - method public abstract error.NonExistentClass getGenerateVisitorForPolymorphicDatatypes(); - method public abstract error.NonExistentClass getGraphqlSourceDirectorySet(); - method public abstract error.NonExistentClass getNullableValueType(); - method public abstract error.NonExistentClass getOperationIdGenerator(); - method public abstract error.NonExistentClass getOperationOutputGenerator(); - method public abstract error.NonExistentClass getPackageName(); - method public abstract error.NonExistentClass getRootPackageName(); - method public abstract error.NonExistentClass getSchemaFile(); - method public abstract error.NonExistentClass getSealedClassesForEnumsMatching(); - method public abstract error.NonExistentClass getSuppressRawTypesWarning(); - method public abstract error.NonExistentClass getUseJavaBeansSemanticNaming(); - method public abstract error.NonExistentClass getUseSemanticNaming(); - method public abstract error.NonExistentClass getWarnOnDeprecatedUsages(); - property public abstract error.NonExistentClass alwaysGenerateTypesMatching; - property public abstract error.NonExistentClass customTypeMapping; - property public abstract error.NonExistentClass failOnWarnings; - property public abstract error.NonExistentClass generateApolloMetadata; - property public abstract error.NonExistentClass generateAsInternal; - property public abstract error.NonExistentClass generateKotlinModels; - property public abstract error.NonExistentClass generateModelBuilder; - property public abstract error.NonExistentClass generateOperationOutput; - property public abstract error.NonExistentClass generateVisitorForPolymorphicDatatypes; - property public abstract error.NonExistentClass graphqlSourceDirectorySet; - property public abstract error.NonExistentClass nullableValueType; - property public abstract error.NonExistentClass operationIdGenerator; - property public abstract error.NonExistentClass operationOutputGenerator; - property public abstract error.NonExistentClass packageName; - property public abstract error.NonExistentClass rootPackageName; - property public abstract error.NonExistentClass schemaFile; - property public abstract error.NonExistentClass sealedClassesForEnumsMatching; - property public abstract error.NonExistentClass suppressRawTypesWarning; - property public abstract error.NonExistentClass useJavaBeansSemanticNaming; - property public abstract error.NonExistentClass useSemanticNaming; - property public abstract error.NonExistentClass warnOnDeprecatedUsages; + public interface CompilerParams { + method public org.gradle.api.provider.SetProperty getAlwaysGenerateTypesMatching(); + method public org.gradle.api.provider.MapProperty getCustomTypeMapping(); + method public org.gradle.api.provider.Property getFailOnWarnings(); + method public org.gradle.api.provider.Property getGenerateApolloMetadata(); + method public org.gradle.api.provider.Property getGenerateAsInternal(); + method public org.gradle.api.provider.Property getGenerateKotlinModels(); + method public org.gradle.api.provider.Property getGenerateModelBuilder(); + method public org.gradle.api.provider.Property getGenerateOperationOutput(); + method public org.gradle.api.provider.Property getGenerateVisitorForPolymorphicDatatypes(); + method public org.gradle.api.file.SourceDirectorySet getGraphqlSourceDirectorySet(); + method public org.gradle.api.provider.Property getNullableValueType(); + method public org.gradle.api.provider.Property getOperationIdGenerator(); + method public org.gradle.api.provider.Property getOperationOutputGenerator(); + method public org.gradle.api.provider.Property getPackageName(); + method public org.gradle.api.provider.Property getRootPackageName(); + method public org.gradle.api.file.RegularFileProperty getSchemaFile(); + method public org.gradle.api.provider.ListProperty getSealedClassesForEnumsMatching(); + method public org.gradle.api.provider.Property getSuppressRawTypesWarning(); + method public org.gradle.api.provider.Property getUseJavaBeansSemanticNaming(); + method public org.gradle.api.provider.Property getUseSemanticNaming(); + method public org.gradle.api.provider.Property getWarnOnDeprecatedUsages(); + property public abstract org.gradle.api.provider.SetProperty alwaysGenerateTypesMatching; + property public abstract org.gradle.api.provider.MapProperty customTypeMapping; + property public abstract org.gradle.api.provider.Property failOnWarnings; + property public abstract org.gradle.api.provider.Property generateApolloMetadata; + property public abstract org.gradle.api.provider.Property generateAsInternal; + property public abstract org.gradle.api.provider.Property generateKotlinModels; + property public abstract org.gradle.api.provider.Property generateModelBuilder; + property public abstract org.gradle.api.provider.Property generateOperationOutput; + property public abstract org.gradle.api.provider.Property generateVisitorForPolymorphicDatatypes; + property public abstract org.gradle.api.file.SourceDirectorySet graphqlSourceDirectorySet; + property public abstract org.gradle.api.provider.Property nullableValueType; + property public abstract org.gradle.api.provider.Property operationIdGenerator; + property public abstract org.gradle.api.provider.Property operationOutputGenerator; + property public abstract org.gradle.api.provider.Property packageName; + property public abstract org.gradle.api.provider.Property rootPackageName; + property public abstract org.gradle.api.file.RegularFileProperty schemaFile; + property public abstract org.gradle.api.provider.ListProperty sealedClassesForEnumsMatching; + property public abstract org.gradle.api.provider.Property suppressRawTypesWarning; + property public abstract org.gradle.api.provider.Property useJavaBeansSemanticNaming; + property public abstract org.gradle.api.provider.Property useSemanticNaming; + property public abstract org.gradle.api.provider.Property warnOnDeprecatedUsages; } - public abstract interface Introspection { - method public abstract error.NonExistentClass getEndpointUrl(); - method public abstract error.NonExistentClass getHeaders(); - method public abstract error.NonExistentClass getQueryParameters(); - method public abstract error.NonExistentClass getSourceSetName(); - property public abstract error.NonExistentClass endpointUrl; - property public abstract error.NonExistentClass headers; - property public abstract error.NonExistentClass queryParameters; - property public abstract error.NonExistentClass sourceSetName; + public interface Introspection { + method public org.gradle.api.provider.Property getEndpointUrl(); + method public org.gradle.api.provider.MapProperty getHeaders(); + method @Deprecated public org.gradle.api.provider.MapProperty getQueryParameters(); + method public org.gradle.api.provider.Property getSourceSetName(); + property public abstract org.gradle.api.provider.Property endpointUrl; + property public abstract org.gradle.api.provider.MapProperty headers; + property @Deprecated public abstract org.gradle.api.provider.MapProperty queryParameters; + property public abstract org.gradle.api.provider.Property sourceSetName; } - public abstract interface Service implements com.apollographql.apollo.gradle.api.CompilerParams { - method public abstract error.NonExistentClass getExclude(); - method public abstract error.NonExistentClass getSchemaPath(); - method public abstract error.NonExistentClass getSourceFolder(); - method public abstract void introspection(error.NonExistentClass); - property public abstract error.NonExistentClass exclude; - property public abstract error.NonExistentClass schemaPath; - property public abstract error.NonExistentClass sourceFolder; + public interface Service extends com.apollographql.apollo.gradle.api.CompilerParams { + method public org.gradle.api.provider.ListProperty getExclude(); + method public org.gradle.api.provider.Property getSchemaPath(); + method public org.gradle.api.provider.Property getSourceFolder(); + method public void introspection(org.gradle.api.Action configure); + property public abstract org.gradle.api.provider.ListProperty exclude; + property public abstract org.gradle.api.provider.Property schemaPath; + property public abstract org.gradle.api.provider.Property sourceFolder; } } diff --git a/apollo-gradle-plugin/build.gradle.kts b/apollo-gradle-plugin/build.gradle.kts index 6e3e12ffd7b..54ba103e736 100644 --- a/apollo-gradle-plugin/build.gradle.kts +++ b/apollo-gradle-plugin/build.gradle.kts @@ -15,6 +15,10 @@ fun Any.dot(key: String): Any { return (this as Map)[key]!! } +metalava { + hiddenPackages += setOf("com.apollographql.apollo.gradle.internal") +} + dependencies { compileOnly(gradleApi()) compileOnly(dep("kotlin").dot("plugin")) diff --git a/apollo-http-cache-api/api.txt b/apollo-http-cache-api/api.txt index b4d10fe1f2f..e706915d08f 100644 --- a/apollo-http-cache-api/api.txt +++ b/apollo-http-cache-api/api.txt @@ -1,54 +1,51 @@ +// Signature format: 3.0 package com.apollographql.apollo.api.cache.http { - public abstract interface HttpCache { - method public abstract void clear(); - method public abstract error.NonExistentClass interceptor(); - method public abstract error.NonExistentClass read(error.NonExistentClass); - method public abstract error.NonExistentClass read(error.NonExistentClass, error.NonExistentClass); - method public abstract void remove(error.NonExistentClass); - method public abstract void removeQuietly(error.NonExistentClass); - field public static final java.lang.String CACHE_DO_NOT_STORE = "X-APOLLO-CACHE-DO-NOT-STORE"; - field public static final java.lang.String CACHE_EXPIRE_AFTER_READ_HEADER = "X-APOLLO-EXPIRE-AFTER-READ"; - field public static final java.lang.String CACHE_EXPIRE_TIMEOUT_HEADER = "X-APOLLO-EXPIRE-TIMEOUT"; - field public static final java.lang.String CACHE_FETCH_STRATEGY_HEADER = "X-APOLLO-CACHE-FETCH-STRATEGY"; - field public static final java.lang.String CACHE_KEY_HEADER = "X-APOLLO-CACHE-KEY"; - field public static final java.lang.String CACHE_PREFETCH_HEADER = "X-APOLLO-PREFETCH"; - field public static final java.lang.String CACHE_SERVED_DATE_HEADER = "X-APOLLO-SERVED-DATE"; + public interface HttpCache { + method public void clear(); + method public okhttp3.Interceptor interceptor(); + method public okhttp3.Response? read(String cacheKey); + method public okhttp3.Response? read(String cacheKey, boolean expireAfterRead); + method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public void remove(String cacheKey); + method public void removeQuietly(String cacheKey); + field public static final String CACHE_DO_NOT_STORE = "X-APOLLO-CACHE-DO-NOT-STORE"; + field public static final String CACHE_EXPIRE_AFTER_READ_HEADER = "X-APOLLO-EXPIRE-AFTER-READ"; + field public static final String CACHE_EXPIRE_TIMEOUT_HEADER = "X-APOLLO-EXPIRE-TIMEOUT"; + field public static final String CACHE_FETCH_STRATEGY_HEADER = "X-APOLLO-CACHE-FETCH-STRATEGY"; + field public static final String CACHE_KEY_HEADER = "X-APOLLO-CACHE-KEY"; + field public static final String CACHE_PREFETCH_HEADER = "X-APOLLO-PREFETCH"; + field public static final String CACHE_SERVED_DATE_HEADER = "X-APOLLO-SERVED-DATE"; field public static final com.apollographql.apollo.api.cache.http.HttpCache.Companion Companion; - field public static final java.lang.String FROM_CACHE = "X-APOLLO-FROM-CACHE"; + field public static final String FROM_CACHE = "X-APOLLO-FROM-CACHE"; } public static final class HttpCache.Companion { - field public static final java.lang.String CACHE_DO_NOT_STORE = "X-APOLLO-CACHE-DO-NOT-STORE"; - field public static final java.lang.String CACHE_EXPIRE_AFTER_READ_HEADER = "X-APOLLO-EXPIRE-AFTER-READ"; - field public static final java.lang.String CACHE_EXPIRE_TIMEOUT_HEADER = "X-APOLLO-EXPIRE-TIMEOUT"; - field public static final java.lang.String CACHE_FETCH_STRATEGY_HEADER = "X-APOLLO-CACHE-FETCH-STRATEGY"; - field public static final java.lang.String CACHE_KEY_HEADER = "X-APOLLO-CACHE-KEY"; - field public static final java.lang.String CACHE_PREFETCH_HEADER = "X-APOLLO-PREFETCH"; - field public static final java.lang.String CACHE_SERVED_DATE_HEADER = "X-APOLLO-SERVED-DATE"; - field public static final java.lang.String FROM_CACHE = "X-APOLLO-FROM-CACHE"; + field public static final String CACHE_DO_NOT_STORE = "X-APOLLO-CACHE-DO-NOT-STORE"; + field public static final String CACHE_EXPIRE_AFTER_READ_HEADER = "X-APOLLO-EXPIRE-AFTER-READ"; + field public static final String CACHE_EXPIRE_TIMEOUT_HEADER = "X-APOLLO-EXPIRE-TIMEOUT"; + field public static final String CACHE_FETCH_STRATEGY_HEADER = "X-APOLLO-CACHE-FETCH-STRATEGY"; + field public static final String CACHE_KEY_HEADER = "X-APOLLO-CACHE-KEY"; + field public static final String CACHE_PREFETCH_HEADER = "X-APOLLO-PREFETCH"; + field public static final String CACHE_SERVED_DATE_HEADER = "X-APOLLO-SERVED-DATE"; + field public static final String FROM_CACHE = "X-APOLLO-FROM-CACHE"; } public final class HttpCachePolicy { - method public com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy getCACHE_FIRST(); - method public com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy getCACHE_ONLY(); - method public com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy getNETWORK_FIRST(); - method public com.apollographql.apollo.api.cache.http.HttpCachePolicy.Policy getNETWORK_ONLY(); - property public final com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy CACHE_FIRST; - property public final com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy CACHE_ONLY; - property public final com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy NETWORK_FIRST; - property public final com.apollographql.apollo.api.cache.http.HttpCachePolicy.Policy NETWORK_ONLY; + field public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy CACHE_FIRST; + field public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy CACHE_ONLY; field public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy INSTANCE; + field public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy NETWORK_FIRST; + field public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy.Policy NETWORK_ONLY; } public static final class HttpCachePolicy.ExpirePolicy extends com.apollographql.apollo.api.cache.http.HttpCachePolicy.Policy { - method public com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy expireAfter(error.NonExistentClass, error.NonExistentClass); + method public com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy expireAfter(long expireTimeout, error.NonExistentClass expireTimeUnit); method public com.apollographql.apollo.api.cache.http.HttpCachePolicy.ExpirePolicy expireAfterRead(); } - public static class HttpCachePolicy.FetchStrategy { - method public static com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy valueOf(java.lang.String); - method public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy[] values(); + public enum HttpCachePolicy.FetchStrategy { + method public static com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy valueOf(String name); + method public static com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy[] values(); enum_constant public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy CACHE_FIRST; enum_constant public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy CACHE_ONLY; enum_constant public static final com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy NETWORK_FIRST; @@ -56,32 +53,32 @@ package com.apollographql.apollo.api.cache.http { } public static class HttpCachePolicy.Policy { - ctor public HttpCachePolicy.Policy(com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public final error.NonExistentClass expireTimeoutMs(); - method public final error.NonExistentClass getExpireAfterRead(); - method public final error.NonExistentClass getExpireTimeUnit(); - method public final error.NonExistentClass getExpireTimeout(); - method public final com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy getFetchStrategy(); + ctor public HttpCachePolicy.Policy(com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy fetchStrategy, long expireTimeout, error.NonExistentClass? expireTimeUnit, boolean expireAfterRead); + method public final long expireTimeoutMs(); + field public final boolean expireAfterRead; + field public final error.NonExistentClass? expireTimeUnit; + field public final long expireTimeout; + field public final com.apollographql.apollo.api.cache.http.HttpCachePolicy.FetchStrategy fetchStrategy; } - public abstract interface HttpCacheRecord { - method public abstract error.NonExistentClass bodySource(); - method public abstract void close(); - method public abstract error.NonExistentClass headerSource(); + public interface HttpCacheRecord { + method public okio.Source bodySource(); + method public void close(); + method public okio.Source headerSource(); } - public abstract interface HttpCacheRecordEditor { - method public abstract void abort(); - method public abstract error.NonExistentClass bodySink(); - method public abstract void commit(); - method public abstract error.NonExistentClass headerSink(); + public interface HttpCacheRecordEditor { + method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public void abort(); + method public okio.Sink bodySink(); + method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public void commit(); + method public okio.Sink headerSink(); } - public abstract interface HttpCacheStore { - method public abstract com.apollographql.apollo.api.cache.http.HttpCacheRecord cacheRecord(error.NonExistentClass); - method public abstract com.apollographql.apollo.api.cache.http.HttpCacheRecordEditor cacheRecordEditor(error.NonExistentClass); - method public abstract void delete(); - method public abstract void remove(error.NonExistentClass); + public interface HttpCacheStore { + method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public com.apollographql.apollo.api.cache.http.HttpCacheRecord? cacheRecord(String cacheKey); + method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public com.apollographql.apollo.api.cache.http.HttpCacheRecordEditor? cacheRecordEditor(String cacheKey); + method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public void delete(); + method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public void remove(String cacheKey); } } diff --git a/apollo-http-cache/api.txt b/apollo-http-cache/api.txt index f24893caf7e..047418fa698 100644 --- a/apollo-http-cache/api.txt +++ b/apollo-http-cache/api.txt @@ -1,12 +1,13 @@ +// Signature format: 3.0 package com.apollographql.apollo.cache.http { public final class ApolloHttpCache { ctor public ApolloHttpCache(HttpCacheStore); - ctor public ApolloHttpCache(HttpCacheStore, Logger); + ctor public ApolloHttpCache(HttpCacheStore, com.apollographql.apollo.Logger?); method public void clear(); - method public Interceptor interceptor(); - method public Response read(String); - method public Response read(String, boolean); + method public okhttp3.Interceptor! interceptor(); + method public okhttp3.Response! read(String); + method public okhttp3.Response! read(String, boolean); method public void remove(String); method public void removeQuietly(String); } diff --git a/apollo-http-cache/build.gradle.kts b/apollo-http-cache/build.gradle.kts index 4830219f415..dd4a4bfce67 100644 --- a/apollo-http-cache/build.gradle.kts +++ b/apollo-http-cache/build.gradle.kts @@ -2,6 +2,10 @@ plugins { `java-library` } +metalava { + hiddenPackages += setOf("com.apollographql.apollo.cache.http.internal") +} + dependencies { add("compileOnly", groovy.util.Eval.x(project, "x.dep.jetbrainsAnnotations")) diff --git a/apollo-idling-resource/api.txt b/apollo-idling-resource/api.txt index b1d8fefd8f4..c19faf76a28 100644 --- a/apollo-idling-resource/api.txt +++ b/apollo-idling-resource/api.txt @@ -1,10 +1,11 @@ +// Signature format: 3.0 package com.apollographql.apollo.test.espresso { - public final class ApolloIdlingResource { - method public static com.apollographql.apollo.test.espresso.ApolloIdlingResource create(String, ApolloClient); - method public String getName(); + public final class ApolloIdlingResource implements androidx.test.espresso.IdlingResource { + method public static com.apollographql.apollo.test.espresso.ApolloIdlingResource! create(String, com.apollographql.apollo.ApolloClient); + method public String! getName(); method public boolean isIdleNow(); - method public void registerIdleTransitionCallback(ResourceCallback); + method public void registerIdleTransitionCallback(androidx.test.espresso.IdlingResource.ResourceCallback!); } } diff --git a/apollo-normalized-cache-api/api.txt b/apollo-normalized-cache-api/api.txt index a320128deb6..d305144dd0f 100644 --- a/apollo-normalized-cache-api/api.txt +++ b/apollo-normalized-cache-api/api.txt @@ -1,30 +1,31 @@ +// Signature format: 3.0 package com.apollographql.apollo.cache { public final class ApolloCacheHeaders { - field public static final java.lang.String DO_NOT_STORE = "do-not-store"; - field public static final java.lang.String EVICT_AFTER_READ = "evict-after-read"; + field public static final String DO_NOT_STORE = "do-not-store"; + field public static final String EVICT_AFTER_READ = "evict-after-read"; field public static final com.apollographql.apollo.cache.ApolloCacheHeaders INSTANCE; - field public static final java.lang.String STORE_PARTIAL_RESPONSES = "store-partial-responses"; + field public static final String STORE_PARTIAL_RESPONSES = "store-partial-responses"; } public final class CacheHeaders { - method public error.NonExistentClass hasHeader(error.NonExistentClass); - method public error.NonExistentClass headerValue(error.NonExistentClass); + method public static com.apollographql.apollo.cache.CacheHeaders.Builder builder(); + method public boolean hasHeader(String headerName); + method public String? headerValue(String header); method public com.apollographql.apollo.cache.CacheHeaders.Builder toBuilder(); field public static final com.apollographql.apollo.cache.CacheHeaders.Companion Companion; + field public static final com.apollographql.apollo.cache.CacheHeaders NONE; } public static final class CacheHeaders.Builder { ctor public CacheHeaders.Builder(); - method public error.NonExistentClass addHeader(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass addHeaders(error.NonExistentClass); + method public com.apollographql.apollo.cache.CacheHeaders.Builder addHeader(String headerName, String headerValue); + method public com.apollographql.apollo.cache.CacheHeaders.Builder addHeaders(java.util.Map headerMap); method public com.apollographql.apollo.cache.CacheHeaders build(); } public static final class CacheHeaders.Companion { method public com.apollographql.apollo.cache.CacheHeaders.Builder builder(); - method public com.apollographql.apollo.cache.CacheHeaders getNONE(); - property public final com.apollographql.apollo.cache.CacheHeaders NONE; } } @@ -32,129 +33,134 @@ package com.apollographql.apollo.cache { package com.apollographql.apollo.cache.normalized { public final class CacheKey { - ctor public CacheKey(error.NonExistentClass); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass getKey(); - method public error.NonExistentClass hashCode(); - method public error.NonExistentClass key(); - method public error.NonExistentClass toString(); + ctor public CacheKey(String key); + method public boolean equals(Object? other); + method public static com.apollographql.apollo.cache.normalized.CacheKey from(String key); + method public String getKey(); + method public int hashCode(); + method @Deprecated public String key(); + method public String toString(); field public static final com.apollographql.apollo.cache.normalized.CacheKey.Companion Companion; + field public static final com.apollographql.apollo.cache.normalized.CacheKey NO_KEY; } public static final class CacheKey.Companion { - method public com.apollographql.apollo.cache.normalized.CacheKey from(error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.CacheKey getNO_KEY(); - property public final com.apollographql.apollo.cache.normalized.CacheKey NO_KEY; + method public com.apollographql.apollo.cache.normalized.CacheKey from(String key); } public abstract class CacheKeyResolver { ctor public CacheKeyResolver(); - method public abstract com.apollographql.apollo.cache.normalized.CacheKey fromFieldArguments(error.NonExistentClass, error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.CacheKey fromFieldRecordSet(error.NonExistentClass, error.NonExistentClass); + method public abstract com.apollographql.apollo.cache.normalized.CacheKey fromFieldArguments(com.apollographql.apollo.api.ResponseField field, com.apollographql.apollo.api.Operation.Variables variables); + method public abstract com.apollographql.apollo.cache.normalized.CacheKey fromFieldRecordSet(com.apollographql.apollo.api.ResponseField field, java.util.Map recordSet); + method public static final com.apollographql.apollo.cache.normalized.CacheKey rootKeyForOperation(com.apollographql.apollo.api.Operation operation); field public static final com.apollographql.apollo.cache.normalized.CacheKeyResolver.Companion Companion; + field public static final com.apollographql.apollo.cache.normalized.CacheKeyResolver DEFAULT; } public static final class CacheKeyResolver.Companion { - method public com.apollographql.apollo.cache.normalized.CacheKeyResolver getDEFAULT(); - method public com.apollographql.apollo.cache.normalized.CacheKey rootKeyForOperation(error.NonExistentClass); - property public final com.apollographql.apollo.cache.normalized.CacheKeyResolver DEFAULT; + method public com.apollographql.apollo.cache.normalized.CacheKey rootKeyForOperation(com.apollographql.apollo.api.Operation operation); } public final class CacheReference { - ctor public CacheReference(error.NonExistentClass); - method public error.NonExistentClass equals(error.NonExistentClass); - method public error.NonExistentClass getKey(); - method public error.NonExistentClass hashCode(); - method public error.NonExistentClass key(); - method public error.NonExistentClass serialize(); - method public error.NonExistentClass toString(); + ctor public CacheReference(String key); + method public static boolean canDeserialize(String value); + method public static com.apollographql.apollo.cache.normalized.CacheReference deserialize(String serializedCacheReference); + method public boolean equals(Object? other); + method public String getKey(); + method public int hashCode(); + method @Deprecated public String key(); + method public String serialize(); + method public String toString(); field public static final com.apollographql.apollo.cache.normalized.CacheReference.Companion Companion; } public static final class CacheReference.Companion { - method public error.NonExistentClass canDeserialize(error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.CacheReference deserialize(error.NonExistentClass); + method public boolean canDeserialize(String value); + method public com.apollographql.apollo.cache.normalized.CacheReference deserialize(String serializedCacheReference); } public abstract class NormalizedCache { ctor public NormalizedCache(); - method public final error.NonExistentClass chain(com.apollographql.apollo.cache.normalized.NormalizedCache); + method public final com.apollographql.apollo.cache.normalized.NormalizedCache chain(com.apollographql.apollo.cache.normalized.NormalizedCache cache); method public abstract void clearAll(); - method public error.NonExistentClass dump(); - method public final com.apollographql.apollo.cache.normalized.NormalizedCache getNextCache(); - method public abstract com.apollographql.apollo.cache.normalized.Record loadRecord(error.NonExistentClass, com.apollographql.apollo.cache.CacheHeaders); - method public error.NonExistentClass loadRecords(error.NonExistentClass, com.apollographql.apollo.cache.CacheHeaders); - method public error.NonExistentClass merge(com.apollographql.apollo.cache.normalized.Record, com.apollographql.apollo.cache.CacheHeaders); - method public error.NonExistentClass merge(error.NonExistentClass, com.apollographql.apollo.cache.CacheHeaders); - method protected abstract error.NonExistentClass performMerge(com.apollographql.apollo.cache.normalized.Record, com.apollographql.apollo.cache.normalized.Record, com.apollographql.apollo.cache.CacheHeaders); - method public final error.NonExistentClass remove(com.apollographql.apollo.cache.normalized.CacheKey); - method public abstract error.NonExistentClass remove(com.apollographql.apollo.cache.normalized.CacheKey, error.NonExistentClass); - property public final com.apollographql.apollo.cache.normalized.NormalizedCache nextCache; + method public java.util.Map,java.util.Map> dump(); + method public final com.apollographql.apollo.cache.normalized.NormalizedCache? getNextCache(); + method public abstract com.apollographql.apollo.cache.normalized.Record? loadRecord(String key, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public java.util.Collection loadRecords(java.util.Collection keys, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public java.util.Set merge(com.apollographql.apollo.cache.normalized.Record record, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public java.util.Set merge(java.util.Collection recordSet, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method protected abstract java.util.Set performMerge(com.apollographql.apollo.cache.normalized.Record apolloRecord, com.apollographql.apollo.cache.normalized.Record? oldRecord, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public static final String prettifyDump(java.util.Map,? extends java.util.Map> dump); + method public final boolean remove(com.apollographql.apollo.cache.normalized.CacheKey cacheKey); + method public abstract boolean remove(com.apollographql.apollo.cache.normalized.CacheKey cacheKey, boolean cascade); + property public final com.apollographql.apollo.cache.normalized.NormalizedCache? nextCache; field public static final com.apollographql.apollo.cache.normalized.NormalizedCache.Companion Companion; } public static final class NormalizedCache.Companion { - method public error.NonExistentClass prettifyDump(error.NonExistentClass); + method public String prettifyDump(java.util.Map,? extends java.util.Map> dump); } public abstract class NormalizedCacheFactory { ctor public NormalizedCacheFactory(); - method public final error.NonExistentClass chain(com.apollographql.apollo.cache.normalized.NormalizedCacheFactory); - method public abstract T create(com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter); - method public final com.apollographql.apollo.cache.normalized.NormalizedCache createChain(com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter); + method public final com.apollographql.apollo.cache.normalized.NormalizedCacheFactory chain(com.apollographql.apollo.cache.normalized.NormalizedCacheFactory factory); + method public abstract T create(com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter recordFieldAdapter); + method public final com.apollographql.apollo.cache.normalized.NormalizedCache createChain(com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter recordFieldAdapter); } public final class Record { - method public com.apollographql.apollo.cache.normalized.Record clone(); - method public error.NonExistentClass field(error.NonExistentClass); - method public error.NonExistentClass fields(); - method public error.NonExistentClass getFields(); - method public error.NonExistentClass getKey(); - method public error.NonExistentClass getMutationId(); - method public error.NonExistentClass hasField(error.NonExistentClass); - method public error.NonExistentClass key(); - method public error.NonExistentClass keys(); - method public error.NonExistentClass mergeWith(com.apollographql.apollo.cache.normalized.Record); - method public error.NonExistentClass mutationId(); - method public error.NonExistentClass referencedFields(); - method public error.NonExistentClass sizeEstimateBytes(); + method public static com.apollographql.apollo.cache.normalized.Record.Builder builder(String key); + method @Deprecated public com.apollographql.apollo.cache.normalized.Record clone(); + method public Object? field(String fieldKey); + method @Deprecated public java.util.Map fields(); + method public java.util.Map getFields(); + method public String getKey(); + method public java.util.UUID? getMutationId(); + method public boolean hasField(String fieldKey); + method @Deprecated public String key(); + method public java.util.Set keys(); + method public java.util.Set mergeWith(com.apollographql.apollo.cache.normalized.Record otherRecord); + method @Deprecated public java.util.UUID? mutationId(); + method public java.util.List referencedFields(); + method @kotlin.jvm.Synchronized public int sizeEstimateBytes(); method public com.apollographql.apollo.cache.normalized.Record.Builder toBuilder(); - method public error.NonExistentClass toString(); - property public final error.NonExistentClass fields; - property public final error.NonExistentClass mutationId; + method public String toString(); + property public final java.util.Map fields; + property public final java.util.UUID? mutationId; field public static final com.apollographql.apollo.cache.normalized.Record.Companion Companion; } public static final class Record.Builder { - ctor public Record.Builder(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.Record.Builder addField(error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.Record.Builder addFields(error.NonExistentClass); + ctor public Record.Builder(String key, java.util.Map fields, java.util.UUID? mutationId); + method public com.apollographql.apollo.cache.normalized.Record.Builder addField(String key, Object? value); + method public com.apollographql.apollo.cache.normalized.Record.Builder addFields(java.util.Map fields); method public com.apollographql.apollo.cache.normalized.Record build(); - method public error.NonExistentClass getKey(); - method public error.NonExistentClass key(); - method public com.apollographql.apollo.cache.normalized.Record.Builder mutationId(error.NonExistentClass); + method public String getKey(); + method @Deprecated public String key(); + method public com.apollographql.apollo.cache.normalized.Record.Builder mutationId(java.util.UUID? mutationId); } public static final class Record.Companion { - method public com.apollographql.apollo.cache.normalized.Record.Builder builder(error.NonExistentClass); + method public com.apollographql.apollo.cache.normalized.Record.Builder builder(String key); } public final class RecordFieldJsonAdapter { ctor public RecordFieldJsonAdapter(); - method public error.NonExistentClass from(error.NonExistentClass); - method public error.NonExistentClass toJson(error.NonExistentClass); + method @Deprecated public static com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter create(); + method @kotlin.jvm.Throws(exceptionClasses=IOException::class) public java.util.Map? from(String jsonFieldSource); + method public String toJson(java.util.Map fields); field public static final com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter.Companion Companion; } public static final class RecordFieldJsonAdapter.Companion { - method public com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter create(); + method @Deprecated public com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter create(); } public final class RecordSet { ctor public RecordSet(); - method public error.NonExistentClass allRecords(); - method public operator com.apollographql.apollo.cache.normalized.Record get(error.NonExistentClass); - method public error.NonExistentClass merge(com.apollographql.apollo.cache.normalized.Record); + method public java.util.Collection allRecords(); + method public operator com.apollographql.apollo.cache.normalized.Record? get(String key); + method public java.util.Set merge(com.apollographql.apollo.cache.normalized.Record apolloRecord); } } diff --git a/apollo-normalized-cache-api/build.gradle.kts b/apollo-normalized-cache-api/build.gradle.kts index 854fef8b9f9..0dbc3d19ff7 100644 --- a/apollo-normalized-cache-api/build.gradle.kts +++ b/apollo-normalized-cache-api/build.gradle.kts @@ -61,6 +61,10 @@ kotlin { } } +metalava { + hiddenPackages += setOf("com.apollographql.apollo.cache.normalized.internal") +} + tasks.withType { options.encoding = "UTF-8" } diff --git a/apollo-normalized-cache-sqlite/api.txt b/apollo-normalized-cache-sqlite/api.txt index ac7aaeda8cc..0cfb2f5441f 100644 --- a/apollo-normalized-cache-sqlite/api.txt +++ b/apollo-normalized-cache-sqlite/api.txt @@ -1,48 +1,53 @@ +// Signature format: 3.0 package com.apollographql.apollo.cache.normalized.sql { - public final deprecated class ApolloSqlHelper { - ctor public ApolloSqlHelper(error.NonExistentClass, error.NonExistentClass); - field public static final com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper.Companion Companion; + @Deprecated public final class ApolloSqlHelper { + ctor @Deprecated public ApolloSqlHelper(android.content.Context context, String? name); + method @Deprecated public static com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper create(android.content.Context context, String? name = "apollo.db"); + method @Deprecated public static com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper create(android.content.Context context); + field @Deprecated public static final com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper.Companion Companion; } - public static final class ApolloSqlHelper.Companion { - method public com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper create(error.NonExistentClass, error.NonExistentClass); + @Deprecated public static final class ApolloSqlHelper.Companion { + method @Deprecated public com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper create(android.content.Context context, String? name = "apollo.db"); + method @Deprecated public com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper create(android.content.Context context); } - public final class SqlNormalizedCache { + public final class SqlNormalizedCache extends com.apollographql.apollo.cache.normalized.NormalizedCache { method public void clearAll(); - method public void createRecord(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass deleteRecord(error.NonExistentClass); - method public error.NonExistentClass deleteRecords(error.NonExistentClass); - method public error.NonExistentClass dump(); - method public error.NonExistentClass loadRecord(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass loadRecords(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass merge(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass performMerge(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass remove(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass selectRecordForKey(error.NonExistentClass); - method public error.NonExistentClass selectRecordsForKey(error.NonExistentClass); + method public void createRecord(String key, String fields); + method public boolean deleteRecord(String key); + method public boolean deleteRecords(java.util.Collection keys); + method public com.apollographql.apollo.cache.normalized.Record? loadRecord(String key, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method protected java.util.Set performMerge(com.apollographql.apollo.cache.normalized.Record apolloRecord, com.apollographql.apollo.cache.normalized.Record? oldRecord, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public boolean remove(com.apollographql.apollo.cache.normalized.CacheKey cacheKey, boolean cascade); + method public com.apollographql.apollo.cache.normalized.Record? selectRecordForKey(String key); + method public java.util.List selectRecordsForKey(java.util.Collection keys); } - public final class SqlNormalizedCacheFactory { + public final class SqlNormalizedCacheFactory extends com.apollographql.apollo.cache.normalized.NormalizedCacheFactory { ctor public SqlNormalizedCacheFactory(); - ctor public SqlNormalizedCacheFactory(error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.sql.SqlNormalizedCache create(error.NonExistentClass); + ctor public SqlNormalizedCacheFactory(String name); + method public com.apollographql.apollo.cache.normalized.sql.SqlNormalizedCache create(com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter recordFieldAdapter); } - public final class SqlNormalizedCacheFactory { - ctor public SqlNormalizedCacheFactory(error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.sql.SqlNormalizedCache create(error.NonExistentClass); + public final class SqlNormalizedCacheFactory extends com.apollographql.apollo.cache.normalized.NormalizedCacheFactory { + ctor public SqlNormalizedCacheFactory(String url, java.util.Properties properties); + ctor public SqlNormalizedCacheFactory(String url); + method public com.apollographql.apollo.cache.normalized.sql.SqlNormalizedCache create(com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter recordFieldAdapter); field public static final com.apollographql.apollo.cache.normalized.sql.SqlNormalizedCacheFactory.Companion Companion; } public static final class SqlNormalizedCacheFactory.Companion { } - public final class SqlNormalizedCacheFactory { - ctor public SqlNormalizedCacheFactory(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - ctor public SqlNormalizedCacheFactory(com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper); - method public com.apollographql.apollo.cache.normalized.sql.SqlNormalizedCache create(error.NonExistentClass); + public final class SqlNormalizedCacheFactory extends com.apollographql.apollo.cache.normalized.NormalizedCacheFactory { + ctor public SqlNormalizedCacheFactory(android.content.Context context, String? name, androidx.sqlite.db.SupportSQLiteOpenHelper.Factory factory, boolean useNoBackupDirectory); + ctor public SqlNormalizedCacheFactory(android.content.Context context, String? name, androidx.sqlite.db.SupportSQLiteOpenHelper.Factory factory); + ctor public SqlNormalizedCacheFactory(android.content.Context context, String? name); + ctor public SqlNormalizedCacheFactory(android.content.Context context); + ctor public SqlNormalizedCacheFactory(com.apollographql.apollo.cache.normalized.sql.ApolloSqlHelper apolloSqlHelper); + method public com.apollographql.apollo.cache.normalized.sql.SqlNormalizedCache create(com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter recordFieldAdapter); } } diff --git a/apollo-normalized-cache/api.txt b/apollo-normalized-cache/api.txt index f320b1bcd05..762d5f4cc1c 100644 --- a/apollo-normalized-cache/api.txt +++ b/apollo-normalized-cache/api.txt @@ -1,73 +1,73 @@ +// Signature format: 3.0 package com.apollographql.apollo.cache.normalized { - public abstract interface ApolloStore { - method public abstract error.NonExistentClass cacheKeyResolver(); - method public abstract com.apollographql.apollo.cache.normalized.internal.ResponseNormalizer cacheResponseNormalizer(); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation clearAll(); - method public abstract com.apollographql.apollo.cache.normalized.internal.ResponseNormalizer networkResponseNormalizer(); - method public abstract error.NonExistentClass normalizedCache(); - method public abstract void publish(error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation read(error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation read(error.NonExistentClass, error.NonExistentClass, com.apollographql.apollo.cache.normalized.internal.ResponseNormalizer, error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation read(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public abstract R readTransaction(com.apollographql.apollo.cache.normalized.internal.Transaction); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation remove(error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation remove(error.NonExistentClass, error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation remove(error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation rollbackOptimisticUpdates(error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation rollbackOptimisticUpdatesAndPublish(error.NonExistentClass); - method public abstract void subscribe(com.apollographql.apollo.cache.normalized.ApolloStore.RecordChangeSubscriber); - method public abstract void unsubscribe(com.apollographql.apollo.cache.normalized.ApolloStore.RecordChangeSubscriber); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation write(error.NonExistentClass, D); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation write(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation writeAndPublish(error.NonExistentClass, D); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation writeAndPublish(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation writeOptimisticUpdates(error.NonExistentClass, D, error.NonExistentClass); - method public abstract com.apollographql.apollo.cache.normalized.ApolloStoreOperation writeOptimisticUpdatesAndPublish(error.NonExistentClass, D, error.NonExistentClass); - method public abstract R writeTransaction(com.apollographql.apollo.cache.normalized.internal.Transaction); + public interface ApolloStore { + method public com.apollographql.apollo.cache.normalized.CacheKeyResolver cacheKeyResolver(); + method public com.apollographql.apollo.cache.normalized.internal.ResponseNormalizer cacheResponseNormalizer(); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation clearAll(); + method public com.apollographql.apollo.cache.normalized.internal.ResponseNormalizer> networkResponseNormalizer(); + method public com.apollographql.apollo.cache.normalized.NormalizedCache normalizedCache(); + method public void publish(java.util.Set keys); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation read(com.apollographql.apollo.api.Operation operation); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation> read(com.apollographql.apollo.api.Operation operation, com.apollographql.apollo.api.internal.ResponseFieldMapper responseFieldMapper, com.apollographql.apollo.cache.normalized.internal.ResponseNormalizer responseNormalizer, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation read(com.apollographql.apollo.api.internal.ResponseFieldMapper fieldMapper, com.apollographql.apollo.cache.normalized.CacheKey cacheKey, com.apollographql.apollo.api.Operation.Variables variables); + method public R! readTransaction(com.apollographql.apollo.cache.normalized.internal.Transaction transaction); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation remove(com.apollographql.apollo.cache.normalized.CacheKey cacheKey); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation remove(com.apollographql.apollo.cache.normalized.CacheKey cacheKey, boolean cascade); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation remove(java.util.List cacheKeys); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation> rollbackOptimisticUpdates(error.NonExistentClass mutationId); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation rollbackOptimisticUpdatesAndPublish(error.NonExistentClass mutationId); + method public void subscribe(com.apollographql.apollo.cache.normalized.ApolloStore.RecordChangeSubscriber subscriber); + method public void unsubscribe(com.apollographql.apollo.cache.normalized.ApolloStore.RecordChangeSubscriber subscriber); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation> write(com.apollographql.apollo.api.Operation operation, D operationData); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation> write(com.apollographql.apollo.api.GraphqlFragment fragment, com.apollographql.apollo.cache.normalized.CacheKey cacheKey, com.apollographql.apollo.api.Operation.Variables variables); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation writeAndPublish(com.apollographql.apollo.api.Operation operation, D operationData); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation writeAndPublish(com.apollographql.apollo.api.GraphqlFragment fragment, com.apollographql.apollo.cache.normalized.CacheKey cacheKey, com.apollographql.apollo.api.Operation.Variables variables); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation> writeOptimisticUpdates(com.apollographql.apollo.api.Operation operation, D operationData, error.NonExistentClass mutationId); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation writeOptimisticUpdatesAndPublish(com.apollographql.apollo.api.Operation operation, D operationData, error.NonExistentClass mutationId); + method public R! writeTransaction(com.apollographql.apollo.cache.normalized.internal.Transaction transaction); field public static final com.apollographql.apollo.cache.normalized.ApolloStore.Companion Companion; + field public static final com.apollographql.apollo.cache.normalized.ApolloStore NO_APOLLO_STORE; } public static final class ApolloStore.Companion { - method public com.apollographql.apollo.cache.normalized.ApolloStore getNO_APOLLO_STORE(); - property public final com.apollographql.apollo.cache.normalized.ApolloStore NO_APOLLO_STORE; } - public static abstract interface ApolloStore.RecordChangeSubscriber { - method public abstract void onCacheRecordsChanged(error.NonExistentClass); + public static interface ApolloStore.RecordChangeSubscriber { + method public void onCacheRecordsChanged(java.util.Set changedRecordKeys); } public abstract class ApolloStoreOperation { - ctor protected ApolloStoreOperation(error.NonExistentClass); - method public void enqueue(com.apollographql.apollo.cache.normalized.ApolloStoreOperation.Callback); - method public final T execute(); - method public final void notifyFailure(error.NonExistentClass); - method public final void notifySuccess(T); - method protected abstract T perform(); + ctor protected ApolloStoreOperation(error.NonExistentClass dispatcher); + method public static final error.NonExistentClass! emptyExecutor(); + method public static final com.apollographql.apollo.cache.normalized.ApolloStoreOperation emptyOperation(T? result); + method public void enqueue(com.apollographql.apollo.cache.normalized.ApolloStoreOperation.Callback? callback); + method @kotlin.jvm.Throws(exceptionClasses=ApolloException::class) public final T! execute() throws com.apollographql.apollo.exception.ApolloException; + method public final void notifyFailure(Throwable t); + method public final void notifySuccess(T? result); + method protected abstract T! perform(); field public static final com.apollographql.apollo.cache.normalized.ApolloStoreOperation.Companion Companion; } - public static abstract interface ApolloStoreOperation.Callback { - method public abstract void onFailure(error.NonExistentClass); - method public abstract void onSuccess(T); + public static interface ApolloStoreOperation.Callback { + method public void onFailure(Throwable t); + method public void onSuccess(T? result); } public static final class ApolloStoreOperation.Companion { - method public error.NonExistentClass emptyExecutor(); - method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation emptyOperation(T); + method public error.NonExistentClass! emptyExecutor(); + method public com.apollographql.apollo.cache.normalized.ApolloStoreOperation emptyOperation(T? result); } - public final class OptimisticNormalizedCache { + public final class OptimisticNormalizedCache extends com.apollographql.apollo.cache.normalized.NormalizedCache { ctor public OptimisticNormalizedCache(); method public void clearAll(); - method public error.NonExistentClass dump(); - method public error.NonExistentClass loadRecord(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass loadRecords(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass mergeOptimisticUpdate(error.NonExistentClass); - method public error.NonExistentClass mergeOptimisticUpdates(error.NonExistentClass); - method public error.NonExistentClass performMerge(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass remove(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass removeOptimisticUpdates(error.NonExistentClass); + method public com.apollographql.apollo.cache.normalized.Record? loadRecord(String key, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public java.util.Set mergeOptimisticUpdate(com.apollographql.apollo.cache.normalized.Record record); + method public java.util.Set mergeOptimisticUpdates(java.util.Collection recordSet); + method protected java.util.Set performMerge(com.apollographql.apollo.cache.normalized.Record apolloRecord, com.apollographql.apollo.cache.normalized.Record? oldRecord, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public boolean remove(com.apollographql.apollo.cache.normalized.CacheKey cacheKey, boolean cascade); + method public java.util.Set removeOptimisticUpdates(error.NonExistentClass mutationId); } } @@ -75,46 +75,45 @@ package com.apollographql.apollo.cache.normalized { package com.apollographql.apollo.cache.normalized.lru { public final class EvictionPolicy { - method public error.NonExistentClass expireAfterAccess(); - method public error.NonExistentClass expireAfterAccessTimeUnit(); - method public error.NonExistentClass expireAfterWrite(); - method public error.NonExistentClass expireAfterWriteTimeUnit(); - method public error.NonExistentClass getExpireAfterAccess(); - method public error.NonExistentClass getExpireAfterAccessTimeUnit(); - method public error.NonExistentClass getExpireAfterWrite(); - method public error.NonExistentClass getExpireAfterWriteTimeUnit(); - method public error.NonExistentClass getMaxEntries(); - method public error.NonExistentClass getMaxSizeBytes(); - method public error.NonExistentClass maxEntries(); - method public error.NonExistentClass maxSizeBytes(); + method public static com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder builder(); + method @Deprecated public com.apollographql.apollo.api.internal.Optional expireAfterAccess(); + method @Deprecated public com.apollographql.apollo.api.internal.Optional expireAfterAccessTimeUnit(); + method @Deprecated public com.apollographql.apollo.api.internal.Optional expireAfterWrite(); + method @Deprecated public com.apollographql.apollo.api.internal.Optional expireAfterWriteTimeUnit(); + method public Long? getExpireAfterAccess(); + method public error.NonExistentClass? getExpireAfterAccessTimeUnit(); + method public Long? getExpireAfterWrite(); + method public error.NonExistentClass? getExpireAfterWriteTimeUnit(); + method public Long? getMaxEntries(); + method public Long? getMaxSizeBytes(); + method @Deprecated public com.apollographql.apollo.api.internal.Optional maxEntries(); + method @Deprecated public com.apollographql.apollo.api.internal.Optional maxSizeBytes(); field public static final com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Companion Companion; + field public static final com.apollographql.apollo.cache.normalized.lru.EvictionPolicy NO_EVICTION; } public static final class EvictionPolicy.Builder { method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy build(); - method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder expireAfterAccess(error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder expireAfterWrite(error.NonExistentClass, error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder maxEntries(error.NonExistentClass); - method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder maxSizeBytes(error.NonExistentClass); + method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder expireAfterAccess(long time, error.NonExistentClass timeUnit); + method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder expireAfterWrite(long time, error.NonExistentClass timeUnit); + method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder maxEntries(long maxEntries); + method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder maxSizeBytes(long maxSizeBytes); } public static final class EvictionPolicy.Companion { method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy.Builder builder(); - method public com.apollographql.apollo.cache.normalized.lru.EvictionPolicy getNO_EVICTION(); - property public final com.apollographql.apollo.cache.normalized.lru.EvictionPolicy NO_EVICTION; } - public final class LruNormalizedCache { + public final class LruNormalizedCache extends com.apollographql.apollo.cache.normalized.NormalizedCache { method public void clearAll(); - method public error.NonExistentClass dump(); - method public error.NonExistentClass loadRecord(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass performMerge(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass remove(error.NonExistentClass, error.NonExistentClass); + method public com.apollographql.apollo.cache.normalized.Record? loadRecord(String key, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method protected java.util.Set performMerge(com.apollographql.apollo.cache.normalized.Record apolloRecord, com.apollographql.apollo.cache.normalized.Record? oldRecord, com.apollographql.apollo.cache.CacheHeaders cacheHeaders); + method public boolean remove(com.apollographql.apollo.cache.normalized.CacheKey cacheKey, boolean cascade); } - public final class LruNormalizedCacheFactory { - ctor public LruNormalizedCacheFactory(com.apollographql.apollo.cache.normalized.lru.EvictionPolicy); - method public com.apollographql.apollo.cache.normalized.lru.LruNormalizedCache create(error.NonExistentClass); + public final class LruNormalizedCacheFactory extends com.apollographql.apollo.cache.normalized.NormalizedCacheFactory { + ctor public LruNormalizedCacheFactory(com.apollographql.apollo.cache.normalized.lru.EvictionPolicy evictionPolicy); + method public com.apollographql.apollo.cache.normalized.lru.LruNormalizedCache create(com.apollographql.apollo.cache.normalized.RecordFieldJsonAdapter recordFieldAdapter); } } diff --git a/apollo-normalized-cache/build.gradle.kts b/apollo-normalized-cache/build.gradle.kts index 0dcdcf1c7f6..353dc6d0d9f 100644 --- a/apollo-normalized-cache/build.gradle.kts +++ b/apollo-normalized-cache/build.gradle.kts @@ -50,6 +50,10 @@ kotlin { } } +metalava { + hiddenPackages += setOf("com.apollographql.apollo.cache.normalized.internal") +} + tasks.withType { options.encoding = "UTF-8" } diff --git a/apollo-runtime/api.txt b/apollo-runtime/api.txt index 2ae4b63e60b..dd2fa8921d4 100644 --- a/apollo-runtime/api.txt +++ b/apollo-runtime/api.txt @@ -1,33 +1,32 @@ +// Signature format: 3.0 package com.apollographql.apollo { - public abstract interface ApolloCall implements com.apollographql.apollo.internal.util.Cancelable { - method public abstract com.apollographql.apollo.ApolloCall cacheHeaders(CacheHeaders); - method public abstract void cancel(); - method public abstract com.apollographql.apollo.ApolloCall clone(); - method public abstract void enqueue(com.apollographql.apollo.ApolloCall.Callback); - method public abstract Operation operation(); - method public abstract com.apollographql.apollo.ApolloCall.Builder toBuilder(); + public interface ApolloCall { + method public com.apollographql.apollo.ApolloCall cacheHeaders(com.apollographql.apollo.cache.CacheHeaders); + method public void cancel(); + method public com.apollographql.apollo.ApolloCall clone(); + method public void enqueue(com.apollographql.apollo.ApolloCall.Callback?); + method public com.apollographql.apollo.api.Operation operation(); + method public com.apollographql.apollo.ApolloCall.Builder toBuilder(); } - public static abstract interface ApolloCall.Builder { - method public abstract com.apollographql.apollo.ApolloCall build(); - method public abstract com.apollographql.apollo.ApolloCall.Builder cacheHeaders(CacheHeaders); + public static interface ApolloCall.Builder { + method public com.apollographql.apollo.ApolloCall build(); + method public com.apollographql.apollo.ApolloCall.Builder cacheHeaders(com.apollographql.apollo.cache.CacheHeaders); } - public static abstract class ApolloCall.Callback { + public abstract static class ApolloCall.Callback { ctor public ApolloCall.Callback(); method public void onCanceledError(com.apollographql.apollo.exception.ApolloCanceledException); - method public abstract void onFailure(ApolloException); + method public abstract void onFailure(com.apollographql.apollo.exception.ApolloException); method public void onHttpError(com.apollographql.apollo.exception.ApolloHttpException); method public void onNetworkError(com.apollographql.apollo.exception.ApolloNetworkException); method public void onParseError(com.apollographql.apollo.exception.ApolloParseException); - method public abstract void onResponse(Response); + method public abstract void onResponse(com.apollographql.apollo.api.Response); method public void onStatusEvent(com.apollographql.apollo.ApolloCall.StatusEvent); } - public static final class ApolloCall.StatusEvent { - method public static com.apollographql.apollo.ApolloCall.StatusEvent valueOf(java.lang.String); - method public static final com.apollographql.apollo.ApolloCall.StatusEvent[] values(); + public enum ApolloCall.StatusEvent { enum_constant public static final com.apollographql.apollo.ApolloCall.StatusEvent COMPLETED; enum_constant public static final com.apollographql.apollo.ApolloCall.StatusEvent FETCH_CACHE; enum_constant public static final com.apollographql.apollo.ApolloCall.StatusEvent FETCH_NETWORK; @@ -37,195 +36,193 @@ package com.apollographql.apollo { public final class ApolloClient implements com.apollographql.apollo.ApolloMutationCall.Factory com.apollographql.apollo.ApolloPrefetch.Factory com.apollographql.apollo.ApolloQueryCall.Factory com.apollographql.apollo.ApolloSubscriptionCall.Factory { method public int activeCallsCount(); method public void addOnSubscriptionManagerStateChangeListener(com.apollographql.apollo.subscription.OnSubscriptionManagerStateChangeListener); - method public deprecated ApolloStore apolloStore(); - method public static com.apollographql.apollo.ApolloClient.Builder builder(); + method @Deprecated public com.apollographql.apollo.cache.normalized.ApolloStore! apolloStore(); + method public static com.apollographql.apollo.ApolloClient.Builder! builder(); method public void clearHttpCache(); - method public void clearNormalizedCache(ApolloStoreOperation.Callback); + method public void clearNormalizedCache(com.apollographql.apollo.cache.normalized.ApolloStoreOperation.Callback); method public boolean clearNormalizedCache(); - method public deprecated CacheHeaders defaultCacheHeaders(); + method @Deprecated public com.apollographql.apollo.cache.CacheHeaders! defaultCacheHeaders(); method public void disableSubscriptions(); method public void enableSubscriptions(); - method public ApolloStore getApolloStore(); + method public com.apollographql.apollo.cache.normalized.ApolloStore! getApolloStore(); method public List getApplicationInterceptorFactories(); method public List getApplicationInterceptors(); - method public com.apollographql.apollo.interceptor.ApolloInterceptorFactory getAutoPersistedOperationsInterceptorFactory(); - method public CacheHeaders getDefaultCacheHeaders(); + method public com.apollographql.apollo.interceptor.ApolloInterceptorFactory! getAutoPersistedOperationsInterceptorFactory(); + method public com.apollographql.apollo.cache.CacheHeaders! getDefaultCacheHeaders(); method public HttpCache getHttpCache(); - method public ScalarTypeAdapters getScalarTypeAdapters(); - method public HttpUrl getServerUrl(); - method public com.apollographql.apollo.internal.subscription.SubscriptionManager getSubscriptionManager(); - method public com.apollographql.apollo.subscription.SubscriptionManagerState getSubscriptionManagerState(); - method public void idleCallback(com.apollographql.apollo.IdleResourceCallback); - method public com.apollographql.apollo.ApolloMutationCall mutate(Mutation); - method public com.apollographql.apollo.ApolloMutationCall mutate(Mutation, D); - method public com.apollographql.apollo.ApolloClient.Builder newBuilder(); - method public com.apollographql.apollo.ApolloPrefetch prefetch(Operation); - method public com.apollographql.apollo.ApolloQueryCall query(Query); + method public com.apollographql.apollo.api.ScalarTypeAdapters! getScalarTypeAdapters(); + method public okhttp3.HttpUrl! getServerUrl(); + method public com.apollographql.apollo.internal.subscription.SubscriptionManager! getSubscriptionManager(); + method public com.apollographql.apollo.subscription.SubscriptionManagerState! getSubscriptionManagerState(); + method public void idleCallback(com.apollographql.apollo.IdleResourceCallback!); + method public com.apollographql.apollo.ApolloMutationCall! mutate(com.apollographql.apollo.api.Mutation); + method public com.apollographql.apollo.ApolloMutationCall! mutate(com.apollographql.apollo.api.Mutation, D); + method public com.apollographql.apollo.ApolloClient.Builder! newBuilder(); + method public com.apollographql.apollo.ApolloPrefetch! prefetch(com.apollographql.apollo.api.Operation); + method public com.apollographql.apollo.ApolloQueryCall! query(com.apollographql.apollo.api.Query); method public void removeOnSubscriptionManagerStateChangeListener(com.apollographql.apollo.subscription.OnSubscriptionManagerStateChangeListener); - method public com.apollographql.apollo.ApolloSubscriptionCall subscribe(Subscription); + method public com.apollographql.apollo.ApolloSubscriptionCall! subscribe(com.apollographql.apollo.api.Subscription); } public static class ApolloClient.Builder { - method public com.apollographql.apollo.ApolloClient.Builder addApplicationInterceptor(com.apollographql.apollo.interceptor.ApolloInterceptor); - method public com.apollographql.apollo.ApolloClient.Builder addApplicationInterceptorFactory(com.apollographql.apollo.interceptor.ApolloInterceptorFactory); - method public com.apollographql.apollo.ApolloClient.Builder addCustomTypeAdapter(ScalarType, CustomTypeAdapter); - method public com.apollographql.apollo.ApolloClient build(); - method public com.apollographql.apollo.ApolloClient.Builder callFactory(Call.Factory); - method public com.apollographql.apollo.ApolloClient.Builder defaultCacheHeaders(CacheHeaders); - method public com.apollographql.apollo.ApolloClient.Builder defaultHttpCachePolicy(HttpCachePolicy.Policy); - method public com.apollographql.apollo.ApolloClient.Builder defaultResponseFetcher(com.apollographql.apollo.fetcher.ResponseFetcher); - method public com.apollographql.apollo.ApolloClient.Builder dispatcher(Executor); - method public com.apollographql.apollo.ApolloClient.Builder enableAutoPersistedQueries(boolean); - method public com.apollographql.apollo.ApolloClient.Builder enableAutoPersistedSubscriptions(boolean); - method public com.apollographql.apollo.ApolloClient.Builder httpCache(HttpCache); - method public com.apollographql.apollo.ApolloClient.Builder logger(Logger); - method public com.apollographql.apollo.ApolloClient.Builder normalizedCache(NormalizedCacheFactory); - method public com.apollographql.apollo.ApolloClient.Builder normalizedCache(NormalizedCacheFactory, CacheKeyResolver); - method public com.apollographql.apollo.ApolloClient.Builder normalizedCache(NormalizedCacheFactory, CacheKeyResolver, boolean); - method public com.apollographql.apollo.ApolloClient.Builder okHttpClient(OkHttpClient); - method public com.apollographql.apollo.ApolloClient.Builder serverUrl(HttpUrl); - method public com.apollographql.apollo.ApolloClient.Builder serverUrl(String); - method public com.apollographql.apollo.ApolloClient.Builder setAutoPersistedOperationsInterceptorFactory(com.apollographql.apollo.interceptor.ApolloInterceptorFactory); - method public com.apollographql.apollo.ApolloClient.Builder subscriptionConnectionParams(com.apollographql.apollo.subscription.SubscriptionConnectionParams); - method public com.apollographql.apollo.ApolloClient.Builder subscriptionConnectionParams(com.apollographql.apollo.subscription.SubscriptionConnectionParamsProvider); - method public com.apollographql.apollo.ApolloClient.Builder subscriptionHeartbeatTimeout(long, TimeUnit); - method public com.apollographql.apollo.ApolloClient.Builder subscriptionTransportFactory(com.apollographql.apollo.subscription.SubscriptionTransport.Factory); - method public com.apollographql.apollo.ApolloClient.Builder useHttpGetMethodForPersistedQueries(boolean); - method public com.apollographql.apollo.ApolloClient.Builder useHttpGetMethodForQueries(boolean); - } - - public final class ApolloClientAwarenessInterceptor { - ctor public ApolloClientAwarenessInterceptor(error.NonExistentClass, error.NonExistentClass); - method public error.NonExistentClass getClientName(); - method public error.NonExistentClass getClientVersion(); - method public error.NonExistentClass intercept(error.NonExistentClass); - } - - public abstract interface ApolloMutationCall implements com.apollographql.apollo.ApolloCall { - method public abstract com.apollographql.apollo.ApolloMutationCall cacheHeaders(CacheHeaders); - method public abstract com.apollographql.apollo.ApolloMutationCall clone(); - method public abstract com.apollographql.apollo.ApolloMutationCall refetchQueries(OperationName...); - method public abstract com.apollographql.apollo.ApolloMutationCall refetchQueries(Query...); - method public abstract com.apollographql.apollo.ApolloMutationCall requestHeaders(com.apollographql.apollo.request.RequestHeaders); - method public abstract com.apollographql.apollo.ApolloMutationCall.Builder toBuilder(); - } - - public static abstract interface ApolloMutationCall.Builder implements com.apollographql.apollo.ApolloCall.Builder { - method public abstract com.apollographql.apollo.ApolloMutationCall build(); - method public abstract com.apollographql.apollo.ApolloMutationCall.Builder cacheHeaders(CacheHeaders); - method public abstract com.apollographql.apollo.ApolloMutationCall.Builder refetchQueries(List); - method public abstract com.apollographql.apollo.ApolloMutationCall.Builder refetchQueryNames(List); - method public abstract com.apollographql.apollo.ApolloMutationCall.Builder requestHeaders(com.apollographql.apollo.request.RequestHeaders); - } - - public static abstract interface ApolloMutationCall.Factory { - method public abstract com.apollographql.apollo.ApolloMutationCall mutate(Mutation); - method public abstract com.apollographql.apollo.ApolloMutationCall mutate(Mutation, D); - } - - public abstract interface ApolloPrefetch implements com.apollographql.apollo.internal.util.Cancelable { - method public abstract void cancel(); - method public abstract com.apollographql.apollo.ApolloPrefetch clone(); - method public abstract void enqueue(com.apollographql.apollo.ApolloPrefetch.Callback); - method public abstract Operation operation(); - } - - public static abstract class ApolloPrefetch.Callback { + method public com.apollographql.apollo.ApolloClient.Builder! addApplicationInterceptor(com.apollographql.apollo.interceptor.ApolloInterceptor); + method public com.apollographql.apollo.ApolloClient.Builder! addApplicationInterceptorFactory(com.apollographql.apollo.interceptor.ApolloInterceptorFactory); + method public com.apollographql.apollo.ApolloClient.Builder! addCustomTypeAdapter(com.apollographql.apollo.api.ScalarType, com.apollographql.apollo.api.CustomTypeAdapter); + method public com.apollographql.apollo.ApolloClient! build(); + method public com.apollographql.apollo.ApolloClient.Builder! callFactory(okhttp3.Call.Factory); + method public com.apollographql.apollo.ApolloClient.Builder! defaultCacheHeaders(com.apollographql.apollo.cache.CacheHeaders); + method public com.apollographql.apollo.ApolloClient.Builder! defaultHttpCachePolicy(HttpCachePolicy.Policy); + method public com.apollographql.apollo.ApolloClient.Builder! defaultResponseFetcher(com.apollographql.apollo.fetcher.ResponseFetcher); + method public com.apollographql.apollo.ApolloClient.Builder! dispatcher(Executor); + method public com.apollographql.apollo.ApolloClient.Builder! enableAutoPersistedQueries(boolean); + method public com.apollographql.apollo.ApolloClient.Builder! enableAutoPersistedSubscriptions(boolean); + method public com.apollographql.apollo.ApolloClient.Builder! httpCache(HttpCache); + method public com.apollographql.apollo.ApolloClient.Builder! logger(com.apollographql.apollo.Logger?); + method public com.apollographql.apollo.ApolloClient.Builder! normalizedCache(com.apollographql.apollo.cache.normalized.NormalizedCacheFactory); + method public com.apollographql.apollo.ApolloClient.Builder! normalizedCache(com.apollographql.apollo.cache.normalized.NormalizedCacheFactory, com.apollographql.apollo.cache.normalized.CacheKeyResolver); + method public com.apollographql.apollo.ApolloClient.Builder! normalizedCache(com.apollographql.apollo.cache.normalized.NormalizedCacheFactory, com.apollographql.apollo.cache.normalized.CacheKeyResolver, boolean); + method public com.apollographql.apollo.ApolloClient.Builder! okHttpClient(okhttp3.OkHttpClient); + method public com.apollographql.apollo.ApolloClient.Builder! serverUrl(okhttp3.HttpUrl); + method public com.apollographql.apollo.ApolloClient.Builder! serverUrl(String); + method public com.apollographql.apollo.ApolloClient.Builder! setAutoPersistedOperationsInterceptorFactory(com.apollographql.apollo.interceptor.ApolloInterceptorFactory?); + method public com.apollographql.apollo.ApolloClient.Builder! subscriptionConnectionParams(com.apollographql.apollo.subscription.SubscriptionConnectionParams); + method public com.apollographql.apollo.ApolloClient.Builder! subscriptionConnectionParams(com.apollographql.apollo.subscription.SubscriptionConnectionParamsProvider); + method public com.apollographql.apollo.ApolloClient.Builder! subscriptionHeartbeatTimeout(long, TimeUnit); + method public com.apollographql.apollo.ApolloClient.Builder! subscriptionTransportFactory(com.apollographql.apollo.subscription.SubscriptionTransport.Factory); + method public com.apollographql.apollo.ApolloClient.Builder! useHttpGetMethodForPersistedQueries(boolean); + method public com.apollographql.apollo.ApolloClient.Builder! useHttpGetMethodForQueries(boolean); + } + + public final class ApolloClientAwarenessInterceptor implements okhttp3.Interceptor { + ctor public ApolloClientAwarenessInterceptor(String clientName, String clientVersion); + method public String getClientName(); + method public String getClientVersion(); + method public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain); + } + + public interface ApolloMutationCall extends com.apollographql.apollo.ApolloCall { + method public com.apollographql.apollo.ApolloMutationCall cacheHeaders(com.apollographql.apollo.cache.CacheHeaders); + method public com.apollographql.apollo.ApolloMutationCall clone(); + method public com.apollographql.apollo.ApolloMutationCall refetchQueries(com.apollographql.apollo.api.OperationName!...); + method public com.apollographql.apollo.ApolloMutationCall refetchQueries(com.apollographql.apollo.api.Query!...); + method public com.apollographql.apollo.ApolloMutationCall requestHeaders(com.apollographql.apollo.request.RequestHeaders); + method public com.apollographql.apollo.ApolloMutationCall.Builder toBuilder(); + } + + public static interface ApolloMutationCall.Builder extends com.apollographql.apollo.ApolloCall.Builder { + method public com.apollographql.apollo.ApolloMutationCall build(); + method public com.apollographql.apollo.ApolloMutationCall.Builder cacheHeaders(com.apollographql.apollo.cache.CacheHeaders); + method public com.apollographql.apollo.ApolloMutationCall.Builder refetchQueries(List); + method public com.apollographql.apollo.ApolloMutationCall.Builder refetchQueryNames(List); + method public com.apollographql.apollo.ApolloMutationCall.Builder requestHeaders(com.apollographql.apollo.request.RequestHeaders); + } + + public static interface ApolloMutationCall.Factory { + method public com.apollographql.apollo.ApolloMutationCall! mutate(com.apollographql.apollo.api.Mutation); + method public com.apollographql.apollo.ApolloMutationCall! mutate(com.apollographql.apollo.api.Mutation, D); + } + + public interface ApolloPrefetch { + method public void cancel(); + method public com.apollographql.apollo.ApolloPrefetch! clone(); + method public void enqueue(com.apollographql.apollo.ApolloPrefetch.Callback?); + method public com.apollographql.apollo.api.Operation operation(); + } + + public abstract static class ApolloPrefetch.Callback { ctor public ApolloPrefetch.Callback(); method public void onCanceledError(com.apollographql.apollo.exception.ApolloCanceledException); - method public abstract void onFailure(ApolloException); + method public abstract void onFailure(com.apollographql.apollo.exception.ApolloException); method public void onHttpError(com.apollographql.apollo.exception.ApolloHttpException); method public void onNetworkError(com.apollographql.apollo.exception.ApolloNetworkException); method public abstract void onSuccess(); } - public static abstract interface ApolloPrefetch.Factory { - method public abstract com.apollographql.apollo.ApolloPrefetch prefetch(Operation); + public static interface ApolloPrefetch.Factory { + method public com.apollographql.apollo.ApolloPrefetch! prefetch(com.apollographql.apollo.api.Operation); } - public abstract interface ApolloQueryCall implements com.apollographql.apollo.ApolloCall { - method public abstract com.apollographql.apollo.ApolloQueryCall cacheHeaders(CacheHeaders); - method public abstract com.apollographql.apollo.ApolloQueryCall clone(); - method public abstract com.apollographql.apollo.ApolloQueryCall httpCachePolicy(HttpCachePolicy.Policy); - method public abstract com.apollographql.apollo.ApolloQueryCall requestHeaders(com.apollographql.apollo.request.RequestHeaders); - method public abstract com.apollographql.apollo.ApolloQueryCall responseFetcher(com.apollographql.apollo.fetcher.ResponseFetcher); - method public abstract com.apollographql.apollo.ApolloQueryCall.Builder toBuilder(); - method public abstract com.apollographql.apollo.ApolloQueryWatcher watcher(); + public interface ApolloQueryCall extends com.apollographql.apollo.ApolloCall { + method public com.apollographql.apollo.ApolloQueryCall cacheHeaders(com.apollographql.apollo.cache.CacheHeaders); + method public com.apollographql.apollo.ApolloQueryCall clone(); + method public com.apollographql.apollo.ApolloQueryCall httpCachePolicy(HttpCachePolicy.Policy); + method public com.apollographql.apollo.ApolloQueryCall requestHeaders(com.apollographql.apollo.request.RequestHeaders); + method public com.apollographql.apollo.ApolloQueryCall responseFetcher(com.apollographql.apollo.fetcher.ResponseFetcher); + method public com.apollographql.apollo.ApolloQueryCall.Builder toBuilder(); + method public com.apollographql.apollo.ApolloQueryWatcher watcher(); } - public static abstract interface ApolloQueryCall.Builder implements com.apollographql.apollo.ApolloCall.Builder { - method public abstract com.apollographql.apollo.ApolloQueryCall build(); - method public abstract com.apollographql.apollo.ApolloQueryCall.Builder cacheHeaders(CacheHeaders); - method public abstract com.apollographql.apollo.ApolloQueryCall.Builder httpCachePolicy(HttpCachePolicy.Policy); - method public abstract com.apollographql.apollo.ApolloQueryCall.Builder requestHeaders(com.apollographql.apollo.request.RequestHeaders); - method public abstract com.apollographql.apollo.ApolloQueryCall.Builder responseFetcher(com.apollographql.apollo.fetcher.ResponseFetcher); + public static interface ApolloQueryCall.Builder extends com.apollographql.apollo.ApolloCall.Builder { + method public com.apollographql.apollo.ApolloQueryCall build(); + method public com.apollographql.apollo.ApolloQueryCall.Builder cacheHeaders(com.apollographql.apollo.cache.CacheHeaders); + method public com.apollographql.apollo.ApolloQueryCall.Builder httpCachePolicy(HttpCachePolicy.Policy); + method public com.apollographql.apollo.ApolloQueryCall.Builder requestHeaders(com.apollographql.apollo.request.RequestHeaders); + method public com.apollographql.apollo.ApolloQueryCall.Builder responseFetcher(com.apollographql.apollo.fetcher.ResponseFetcher); } - public static abstract interface ApolloQueryCall.Factory { - method public abstract com.apollographql.apollo.ApolloQueryCall query(Query); + public static interface ApolloQueryCall.Factory { + method public com.apollographql.apollo.ApolloQueryCall! query(com.apollographql.apollo.api.Query); } - public abstract interface ApolloQueryWatcher implements com.apollographql.apollo.internal.util.Cancelable { - method public abstract void cancel(); - method public abstract com.apollographql.apollo.ApolloQueryWatcher clone(); - method public abstract com.apollographql.apollo.ApolloQueryWatcher enqueueAndWatch(com.apollographql.apollo.ApolloCall.Callback); - method public abstract Operation operation(); - method public abstract void refetch(); - method public abstract com.apollographql.apollo.ApolloQueryWatcher refetchResponseFetcher(com.apollographql.apollo.fetcher.ResponseFetcher); + public interface ApolloQueryWatcher { + method public void cancel(); + method public com.apollographql.apollo.ApolloQueryWatcher clone(); + method public com.apollographql.apollo.ApolloQueryWatcher! enqueueAndWatch(com.apollographql.apollo.ApolloCall.Callback?); + method public com.apollographql.apollo.api.Operation operation(); + method public void refetch(); + method public com.apollographql.apollo.ApolloQueryWatcher refetchResponseFetcher(com.apollographql.apollo.fetcher.ResponseFetcher); } - public abstract interface ApolloSubscriptionCall implements com.apollographql.apollo.internal.util.Cancelable { - method public abstract com.apollographql.apollo.ApolloSubscriptionCall cachePolicy(com.apollographql.apollo.ApolloSubscriptionCall.CachePolicy); - method public abstract com.apollographql.apollo.ApolloSubscriptionCall clone(); - method public abstract void execute(com.apollographql.apollo.ApolloSubscriptionCall.Callback); + public interface ApolloSubscriptionCall { + method public com.apollographql.apollo.ApolloSubscriptionCall cachePolicy(com.apollographql.apollo.ApolloSubscriptionCall.CachePolicy); + method public com.apollographql.apollo.ApolloSubscriptionCall! clone(); + method public void execute(com.apollographql.apollo.ApolloSubscriptionCall.Callback); } - public static final class ApolloSubscriptionCall.CachePolicy { - method public static com.apollographql.apollo.ApolloSubscriptionCall.CachePolicy valueOf(java.lang.String); - method public static final com.apollographql.apollo.ApolloSubscriptionCall.CachePolicy[] values(); + public enum ApolloSubscriptionCall.CachePolicy { enum_constant public static final com.apollographql.apollo.ApolloSubscriptionCall.CachePolicy CACHE_AND_NETWORK; enum_constant public static final com.apollographql.apollo.ApolloSubscriptionCall.CachePolicy NETWORK_ONLY; enum_constant public static final com.apollographql.apollo.ApolloSubscriptionCall.CachePolicy NO_CACHE; } - public static abstract interface ApolloSubscriptionCall.Callback { - method public abstract void onCompleted(); - method public abstract void onConnected(); - method public abstract void onFailure(ApolloException); - method public abstract void onResponse(Response); - method public abstract void onTerminated(); + public static interface ApolloSubscriptionCall.Callback { + method public void onCompleted(); + method public void onConnected(); + method public void onFailure(com.apollographql.apollo.exception.ApolloException); + method public void onResponse(com.apollographql.apollo.api.Response); + method public void onTerminated(); } - public static abstract interface ApolloSubscriptionCall.Factory { - method public abstract com.apollographql.apollo.ApolloSubscriptionCall subscribe(Subscription); + public static interface ApolloSubscriptionCall.Factory { + method public com.apollographql.apollo.ApolloSubscriptionCall! subscribe(com.apollographql.apollo.api.Subscription); } - public abstract interface IdleResourceCallback { - method public abstract void onIdle(); + public interface IdleResourceCallback { + method public void onIdle(); } } package com.apollographql.apollo.exception { - public final class ApolloCanceledException { + public final class ApolloCanceledException extends com.apollographql.apollo.exception.ApolloException { ctor public ApolloCanceledException(); ctor public ApolloCanceledException(String, Throwable); } - public final class ApolloHttpException { - ctor public ApolloHttpException(okhttp3.Response); + public final class ApolloHttpException extends com.apollographql.apollo.exception.ApolloException { + ctor public ApolloHttpException(okhttp3.Response?); method public int code(); method public String message(); - method public Response rawResponse(); + method public okhttp3.Response? rawResponse(); } - public final class ApolloNetworkException { + public final class ApolloNetworkException extends com.apollographql.apollo.exception.ApolloException { ctor public ApolloNetworkException(String); ctor public ApolloNetworkException(String, Throwable); } - public final class ApolloParseException { + public final class ApolloParseException extends com.apollographql.apollo.exception.ApolloException { ctor public ApolloParseException(String); ctor public ApolloParseException(String, Throwable); } @@ -236,33 +233,32 @@ package com.apollographql.apollo.fetcher { public final class ApolloResponseFetchers { ctor public ApolloResponseFetchers(); - field public static final com.apollographql.apollo.fetcher.ResponseFetcher CACHE_AND_NETWORK; - field public static final com.apollographql.apollo.fetcher.ResponseFetcher CACHE_FIRST; - field public static final com.apollographql.apollo.fetcher.ResponseFetcher CACHE_ONLY; - field public static final com.apollographql.apollo.fetcher.ResponseFetcher NETWORK_FIRST; - field public static final com.apollographql.apollo.fetcher.ResponseFetcher NETWORK_ONLY; + field public static final com.apollographql.apollo.fetcher.ResponseFetcher! CACHE_AND_NETWORK; + field public static final com.apollographql.apollo.fetcher.ResponseFetcher! CACHE_FIRST; + field public static final com.apollographql.apollo.fetcher.ResponseFetcher! CACHE_ONLY; + field public static final com.apollographql.apollo.fetcher.ResponseFetcher! NETWORK_FIRST; + field public static final com.apollographql.apollo.fetcher.ResponseFetcher! NETWORK_ONLY; } - public abstract interface ResponseFetcher { - method public abstract com.apollographql.apollo.interceptor.ApolloInterceptor provideInterceptor(ApolloLogger); + public interface ResponseFetcher { + method public com.apollographql.apollo.interceptor.ApolloInterceptor! provideInterceptor(com.apollographql.apollo.api.internal.ApolloLogger!); } } package com.apollographql.apollo.http { - public final class OkHttpExecutionContext { - ctor public OkHttpExecutionContext(error.NonExistentClass); - method public error.NonExistentClass getKey(); - method public error.NonExistentClass getResponse(); - property public error.NonExistentClass key; - property public final error.NonExistentClass response; + @com.apollographql.apollo.api.ApolloExperimental public final class OkHttpExecutionContext implements com.apollographql.apollo.api.ExecutionContext.Element { + ctor public OkHttpExecutionContext(okhttp3.Response response); + method public com.apollographql.apollo.api.ExecutionContext.Key getKey(); + method public okhttp3.Response getResponse(); + property public com.apollographql.apollo.api.ExecutionContext.Key key; + property public final okhttp3.Response response; + field public static final com.apollographql.apollo.http.OkHttpExecutionContext.Key KEY; field public static final com.apollographql.apollo.http.OkHttpExecutionContext.Key Key; } - public static final class OkHttpExecutionContext.Key { - method public com.apollographql.apollo.http.OkHttpExecutionContext.Key getKEY(); - property public final com.apollographql.apollo.http.OkHttpExecutionContext.Key KEY; + public static final class OkHttpExecutionContext.Key implements com.apollographql.apollo.api.ExecutionContext.Key { } } @@ -270,7 +266,7 @@ package com.apollographql.apollo.http { package com.apollographql.apollo.interceptor { public class ApolloAutoPersistedOperationInterceptor implements com.apollographql.apollo.interceptor.ApolloInterceptor { - ctor public ApolloAutoPersistedOperationInterceptor(ApolloLogger, boolean); + ctor public ApolloAutoPersistedOperationInterceptor(com.apollographql.apollo.api.internal.ApolloLogger, boolean); method public void dispose(); method public void interceptAsync(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest, com.apollographql.apollo.interceptor.ApolloInterceptorChain, Executor, com.apollographql.apollo.interceptor.ApolloInterceptor.CallBack); } @@ -278,69 +274,67 @@ package com.apollographql.apollo.interceptor { public static class ApolloAutoPersistedOperationInterceptor.Factory implements com.apollographql.apollo.interceptor.ApolloInterceptorFactory { ctor public ApolloAutoPersistedOperationInterceptor.Factory(boolean, boolean, boolean); ctor public ApolloAutoPersistedOperationInterceptor.Factory(); - method public com.apollographql.apollo.interceptor.ApolloInterceptor newInterceptor(ApolloLogger, Operation); + method public com.apollographql.apollo.interceptor.ApolloInterceptor? newInterceptor(com.apollographql.apollo.api.internal.ApolloLogger, com.apollographql.apollo.api.Operation); } - public abstract interface ApolloInterceptor { - method public abstract void dispose(); - method public abstract void interceptAsync(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest, com.apollographql.apollo.interceptor.ApolloInterceptorChain, Executor, com.apollographql.apollo.interceptor.ApolloInterceptor.CallBack); + public interface ApolloInterceptor { + method public void dispose(); + method public void interceptAsync(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest, com.apollographql.apollo.interceptor.ApolloInterceptorChain, Executor, com.apollographql.apollo.interceptor.ApolloInterceptor.CallBack); } - public static abstract interface ApolloInterceptor.CallBack { - method public abstract void onCompleted(); - method public abstract void onFailure(ApolloException); - method public abstract void onFetch(com.apollographql.apollo.interceptor.ApolloInterceptor.FetchSourceType); - method public abstract void onResponse(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorResponse); + public static interface ApolloInterceptor.CallBack { + method public void onCompleted(); + method public void onFailure(com.apollographql.apollo.exception.ApolloException); + method public void onFetch(com.apollographql.apollo.interceptor.ApolloInterceptor.FetchSourceType!); + method public void onResponse(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorResponse); } - public static final class ApolloInterceptor.FetchSourceType { - method public static com.apollographql.apollo.interceptor.ApolloInterceptor.FetchSourceType valueOf(java.lang.String); - method public static final com.apollographql.apollo.interceptor.ApolloInterceptor.FetchSourceType[] values(); + public enum ApolloInterceptor.FetchSourceType { enum_constant public static final com.apollographql.apollo.interceptor.ApolloInterceptor.FetchSourceType CACHE; enum_constant public static final com.apollographql.apollo.interceptor.ApolloInterceptor.FetchSourceType NETWORK; } public static final class ApolloInterceptor.InterceptorRequest { - method public static com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder builder(Operation); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder toBuilder(); + method public static com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! builder(com.apollographql.apollo.api.Operation); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! toBuilder(); field public final boolean autoPersistQueries; - field public final CacheHeaders cacheHeaders; + field public final com.apollographql.apollo.cache.CacheHeaders! cacheHeaders; field public final boolean fetchFromCache; - field public final Operation operation; - field public final Optional optimisticUpdates; - field public final com.apollographql.apollo.request.RequestHeaders requestHeaders; + field public final com.apollographql.apollo.api.Operation! operation; + field public final com.apollographql.apollo.api.internal.Optional! optimisticUpdates; + field public final com.apollographql.apollo.request.RequestHeaders! requestHeaders; field public final boolean sendQueryDocument; field public final UUID uniqueId; field public final boolean useHttpGetMethodForQueries; } public static final class ApolloInterceptor.InterceptorRequest.Builder { - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder autoPersistQueries(boolean); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest build(); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder cacheHeaders(CacheHeaders); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder fetchFromCache(boolean); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder optimisticUpdates(Operation.Data); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder optimisticUpdates(Optional); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder requestHeaders(com.apollographql.apollo.request.RequestHeaders); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder sendQueryDocument(boolean); - method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder useHttpGetMethodForQueries(boolean); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! autoPersistQueries(boolean); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest! build(); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! cacheHeaders(com.apollographql.apollo.cache.CacheHeaders); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! fetchFromCache(boolean); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! optimisticUpdates(com.apollographql.apollo.api.Operation.Data!); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! optimisticUpdates(com.apollographql.apollo.api.internal.Optional); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! requestHeaders(com.apollographql.apollo.request.RequestHeaders); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! sendQueryDocument(boolean); + method public com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest.Builder! useHttpGetMethodForQueries(boolean); } public static final class ApolloInterceptor.InterceptorResponse { - ctor public ApolloInterceptor.InterceptorResponse(okhttp3.Response); - ctor public ApolloInterceptor.InterceptorResponse(okhttp3.Response, Response, Collection); - field public final Optional> cacheRecords; - field public final Optional httpResponse; - field public final Optional parsedResponse; + ctor public ApolloInterceptor.InterceptorResponse(okhttp3.Response!); + ctor public ApolloInterceptor.InterceptorResponse(okhttp3.Response!, com.apollographql.apollo.api.Response!, Collection); + field public final com.apollographql.apollo.api.internal.Optional>! cacheRecords; + field public final com.apollographql.apollo.api.internal.Optional! httpResponse; + field public final com.apollographql.apollo.api.internal.Optional! parsedResponse; } - public abstract interface ApolloInterceptorChain { - method public abstract void dispose(); - method public abstract void proceedAsync(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest, Executor, com.apollographql.apollo.interceptor.ApolloInterceptor.CallBack); + public interface ApolloInterceptorChain { + method public void dispose(); + method public void proceedAsync(com.apollographql.apollo.interceptor.ApolloInterceptor.InterceptorRequest, Executor, com.apollographql.apollo.interceptor.ApolloInterceptor.CallBack); } - public abstract interface ApolloInterceptorFactory { - method public abstract com.apollographql.apollo.interceptor.ApolloInterceptor newInterceptor(error.NonExistentClass, error.NonExistentClass); + public interface ApolloInterceptorFactory { + method public com.apollographql.apollo.interceptor.ApolloInterceptor? newInterceptor(com.apollographql.apollo.api.internal.ApolloLogger logger, com.apollographql.apollo.api.Operation operation); } } @@ -348,69 +342,69 @@ package com.apollographql.apollo.interceptor { package com.apollographql.apollo.request { public final class RequestHeaders { - method public static com.apollographql.apollo.request.RequestHeaders.Builder builder(); + method public static com.apollographql.apollo.request.RequestHeaders.Builder! builder(); method public boolean hasHeader(String); method public String headerValue(String); method public Set headers(); - method public com.apollographql.apollo.request.RequestHeaders.Builder toBuilder(); - field public static final com.apollographql.apollo.request.RequestHeaders NONE; + method public com.apollographql.apollo.request.RequestHeaders.Builder! toBuilder(); + field public static final com.apollographql.apollo.request.RequestHeaders! NONE; } public static final class RequestHeaders.Builder { ctor public RequestHeaders.Builder(); - method public com.apollographql.apollo.request.RequestHeaders.Builder addHeader(String, String); - method public com.apollographql.apollo.request.RequestHeaders.Builder addHeaders(Map); - method public com.apollographql.apollo.request.RequestHeaders build(); + method public com.apollographql.apollo.request.RequestHeaders.Builder! addHeader(String, String); + method public com.apollographql.apollo.request.RequestHeaders.Builder! addHeaders(Map); + method public com.apollographql.apollo.request.RequestHeaders! build(); } } package com.apollographql.apollo.response { - public final class OperationResponseParser { - ctor public OperationResponseParser(Operation, ResponseFieldMapper, ScalarTypeAdapters); - ctor public OperationResponseParser(Operation, ResponseFieldMapper, ScalarTypeAdapters, ResponseNormalizer>); - method public Response parse(Map); - method public Response parse(BufferedSource); - method public static Error parseError(Map); + public final class OperationResponseParser { + ctor public OperationResponseParser(com.apollographql.apollo.api.Operation!, com.apollographql.apollo.api.internal.ResponseFieldMapper!, com.apollographql.apollo.api.ScalarTypeAdapters!); + ctor public OperationResponseParser(com.apollographql.apollo.api.Operation!, com.apollographql.apollo.api.internal.ResponseFieldMapper!, com.apollographql.apollo.api.ScalarTypeAdapters!, com.apollographql.apollo.cache.normalized.internal.ResponseNormalizer>!); + method public com.apollographql.apollo.api.Response! parse(Map); + method public com.apollographql.apollo.api.Response! parse(okio.BufferedSource!); + method public static com.apollographql.apollo.api.Error! parseError(Map); } } package com.apollographql.apollo.subscription { - public abstract interface OnSubscriptionManagerStateChangeListener { - method public abstract void onStateChange(com.apollographql.apollo.subscription.SubscriptionManagerState, com.apollographql.apollo.subscription.SubscriptionManagerState); + public interface OnSubscriptionManagerStateChangeListener { + method public void onStateChange(com.apollographql.apollo.subscription.SubscriptionManagerState!, com.apollographql.apollo.subscription.SubscriptionManagerState!); } public abstract class OperationClientMessage { method public String toJsonString(); - method public abstract void writeToJson(JsonWriter); + method public abstract void writeToJson(com.apollographql.apollo.api.internal.json.JsonWriter); } public static final class OperationClientMessage.Init extends com.apollographql.apollo.subscription.OperationClientMessage { - ctor public OperationClientMessage.Init(Map); - method public void writeToJson(JsonWriter); + ctor public OperationClientMessage.Init(Map); + method public void writeToJson(com.apollographql.apollo.api.internal.json.JsonWriter); } public static final class OperationClientMessage.Start extends com.apollographql.apollo.subscription.OperationClientMessage { - ctor public OperationClientMessage.Start(String, Subscription, ScalarTypeAdapters, boolean, boolean); - method public void writeToJson(JsonWriter); + ctor public OperationClientMessage.Start(String, com.apollographql.apollo.api.Subscription, com.apollographql.apollo.api.ScalarTypeAdapters, boolean, boolean); + method public void writeToJson(com.apollographql.apollo.api.internal.json.JsonWriter); field public final boolean autoPersistSubscription; field public final boolean sendSubscriptionDocument; - field public final Subscription subscription; + field public final com.apollographql.apollo.api.Subscription! subscription; field public final String subscriptionId; } public static final class OperationClientMessage.Stop extends com.apollographql.apollo.subscription.OperationClientMessage { ctor public OperationClientMessage.Stop(String); - method public void writeToJson(JsonWriter); + method public void writeToJson(com.apollographql.apollo.api.internal.json.JsonWriter); field public final String subscriptionId; } public static final class OperationClientMessage.Terminate extends com.apollographql.apollo.subscription.OperationClientMessage { ctor public OperationClientMessage.Terminate(); - method public void writeToJson(JsonWriter); + method public void writeToJson(com.apollographql.apollo.api.internal.json.JsonWriter); } public abstract class OperationServerMessage { @@ -429,9 +423,9 @@ package com.apollographql.apollo.subscription { } public static final class OperationServerMessage.ConnectionError extends com.apollographql.apollo.subscription.OperationServerMessage { - ctor public OperationServerMessage.ConnectionError(Map); + ctor public OperationServerMessage.ConnectionError(Map); field public static final String TYPE; - field public final Map payload; + field public final Map payload; } public static final class OperationServerMessage.ConnectionKeepAlive extends com.apollographql.apollo.subscription.OperationServerMessage { @@ -440,17 +434,17 @@ package com.apollographql.apollo.subscription { } public static final class OperationServerMessage.Data extends com.apollographql.apollo.subscription.OperationServerMessage { - ctor public OperationServerMessage.Data(String, Map); + ctor public OperationServerMessage.Data(String, Map); field public static final String TYPE; field public final String id; - field public final Map payload; + field public final Map payload; } public static final class OperationServerMessage.Error extends com.apollographql.apollo.subscription.OperationServerMessage { - ctor public OperationServerMessage.Error(String, Map); + ctor public OperationServerMessage.Error(String, Map); field public static final String TYPE; field public final String id; - field public final Map payload; + field public final Map payload; } public static final class OperationServerMessage.Unsupported extends com.apollographql.apollo.subscription.OperationServerMessage { @@ -460,11 +454,11 @@ package com.apollographql.apollo.subscription { public final class SubscriptionConnectionParams { ctor public SubscriptionConnectionParams(); - ctor public SubscriptionConnectionParams(Map); + ctor public SubscriptionConnectionParams(Map); } - public abstract interface SubscriptionConnectionParamsProvider { - method public abstract com.apollographql.apollo.subscription.SubscriptionConnectionParams provide(); + public interface SubscriptionConnectionParamsProvider { + method public com.apollographql.apollo.subscription.SubscriptionConnectionParams provide(); } public static class SubscriptionConnectionParamsProvider.Const implements com.apollographql.apollo.subscription.SubscriptionConnectionParamsProvider { @@ -472,9 +466,7 @@ package com.apollographql.apollo.subscription { method public com.apollographql.apollo.subscription.SubscriptionConnectionParams provide(); } - public final class SubscriptionManagerState { - method public static com.apollographql.apollo.subscription.SubscriptionManagerState valueOf(java.lang.String); - method public static final com.apollographql.apollo.subscription.SubscriptionManagerState[] values(); + public enum SubscriptionManagerState { enum_constant public static final com.apollographql.apollo.subscription.SubscriptionManagerState ACTIVE; enum_constant public static final com.apollographql.apollo.subscription.SubscriptionManagerState CONNECTED; enum_constant public static final com.apollographql.apollo.subscription.SubscriptionManagerState CONNECTING; @@ -483,33 +475,33 @@ package com.apollographql.apollo.subscription { enum_constant public static final com.apollographql.apollo.subscription.SubscriptionManagerState STOPPING; } - public abstract interface SubscriptionTransport { - method public abstract void connect(); - method public abstract void disconnect(com.apollographql.apollo.subscription.OperationClientMessage); - method public abstract void send(com.apollographql.apollo.subscription.OperationClientMessage); + public interface SubscriptionTransport { + method public void connect(); + method public void disconnect(com.apollographql.apollo.subscription.OperationClientMessage!); + method public void send(com.apollographql.apollo.subscription.OperationClientMessage!); } - public static abstract interface SubscriptionTransport.Callback { - method public abstract void onClosed(); - method public abstract void onConnected(); - method public abstract void onFailure(Throwable); - method public abstract void onMessage(com.apollographql.apollo.subscription.OperationServerMessage); + public static interface SubscriptionTransport.Callback { + method public void onClosed(); + method public void onConnected(); + method public void onFailure(Throwable); + method public void onMessage(com.apollographql.apollo.subscription.OperationServerMessage!); } - public static abstract interface SubscriptionTransport.Factory { - method public abstract com.apollographql.apollo.subscription.SubscriptionTransport create(com.apollographql.apollo.subscription.SubscriptionTransport.Callback); + public static interface SubscriptionTransport.Factory { + method public com.apollographql.apollo.subscription.SubscriptionTransport! create(com.apollographql.apollo.subscription.SubscriptionTransport.Callback); } public final class WebSocketSubscriptionTransport implements com.apollographql.apollo.subscription.SubscriptionTransport { - ctor public WebSocketSubscriptionTransport(Request, WebSocket.Factory, com.apollographql.apollo.subscription.SubscriptionTransport.Callback); + ctor public WebSocketSubscriptionTransport(okhttp3.Request!, okhttp3.WebSocket.Factory!, com.apollographql.apollo.subscription.SubscriptionTransport.Callback!); method public void connect(); - method public void disconnect(com.apollographql.apollo.subscription.OperationClientMessage); - method public void send(com.apollographql.apollo.subscription.OperationClientMessage); + method public void disconnect(com.apollographql.apollo.subscription.OperationClientMessage!); + method public void send(com.apollographql.apollo.subscription.OperationClientMessage!); } public static final class WebSocketSubscriptionTransport.Factory implements com.apollographql.apollo.subscription.SubscriptionTransport.Factory { - ctor public WebSocketSubscriptionTransport.Factory(String, WebSocket.Factory); - method public com.apollographql.apollo.subscription.SubscriptionTransport create(com.apollographql.apollo.subscription.SubscriptionTransport.Callback); + ctor public WebSocketSubscriptionTransport.Factory(String, okhttp3.WebSocket.Factory); + method public com.apollographql.apollo.subscription.SubscriptionTransport! create(com.apollographql.apollo.subscription.SubscriptionTransport.Callback); } } diff --git a/apollo-runtime/build.gradle.kts b/apollo-runtime/build.gradle.kts index 39d9474058a..a064ce5ca36 100644 --- a/apollo-runtime/build.gradle.kts +++ b/apollo-runtime/build.gradle.kts @@ -3,6 +3,10 @@ plugins { kotlin("jvm") } +metalava { + hiddenPackages += setOf("com.apollographql.apollo.internal") +} + dependencies { api(project(":apollo-api")) api(project(":apollo-normalized-cache")) diff --git a/apollo-rx2-support/api.txt b/apollo-rx2-support/api.txt index b7d205a89f0..3f1e26905b2 100644 --- a/apollo-rx2-support/api.txt +++ b/apollo-rx2-support/api.txt @@ -1,26 +1,16 @@ +// Signature format: 3.0 package com.apollographql.apollo.rx2 { public final class KotlinExtensions { - ctor public KotlinExtensions(); - method public static inline error.NonExistentClass rx(error.NonExistentClass); - method public static inline error.NonExistentClass rx(error.NonExistentClass); - method public static inline error.NonExistentClass rx(error.NonExistentClass); - method public static inline error.NonExistentClass rx(error.NonExistentClass); - method public static inline error.NonExistentClass rx(error.NonExistentClass, error.NonExistentClass); - method public static inline error.NonExistentClass rxMutate(error.NonExistentClass, error.NonExistentClass, kotlin.jvm.functions.Function1); - method public static inline error.NonExistentClass rxMutate(error.NonExistentClass, error.NonExistentClass, D, kotlin.jvm.functions.Function1); - method public static inline error.NonExistentClass rxPrefetch(error.NonExistentClass, error.NonExistentClass); - method public static inline error.NonExistentClass rxQuery(error.NonExistentClass, error.NonExistentClass, kotlin.jvm.functions.Function1); - method public static inline error.NonExistentClass rxSubscribe(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); } public class Rx2Apollo { - method public static Observable> from(ApolloQueryWatcher); - method public static Observable> from(ApolloCall); - method public static Completable from(ApolloPrefetch); - method public static Flowable> from(ApolloSubscriptionCall); - method public static Flowable> from(ApolloSubscriptionCall, BackpressureStrategy); - method public static Single from(ApolloStoreOperation); + method @io.reactivex.annotations.CheckReturnValue public static io.reactivex.Observable!> from(com.apollographql.apollo.ApolloQueryWatcher); + method @io.reactivex.annotations.CheckReturnValue public static io.reactivex.Observable!> from(com.apollographql.apollo.ApolloCall); + method @io.reactivex.annotations.CheckReturnValue public static io.reactivex.Completable from(com.apollographql.apollo.ApolloPrefetch); + method @io.reactivex.annotations.CheckReturnValue public static io.reactivex.Flowable!> from(com.apollographql.apollo.ApolloSubscriptionCall); + method @io.reactivex.annotations.CheckReturnValue public static io.reactivex.Flowable!> from(com.apollographql.apollo.ApolloSubscriptionCall, io.reactivex.BackpressureStrategy); + method @io.reactivex.annotations.CheckReturnValue public static io.reactivex.Single from(com.apollographql.apollo.cache.normalized.ApolloStoreOperation); } } diff --git a/apollo-rx3-support/api.txt b/apollo-rx3-support/api.txt index 87ad60ffaed..616520646fd 100644 --- a/apollo-rx3-support/api.txt +++ b/apollo-rx3-support/api.txt @@ -1,26 +1,16 @@ +// Signature format: 3.0 package com.apollographql.apollo.rx3 { public final class KotlinExtensions { - ctor public KotlinExtensions(); - method public static inline error.NonExistentClass rx(error.NonExistentClass); - method public static inline error.NonExistentClass rx(error.NonExistentClass); - method public static inline error.NonExistentClass rx(error.NonExistentClass); - method public static inline error.NonExistentClass rx(error.NonExistentClass); - method public static inline error.NonExistentClass rx(error.NonExistentClass, error.NonExistentClass); - method public static inline error.NonExistentClass rxMutate(error.NonExistentClass, error.NonExistentClass, kotlin.jvm.functions.Function1); - method public static inline error.NonExistentClass rxMutate(error.NonExistentClass, error.NonExistentClass, D, kotlin.jvm.functions.Function1); - method public static inline error.NonExistentClass rxPrefetch(error.NonExistentClass, error.NonExistentClass); - method public static inline error.NonExistentClass rxQuery(error.NonExistentClass, error.NonExistentClass, kotlin.jvm.functions.Function1); - method public static inline error.NonExistentClass rxSubscribe(error.NonExistentClass, error.NonExistentClass, error.NonExistentClass); } public class Rx3Apollo { - method public static Observable> from(ApolloQueryWatcher); - method public static Observable> from(ApolloCall); - method public static Completable from(ApolloPrefetch); - method public static Flowable> from(ApolloSubscriptionCall); - method public static Flowable> from(ApolloSubscriptionCall, BackpressureStrategy); - method public static Single from(ApolloStoreOperation); + method @io.reactivex.rxjava3.annotations.CheckReturnValue public static io.reactivex.rxjava3.core.Observable!> from(com.apollographql.apollo.ApolloQueryWatcher); + method @io.reactivex.rxjava3.annotations.CheckReturnValue public static io.reactivex.rxjava3.core.Observable!> from(com.apollographql.apollo.ApolloCall); + method @io.reactivex.rxjava3.annotations.CheckReturnValue public static io.reactivex.rxjava3.core.Completable from(com.apollographql.apollo.ApolloPrefetch); + method @io.reactivex.rxjava3.annotations.CheckReturnValue public static io.reactivex.rxjava3.core.Flowable!> from(com.apollographql.apollo.ApolloSubscriptionCall); + method @io.reactivex.rxjava3.annotations.CheckReturnValue public static io.reactivex.rxjava3.core.Flowable!> from(com.apollographql.apollo.ApolloSubscriptionCall, io.reactivex.rxjava3.core.BackpressureStrategy); + method @io.reactivex.rxjava3.annotations.CheckReturnValue public static io.reactivex.rxjava3.core.Single from(com.apollographql.apollo.cache.normalized.ApolloStoreOperation); } } diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 3539dbdf2c6..a9d8aa24aa7 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -17,6 +17,7 @@ dependencies { implementation(groovy.util.Eval.x(project, "x.dep.moshi.moshi")) implementation(groovy.util.Eval.x(project, "x.dep.android.plugin")) implementation(groovy.util.Eval.x(project, "x.dep.gradleJapiCmpPlugin")) + implementation(groovy.util.Eval.x(project, "x.dep.gradleMetalavaPlugin")) implementation(groovy.util.Eval.x(project, "x.dep.kotlin.plugin")) implementation(groovy.util.Eval.x(project, "x.dep.sqldelight.plugin")) implementation(groovy.util.Eval.x(project, "x.dep.gradlePublishPlugin")) diff --git a/buildSrc/src/main/kotlin/ApiCompatibility.kt b/buildSrc/src/main/kotlin/ApiCompatibility.kt index 73be561086f..382d72da7ff 100644 --- a/buildSrc/src/main/kotlin/ApiCompatibility.kt +++ b/buildSrc/src/main/kotlin/ApiCompatibility.kt @@ -1,15 +1,9 @@ import JapiCmp.configureJapiCmp -import MetalavaHelper.configureMetalava +import me.tylerbwong.gradle.metalava.plugin.MetalavaPlugin import org.gradle.api.Project object ApiCompatibility { fun configure(project: Project) { - - val downloadMetalavaJar = project.tasks.register("downloadMetalava", DownloadFileTask::class.java) { - it.url.set("https://storage.googleapis.com/android-ci/metalava-full-1.3.0-SNAPSHOT.jar") - it.output.set(project.layout.buildDirectory.file("metalava/metalava.jar")) - } - project.subprojects { when(it.name) { "apollo-compiler" -> { @@ -22,7 +16,7 @@ object ApiCompatibility { } else -> { it.configureJapiCmp() - it.configureMetalava(downloadMetalavaJar) + MetalavaPlugin().apply(it) } } diff --git a/buildSrc/src/main/kotlin/DownloadFileTask.kt b/buildSrc/src/main/kotlin/DownloadFileTask.kt deleted file mode 100644 index 992f0f018b5..00000000000 --- a/buildSrc/src/main/kotlin/DownloadFileTask.kt +++ /dev/null @@ -1,25 +0,0 @@ -import org.gradle.api.DefaultTask -import org.gradle.api.file.RegularFileProperty -import org.gradle.api.provider.Property -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.TaskAction - -abstract class DownloadFileTask : DefaultTask() { - @get:Input - abstract val url: Property - - @get:org.gradle.api.tasks.OutputFile - abstract val output: RegularFileProperty - - @TaskAction - fun taskAction() { - val client = okhttp3.OkHttpClient() - val request = okhttp3.Request.Builder().get().url(url.get()).build() - - client.newCall(request).execute().body!!.byteStream().use { body -> - output.asFile.get().outputStream().buffered().use { file -> - body.copyTo(file) - } - } - } -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/MetalavaHelper.kt b/buildSrc/src/main/kotlin/MetalavaHelper.kt deleted file mode 100644 index caafac6d37d..00000000000 --- a/buildSrc/src/main/kotlin/MetalavaHelper.kt +++ /dev/null @@ -1,54 +0,0 @@ -import org.gradle.api.Project -import org.gradle.api.tasks.JavaExec -import org.gradle.api.tasks.TaskProvider -import org.jetbrains.kotlin.konan.file.File - -object MetalavaHelper { - fun Project.configureMetalava(downloadMetalavaJar: TaskProvider) { - val tmpApiTxt = layout.buildDirectory.file("metalava/api.txt").get().asFile.absolutePath - val apiTxt = "api.txt" - registerMetalavaApiTxtTask("generateMetalava", apiTxt, downloadMetalavaJar) - val generateTmpMetalavaApi = registerMetalavaApiTxtTask("generateTmpMetalavaApi", tmpApiTxt, downloadMetalavaJar) - - tasks.register("checkMetalava", JavaExec::class.java) { - it.dependsOn(generateTmpMetalavaApi) - it.classpath(downloadMetalavaJar.flatMap { it.output.asFile }) - - val args = listOf("--no-banner", - "--source-files", tmpApiTxt, - "--check-compatibility:api:current", apiTxt - ) - - it.setArgs(args) - } - } - - fun Project.registerMetalavaApiTxtTask(name: String, apiTxt: String, downloadMetalavaJar: TaskProvider): TaskProvider { - return tasks.register(name, JavaExec::class.java) { - it.classpath(downloadMetalavaJar.flatMap { it.output.asFile }) - - val sources = file("src").walk() - .maxDepth(2) - .onEnter { !it.name.toLowerCase().contains("test") } - .filter { - it.isDirectory - && (it.name == "java" || it.name == "kotlin") - } - .toList() - - val hides = sources.flatMap { - it.walk().filter { it.isDirectory && it.name == "internal" }.toList() - }.map { - it.relativeTo(projectDir).path.split(File.separator).drop(3).joinToString(".") - }.distinct() - - val sourcePaths = listOf("--source-path") + sources.joinToString(":") - val hidePackages = hides.flatMap { listOf("--hide-package", it) } - - val args = listOf("--no-banner", "--api", apiTxt) + sourcePaths + hidePackages - - it.setIgnoreExitValue(true) - it.setArgs(args) - } - } -} \ No newline at end of file diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index d68498da63e..a6316a3f97f 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -55,6 +55,7 @@ ext.dep = [ kotlinCompileTesting : "com.github.tschuchortdev:kotlin-compile-testing:1.2.10", cache : "com.nytimes.android:cache:$versions.cache", gradleJapiCmpPlugin : "me.champeau.gradle:japicmp-gradle-plugin:0.2.8", + gradleMetalavaPlugin : "me.tylerbwong.gradle:metalava-gradle:0.1.4", vanniktechPlugin : "com.vanniktech:gradle-maven-publish-plugin:0.11.1", gradlePublishPlugin : "com.gradle.publish:plugin-publish-plugin:0.12.0", guavaJre : "com.google.guava:guava:$versions.guava", diff --git a/scripts/ci.sh b/scripts/ci.sh index 37fee2f4b3d..ded474ec835 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -10,6 +10,6 @@ export PATH="$ANDROID_HOME"/tools/bin:$PATH # remove when it's working again ./gradlew -p composite build -i # check that the public API did not change with Metalava -./gradlew checkMetalava +./gradlew metalavaCheckCompatibility ./gradlew publishSnapshotsIfNeeded --parallel