@TaskAction public final void extractGraal() { if (!graalVersion.isPresent()) { throw new IllegalStateException("extract task requires graal.graalVersion to be defined."); } // ideally this would be a CopyTask, but through Gradle 4.9 CopyTask fails to correctly extract symlinks getProject().exec(spec -> { spec.executable("tar"); spec.args("-xzf", inputTgz.get().getAsFile().getAbsolutePath()); spec.workingDir(cacheDir.get().resolve(graalVersion.get())); }); }
@TaskAction public final void extractGraal() { if (!graalVersion.isPresent()) { throw new IllegalStateException("extract task requires graal.graalVersion to be defined."); } // ideally this would be a CopyTask, but through Gradle 4.9 CopyTask fails to correctly extract symlinks getProject().exec(spec -> { spec.executable("tar"); spec.args("-xzf", inputTgz.get().getAsFile().getAbsolutePath()); spec.workingDir(cacheDir.get().resolve(graalVersion.get())); }); }
@TaskAction public final void nativeImage() throws IOException { List<String> args = new ArrayList<>(); args.add("-cp"); args.add(generateClasspathArgument()); args.add("-H:Path=" + maybeCreateOutputDirectory().getAbsolutePath()); if (outputName.isPresent()) { args.add("-H:Name=" + outputName.get()); } if (options.isPresent()) { List<String> optionList = options.get(); args.addAll(optionList); } args.add(mainClass.get()); getProject().exec(spec -> { spec.executable(getExecutable()); spec.args(args); }); }
@TaskAction public final void nativeImage() throws IOException { List<String> args = new ArrayList<>(); args.add("-cp"); args.add(generateClasspathArgument()); args.add("-H:Path=" + maybeCreateOutputDirectory().getAbsolutePath()); if (outputName.isPresent()) { args.add("-H:Name=" + outputName.get()); } if (options.isPresent()) { List<String> optionList = options.get(); args.addAll(optionList); } args.add(mainClass.get()); getProject().exec(spec -> { spec.executable(getExecutable()); spec.args(args); }); }
execSpec.executable(getZipAlignExe());
@Override public void execute(ExecSpec execSpec) { execSpec.executable(getZipAlignExe()); execSpec.args("-f", "4"); execSpec.args(getInputFile()); execSpec.args(getOutputFile()); } });