@Override public T getByName(String name, Action<? super T> configureAction) throws UnknownTaskException { return delegate.getByName(name, configureAction); }
@Override public T getByName(String name, Closure configureClosure) throws UnknownTaskException { return delegate.getByName(name, configureClosure); }
@Override public T getByName(String name) throws UnknownTaskException { return delegate.getByName(name); }
private void createCompileTask(final Project project) { project.getTasks().create(GwtCompileTask.NAME, GwtCompileTask.class); final GwtExtension extension = project.getExtensions().getByType(GwtExtension.class); final War warTask = project.getTasks().withType(War.class).getByName("war"); warTask.dependsOn(GwtCompileTask.NAME); project.getTasks().withType(GwtCompileTask.class, new Action<GwtCompileTask>() { @Override public void execute(final GwtCompileTask task) { task.configure(project, extension); warTask.from(extension.getCompile().getWar()); } }); }
private URI getCompiledClassesDir() { return this.getProject().getTasks().withType(JavaCompile.class).getByName("compileJava").getDestinationDir().toURI(); }
private URI getCompiledClassesDir() { return this.getProject().getTasks().withType(JavaCompile.class).getByName("compileJava").getDestinationDir().toURI(); }
private void createCompileTask(final Project project) { project.getTasks().create(GwtCompileTask.NAME, GwtCompileTask.class); final PutnamiExtension extension = project.getExtensions().getByType(PutnamiExtension.class); final War warTask = project.getTasks().withType(War.class).getByName("war"); warTask.dependsOn(GwtCompileTask.NAME); project.getTasks().withType(GwtCompileTask.class, new Action<GwtCompileTask>() { @Override public void execute(final GwtCompileTask task) { task.configure(project, extension); warTask.from(extension.getCompile().getWar()); } }); ConfigurationContainer configurationContainer = project.getConfigurations(); // Configuration gwtConfig = configurationContainer.getByName(PwtLibPlugin.CONF_GWT_SDM); // FileCollection warClasspath = warTask.getClasspath().minus(gwtConfig); // warTask.setClasspath(warClasspath); }
private String getLocalDistFileName(final Project p) { return p.getConvention().getPlugin(BasePluginConvention.class).getArchivesBaseName() + "-dev." + p.getTasks().withType(Jar.class).getByName("jar").getExtension(); } }
private void includeSourcesToJar(Project project) { Jar jarTask = project.getTasks() .withType(Jar.class) .getByName("jar"); JavaPluginConvention javaConvention = project.getConvention() .getPlugin(JavaPluginConvention.class); SourceSet mainSourset = javaConvention.getSourceSets() .getByName("main"); jarTask.from(mainSourset.getAllSource()); }
private void includeSourcesToJar(Project project) { Jar jarTask = project.getTasks().withType(Jar.class).getByName("jar"); JavaPluginConvention javaConvention = project.getConvention().getPlugin(JavaPluginConvention.class); SourceSet mainSourset = javaConvention.getSourceSets().getByName("main"); jarTask.from(mainSourset.getAllSource()); }
private void includeSourcesForTest(Project project) { JavaPluginConvention javaConvention = project.getConvention().getPlugin(JavaPluginConvention.class); SourceSet mainSourset = javaConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME); SourceSet testSourset = javaConvention.getSourceSets().getByName(SourceSet.TEST_SOURCE_SET_NAME); FileCollection testClasspath = project .files(mainSourset.getAllSource().getSrcDirs().toArray()) .plus(project.files(testSourset.getAllSource().getSrcDirs().toArray())) .plus(testSourset.getRuntimeClasspath()); testSourset.setRuntimeClasspath(testClasspath); Test test = project.getTasks().withType(Test.class).getByName("test"); test.getSystemProperties().put("gwt.persistentunitcachedir", project.getBuildDir() + "/putnami/test"); }
private void includeSourcesForTest(Project project) { JavaPluginConvention javaConvention = project.getConvention() .getPlugin(JavaPluginConvention.class); SourceSet mainSourset = javaConvention.getSourceSets() .getByName(SourceSet.MAIN_SOURCE_SET_NAME); SourceSet testSourset = javaConvention.getSourceSets() .getByName(SourceSet.TEST_SOURCE_SET_NAME); FileCollection testClasspath = project.files(mainSourset.getAllSource() .getSrcDirs().toArray()) .plus(project.files(testSourset .getAllSource() .getSrcDirs() .toArray())) .plus(testSourset .getRuntimeClasspath()); testSourset.setRuntimeClasspath(testClasspath); Test test = project.getTasks().withType(Test.class).getByName("test"); test.getSystemProperties() .put("gwt.persistentunitcachedir", project.getBuildDir() + GwtExtension.DIRECTORY + "/test"); }
dist.rename( ".*", pro.getConvention().getPlugin(BasePluginConvention.class).getArchivesBaseName() + '.' + pro.getTasks().withType(Jar.class).getByName("jar").getExtension() ); });
private void AssertMinikubeTaskConfig( TaskCollection<MinikubeTask> tc, String taskName, String taskCommand) { MinikubeTask minikubeTask = tc.getByName(taskName); Assert.assertEquals(minikubeTask.getMinikube(), "minikube"); Assert.assertEquals(minikubeTask.getCommand(), taskCommand); Assert.assertArrayEquals(minikubeTask.getFlags(), new String[] {}); }
final Jar jarTask = project.getTasks().withType(Jar.class).getByName("jar"); jarTask.doFirst(task -> { jarTask.getManifest().attributes(JosmPluginExtension.forProject(project).getManifest().createJosmPluginJarManifest());
target.getExtensions().add("doovCodeGen", container); JavaCompile compileJava = target.getTasks().withType(JavaCompile.class).getByName("compileJava"); JavaPluginConvention javaPluginConvention = target.getConvention().findPlugin(JavaPluginConvention.class); SourceSet generated = javaPluginConvention.getSourceSets().maybeCreate("generated");