public void setOutputTo(String outputTo) { this.outputTo.set(destinationDir.file(outputTo)); }
public File getDestinationDir() { return destinationDir.getAsFile().get(); }
private void setDefaults(GatewayDeveloperPluginConfig pluginConfig, Project project) { if (!pluginConfig.getSolutionDir().isPresent()) { pluginConfig.getSolutionDir().set(new File(project.getProjectDir(), "src/main/gateway")); } if (!pluginConfig.getBuiltBundleDir().isPresent()) { pluginConfig.getBuiltBundleDir().set(new File(new File(project.getBuildDir(), GATEWAY_BUILD_DIRECTORY), BUILT_BUNDLE_DIRECTORY)); } } }
public void setOutputDir(File outputDir) { this.outputDir.set(outputDir); }
public EtaInstallAllDependencies() { this.project = getProject(); this.destinationDir = project.getLayout().directoryProperty(); destinationDir.set(project.getLayout().getBuildDirectory() .dir(DEFAULT_DESTINATION_DIR)); this.freezeConfigFile = project.provider (() -> destinationDir .file(EtaResolveDependencies.DEFAULT_FREEZE_CONFIG_FILENAME) .get().getAsFile()); this.cabalFile = destinationDir .file(project.provider(() -> project.getName() + DEFAULT_CABAL_FILENAME)); getOutputs().upToDateWhen(task -> false); }
t.getFrom().set(pluginConfig.getSolutionDir()); t.getInto().set(pluginConfig.getBuiltBundleDir()); t.getDependencies().setFrom(project.getConfigurations().getByName(BUNDLE_CONFIGURATION)); }); t.dependsOn(buildBundleTask); t.getInto().set(new File(new File(project.getBuildDir(), GATEWAY_BUILD_DIRECTORY), project.getName() + ".gw7")); t.getBundle().set(pluginConfig.getBuiltBundleDir().file(project.getName() + ".req.bundle")); t.getEnvironmentBundle().set(pluginConfig.getBuiltBundleDir().file("_" + project.getName() + "-env.req.bundle")); t.getDependencyBundles().setFrom(project.getConfigurations().getByName(BUNDLE_CONFIGURATION)); });
@NotNull private static BuildDeploymentBundleTask createBuildDeploymentBundleTask(@NotNull Project project, GatewayDeveloperPluginConfig pluginConfig) { // Create build-bundle task return project.getTasks().create("build-bundle", BuildDeploymentBundleTask.class, t -> { t.dependsOn(project.getConfigurations().getByName(BUNDLE_CONFIGURATION)); t.getFrom().set(new DefaultProvider<>(() -> { Directory dir = pluginConfig.getSolutionDir().get(); return dir.getAsFile().exists() ? dir : null; })); t.getInto().set(pluginConfig.getBuiltBundleDir()); t.getDependencies().setFrom(project.getConfigurations().getByName(BUNDLE_CONFIGURATION)); }); }
private EtaInfo fetchEtaInfo(EtlasCommand etlas, ResolvedExecutable eta, boolean changed) { File infoFile = getProject().getLayout().getBuildDirectory() .dir(ETA_INTERMEDIATES_DIRECTORY).get().file(INFO_FILENAME).getAsFile();
.dir(etaSourceSet.getRelativeOutputDir()); project.getLayout().getBuildDirectory(); if (sourceSet.getOutput().isLegacyLayout()) { return buildDir.dir(buildDir.getAsFile().get().toPath() .relativize(sourceSet.getOutput() .getClassesDir().toPath()) .toString()).get(); return buildDir.dir(etaSourceSet.getClassesDir()).get(); });
@TaskAction public void perform() { BundleFileBuilder bundleFileBuilder = ConfigBuilderModule.getInjector().getInstance(BundleFileBuilder.class); bundleFileBuilder.buildBundle(from.isPresent() ? from.getAsFile().get() : null, into.getAsFile().get(), filterBundleFiles(dependencies.getFiles()), getProject().getName() + '-' + getProject().getVersion()); } }
/** * Path to other Checkstyle configuration files. By default, this path is {@code $rootProject.projectDir/config/checkstyle} * <p> * This path will be exposed as the variable {@code config_loc} in Checkstyle's configuration files. * </p> * @return path to other Checkstyle configuration files * @since 4.0 * */ @Incubating public File getConfigDir() { return configDir.get().getAsFile(); }
public void setDestinationDir(Provider<Directory> destinationDir) { this.destinationDir.set(destinationDir); }
public EtaInstallDependencies() { this.project = getProject(); this.freezeConfigFile = project.files(); this.destinationDir = project.getLayout().directoryProperty(); final EtaExtension extension = project.getRootProject().getExtensions().getByType(EtaExtension.class); this.etaInfo = extension.getEtaInfo(); destinationDir.set(project.getLayout().getBuildDirectory() .dir(DEFAULT_DESTINATION_DIR)); this.modulesProvider = defaultModulesProvider(); this.dependencies = project.provider (() -> ConfigurationUtils.getEtaConfiguration (project, EtaInstallDependencies.this.getTargetConfiguration()) .getAllDependencies()); this.cabalProjectFile = destinationDir.file(DEFAULT_CABAL_PROJECT_FILENAME); this.cabalFile = destinationDir .file(project.provider(() -> getPackageName() + DEFAULT_CABAL_FILENAME)); this.executable = project.getObjects().property(String.class); getOutputs().upToDateWhen(task -> false); }
private static void setDefaults(GatewayDeveloperPluginConfig pluginConfig, Project project) { if (!pluginConfig.getSolutionDir().isPresent()) { pluginConfig.getSolutionDir().set(new File(project.getProjectDir(), "src/main/gateway")); } File defaultBuildDir = new File(new File(project.getBuildDir(), GATEWAY_BUILD_DIRECTORY), BUILT_BUNDLE_DIRECTORY); if (!pluginConfig.getBuiltBundleDir().isPresent()) { pluginConfig.getBuiltBundleDir().set(defaultBuildDir); } if (!pluginConfig.getBuiltEnvironmentBundleDir().isPresent()) { pluginConfig.getBuiltEnvironmentBundleDir().set(defaultBuildDir); } } }
public static File getEtaProguardFile(final Project project, final String proguardFile) { return project.getRootProject().getLayout().getBuildDirectory() .dir(ETA_INTERMEDIATES_DIRECTORY).get().file(proguardFile).getAsFile(); }
@TaskAction public void cleanup() { PathMatcher matcher = FileSystems.getDefault().getPathMatcher(glob.getOrNull()); Path path = baseFolder.get().getAsFile().toPath(); if (!Files.exists(path)) { return; } try { Files.walkFileTree(path, new java.nio.file.SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { if (matcher.matches(file)) { Files.delete(file); } return FileVisitResult.CONTINUE; } @Override public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { if (matcher.matches(dir)) { Files.delete(dir); } return FileVisitResult.CONTINUE; } }); } catch (IOException e) { throw new TaskExecutionException(this, e); } }
public void setOutputDir(File outputDir) { this.outputDir.set(outputDir); }