Search in sources :

Example 1 with NullableValueType

use of com.apollographql.apollo.compiler.NullableValueType in project apollo-android by apollographql.

the class ApolloClassGenTask method generateClasses.

@TaskAction
void generateClasses(IncrementalTaskInputs inputs) {
    final NullableValueType nullableValueType = this.nullableValueType == null ? NullableValueType.ANNOTATED : NullableValueType.Companion.findByValue(this.nullableValueType);
    inputs.outOfDate(new Action<InputFileDetails>() {

        @Override
        public void execute(@NotNull InputFileDetails inputFileDetails) {
            GraphQLCompiler.Arguments args = new GraphQLCompiler.Arguments(inputFileDetails.getFile(), outputDir, customTypeMapping, nullableValueType, useSemanticNaming, generateModelBuilder, useJavaBeansSemanticNaming, outputPackageName);
            new GraphQLCompiler().write(args);
        }
    });
}
Also used : NullableValueType(com.apollographql.apollo.compiler.NullableValueType) InputFileDetails(org.gradle.api.tasks.incremental.InputFileDetails) GraphQLCompiler(com.apollographql.apollo.compiler.GraphQLCompiler) TaskAction(org.gradle.api.tasks.TaskAction)

Aggregations

GraphQLCompiler (com.apollographql.apollo.compiler.GraphQLCompiler)1 NullableValueType (com.apollographql.apollo.compiler.NullableValueType)1 TaskAction (org.gradle.api.tasks.TaskAction)1 InputFileDetails (org.gradle.api.tasks.incremental.InputFileDetails)1