All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.apollographql.android.gradle.ApolloExtension Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package com.apollographql.android.gradle;

import groovy.lang.Closure;

import java.util.LinkedHashMap;
import java.util.Map;

public class ApolloExtension {
  static final String NAME = "apollo";
  private boolean generateClasses = true;
  private Map customTypeMapping = new LinkedHashMap<>();

  public boolean isGenerateClasses() {
    return generateClasses;
  }

  public void setGenerateClasses(boolean generateClasses) {
    this.generateClasses = generateClasses;
  }

  public Map getCustomTypeMapping() {
    return customTypeMapping;
  }

  public void setCustomTypeMapping(Map customTypeMapping) {
    this.customTypeMapping = customTypeMapping;
  }

  public void setCustomTypeMapping(Closure closure) {
    closure.setDelegate(customTypeMapping);
    closure.setResolveStrategy(Closure.DELEGATE_FIRST);
    closure.call();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy