com.apollographql.apollo.gradle.ApolloExtension Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-gradle-plugin Show documentation
Show all versions of apollo-gradle-plugin Show documentation
Gradle plugin for generating java/kotlin classes for graphql files
package com.apollographql.apollo.gradle;
import com.apollographql.apollo.compiler.NullableValueType;
import groovy.lang.Closure;
import java.util.LinkedHashMap;
import java.util.Map;
public class ApolloExtension {
static final String NAME = "apollo";
private Map customTypeMapping = new LinkedHashMap<>();
private String nullableValueType = NullableValueType.ANNOTATED.getValue();
private boolean useSemanticNaming = true;
private boolean generateModelBuilder;
private String schemaFilePath;
private String outputPackageName;
public Map getCustomTypeMapping() {
return customTypeMapping;
}
public void setCustomTypeMapping(Map customTypeMapping) {
this.customTypeMapping = customTypeMapping;
}
public String getNullableValueType() {
return nullableValueType;
}
public void setNullableValueType(String nullableValueType) {
this.nullableValueType = nullableValueType;
}
public void setUseSemanticNaming(boolean useSemanticNaming) {
this.useSemanticNaming = useSemanticNaming;
}
public boolean isUseSemanticNaming() {
return useSemanticNaming;
}
public boolean isGenerateModelBuilder() {
return generateModelBuilder;
}
public void setGenerateModelBuilder(boolean generateModelBuilder) {
this.generateModelBuilder = generateModelBuilder;
}
public void setCustomTypeMapping(Closure closure) {
closure.setDelegate(customTypeMapping);
closure.setResolveStrategy(Closure.DELEGATE_FIRST);
closure.call();
}
public String getSchemaFilePath() {
return schemaFilePath;
}
public void setSchemaFilePath(String schemaFilePath) {
this.schemaFilePath = schemaFilePath;
}
public String getOutputPackageName() {
return outputPackageName;
}
public void setOutputPackageName(String outputPackageName) {
this.outputPackageName = outputPackageName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy