Package com.google.ads.googleads.codegen
Class RunCodeGenerators
java.lang.Object
com.google.ads.googleads.codegen.RunCodeGenerators
Generates various classes which require knowing the available Google Ads API major versions.
This cannot run as an annotation processor, since we need to know all the available versions. An annotation processor only has access to the annotations from the current compilation step, which in the case of a multi-module build, is only the sources from that module. So we would only be able to detect a single version at a time.
-
Constructor Summary
ConstructorsConstructorDescriptionRunCodeGenerators(File targetDirectory) RunCodeGenerators(File targetDirectory, Map<com.google.ads.googleads.lib.stubs.annotations.VersionDescriptor, Class<?>> versionDescriptors) Creates a new instance.RunCodeGenerators(File targetDirectory, Set<Class<?>> annotatedClasses) -
Method Summary
-
Constructor Details
-
RunCodeGenerators
-
RunCodeGenerators
-
RunCodeGenerators
public RunCodeGenerators(File targetDirectory, Map<com.google.ads.googleads.lib.stubs.annotations.VersionDescriptor, Class<?>> versionDescriptors) Creates a new instance.- Parameters:
targetDirectory- directory to contain the generated code.versionDescriptors- defines the mapping from VersionDescriptor to its declaring class.
-
-
Method Details
-
main
Defines the main entry point to run the code generators. This is invoked from gradle.Requires a single argument, the output directory in which to write generated code.
-
runAll
public void runAll()Runs the code generators.
-