com.apollographql.apollo.gradle.GraphQLSourceDirectorySet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apollo-gradle-plugin-deprecated Show documentation
Show all versions of apollo-gradle-plugin-deprecated Show documentation
Gradle plugin for generating java classes for graphql files. This plugin is deprecated, use apollo-gradle-plugin instead.
package com.apollographql.apollo.gradle;
import org.gradle.api.file.SourceDirectorySet;
import org.gradle.api.model.ObjectFactory;
public final class GraphQLSourceDirectorySet {
public static final String NAME = "graphql";
static final String SCHEMA_FILE_NAME = "schema.json";
private static final String GRAPHQL_QUERY_PATTERN = "**/*.graphql";
private static final String GQL_QUERY_PATTERN = "**/*.gql";
private static final String SCHEMA_FILE_PATTERN = "**/" + SCHEMA_FILE_NAME;
public static SourceDirectorySet create(String name, ObjectFactory objectFactory) {
SourceDirectorySet sourceSet = objectFactory.sourceDirectorySet(NAME, String.format("%s GraphQL source", NAME));
sourceSet.srcDir("src/" + name + "/graphql");
sourceSet.include(GRAPHQL_QUERY_PATTERN, GQL_QUERY_PATTERN, SCHEMA_FILE_PATTERN);
return sourceSet;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy