Java Code Examples for org.gradle.api.plugins.ExtensionContainer#add()

The following examples show how to use org.gradle.api.plugins.ExtensionContainer#add() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private void configureModularity(Project project, String moduleName) {
    ExtensionContainer extensions = project.getExtensions();
    extensions.add("moduleName", moduleName);
    extensions.create("patchModules", PatchModuleExtension.class);
    extensions.create(ModularityExtension.class, "modularity", DefaultModularityExtension.class, project);

    new CompileTask(project).configureCompileJava();
    new CompileModuleInfoTask(project).configureCompileModuleInfoJava();
    new MergeClassesTask(project).configureMergeClasses();
    new CompileTestTask(project).configureCompileTestJava();
    new TestTask(project).configureTestJava();
    new RunTask(project).configureRun();
    new JavadocTask(project).configureJavaDoc();
    ModularJavaExec.configure(project);
    ModularCreateStartScripts.configure(project);
    PatchModuleContainer.configure(project);
}
 
Example 2
@Mutate
void registerPlatformExtension(ExtensionContainer extensions, PlatformContainer platforms) {
    extensions.add("platforms", platforms);
}
 
Example 3
@Mutate
public void registerExtensions(ExtensionContainer extensions, BuildTypeContainer buildTypes, FlavorContainer flavors) {
    extensions.add("buildTypes", buildTypes);
    extensions.add("flavors", flavors);
}
 
Example 4
@Mutate
void registerPlatformExtension(ExtensionContainer extensions, PlatformContainer platforms) {
    extensions.add("platforms", platforms);
}
 
Example 5
@Mutate
public void registerExtensions(ExtensionContainer extensions, BuildTypeContainer buildTypes, FlavorContainer flavors) {
    extensions.add("buildTypes", buildTypes);
    extensions.add("flavors", flavors);
}