Java Code Examples for org.gradle.api.DefaultTask#dependsOn()
The following examples show how to use
org.gradle.api.DefaultTask#dependsOn() .
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
Source File: JavaBasePlugin.java From javaide with GNU General Public License v3.0 | 4 votes |
private void configureBuildNeeded(Project project) { DefaultTask buildTask = project.getTasks().create(BUILD_NEEDED_TASK_NAME, DefaultTask.class); buildTask.setDescription("Assembles and tests this project and all projects it depends on."); buildTask.setGroup(BasePlugin.BUILD_GROUP); buildTask.dependsOn(BUILD_TASK_NAME); }
Example 2
Source File: JavaBasePlugin.java From javaide with GNU General Public License v3.0 | 4 votes |
private void configureBuildDependents(Project project) { DefaultTask buildTask = project.getTasks().create(BUILD_DEPENDENTS_TASK_NAME, DefaultTask.class); buildTask.setDescription("Assembles and tests this project and all projects that depend on it."); buildTask.setGroup(BasePlugin.BUILD_GROUP); buildTask.dependsOn(BUILD_TASK_NAME); }
Example 3
Source File: HelmPlugin.java From gradle-plugins with Apache License 2.0 | 4 votes |
public void apply(Project project) { project.getPlugins().apply(CliExecPlugin.class); HelmExtension extension = project.getExtensions().create("helm", HelmExtension.class); extension.setProject(project); // extension.setKubeConfig(KubernetesUtils.getDefaultKubeConfig(project)); HelmBootstrap helmBootstrap = project.getTasks().create("helmBootstrap", HelmBootstrap.class); DefaultTask helmPackages = project.getTasks().create("helmPackage", DefaultTask.class); HelmPublish helmPublish = project.getTasks().create("helmPublish", HelmPublish.class); Task helmUpdateRepository = project.getTasks().create("helmUpdateRepository", HelmUpdateRepository.class); DefaultTask helmPackagePrepare = project.getTasks().create("helmPackagePrepare", DefaultTask.class); helmPackagePrepare.dependsOn(helmBootstrap); helmUpdateRepository.dependsOn(helmBootstrap); helmPublish.dependsOn(helmUpdateRepository); helmPublish.dependsOn(helmPackages); CliExecExtension cliExec = project.getExtensions().getByType(CliExecExtension.class); cliExec.register("helm", extension.getCli()); Set<String> packageNames = extension.getPackageNames(); for (String packageName : packageNames) { HelmPackage helmPackage = project.getTasks().create("helmPackage" + toCamelCase(packageName), HelmPackage.class); helmPackage.setPackageName(packageName); helmPackage.dependsOn(helmPackagePrepare); helmPackages.dependsOn(helmPackage); } project.afterEvaluate(project1 -> { Cli cli = extension.getCli(); if (cli.isDockerized()) { helmBootstrap.setEnabled(false); } else if (cli.getDownload()) { helmBootstrap.src(cli.getDownloadUrl()); File downloadDir = cli.getDownloadDir(); downloadDir.mkdirs(); helmBootstrap.dest(downloadDir); } else { helmBootstrap.setEnabled(false); } }); }