public void setDefaultCharacterEncoding(String defaultCharacterEncoding) { javaOptions.setDefaultCharacterEncoding(defaultCharacterEncoding); }
@TaskAction public void exec() { workerExecutor.submit(config -> { config.setClasspath(getClasspath()); config.setNamespace(getNamespace()); config.setFunction(getFunction()); config.setArgs(getArgs().toArray(new Object[getArgs().size()])); config.forkOptions(fork -> { fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); }); } }
private void start() { if (!getProject().delete(getTemporaryDir())) { throw new GradleException("Cannot clean temporary directory: " + getTemporaryDir().getAbsolutePath()); } FileCollection cp = getProject().files(getTemporaryDir(), getClasspath()); List<String> middleware = Stream.of(defaultMiddleware.getOrElse(Collections.emptyList()), userMiddleware.getOrElse(Collections.emptyList())) .flatMap(List::stream) .collect(Collectors.toList()); clojureExecutor.exec(spec -> { spec.setClasspath(cp); spec.setMain("gradle-clojure.tools.clojure-nrepl"); spec.setArgs(port, controlPort, handler.getOrNull(), middleware, Edn.keywordize(contextData)); spec.forkOptions(fork -> { fork.setJvmArgs(getForkOptions().getJvmArgs()); fork.setMinHeapSize(getForkOptions().getMemoryInitialSize()); fork.setMaxHeapSize(getForkOptions().getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); }); }
@TaskAction public void compile() { File outputDir = getDestinationDir().get().getAsFile(); if (!getProject().delete(outputDir)) { throw new GradleException("Cannot clean destination directory: " + outputDir.getAbsolutePath()); } if (!outputDir.mkdirs()) { throw new GradleException("Cannot create destination directory: " + outputDir.getAbsolutePath()); } FileCollection classpath = getClasspath().plus(getSourceRoots()); clojureExecutor.exec(spec -> { spec.setClasspath(classpath); spec.setMain("gradle-clojure.tools.clojurescript-compiler"); spec.args(getSourceRoots(), getOptions()); spec.forkOptions(fork -> { fork.setJvmArgs(forkOptions.getJvmArgs()); fork.setMinHeapSize(forkOptions.getMemoryInitialSize()); fork.setMaxHeapSize(forkOptions.getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); }); } }
private void start() { if (!getProject().delete(getTemporaryDir())) { throw new GradleException("Cannot clean temporary directory: " + getTemporaryDir().getAbsolutePath()); } FileCollection cp = getProject().files(getTemporaryDir(), getClasspath()); List<String> middleware = Stream.of(defaultMiddleware.getOrElse(Collections.emptyList()), userMiddleware.getOrElse(Collections.emptyList())) .flatMap(List::stream) .collect(Collectors.toList()); clojureExecutor.exec(spec -> { spec.setClasspath(cp); spec.setMain("gradle-clojure.tools.clojure-nrepl"); spec.setArgs(port, controlPort, handler.getOrNull(), middleware, Edn.keywordize(contextData)); spec.forkOptions(fork -> { fork.setJvmArgs(getForkOptions().getJvmArgs()); fork.setMinHeapSize(getForkOptions().getMemoryInitialSize()); fork.setMaxHeapSize(getForkOptions().getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); }); }
@TaskAction public void compile() { File outputDir = getDestinationDir().get().getAsFile(); if (!getProject().delete(outputDir)) { throw new GradleException("Cannot clean destination directory: " + outputDir.getAbsolutePath()); } if (!outputDir.mkdirs()) { throw new GradleException("Cannot create destination directory: " + outputDir.getAbsolutePath()); } FileCollection classpath = getClasspath().plus(getSourceRoots()); clojureExecutor.exec(spec -> { spec.setClasspath(classpath); spec.setMain("gradle-clojure.tools.clojurescript-compiler"); spec.args(getSourceRoots(), getOptions()); spec.forkOptions(fork -> { fork.setJvmArgs(forkOptions.getJvmArgs()); fork.setMinHeapSize(forkOptions.getMemoryInitialSize()); fork.setMaxHeapSize(forkOptions.getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); }); } }
fork.setMinHeapSize(forkOptions.getMemoryInitialSize()); fork.setMaxHeapSize(forkOptions.getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); });
fork.setMinHeapSize(forkOptions.getMemoryInitialSize()); fork.setMaxHeapSize(forkOptions.getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); });
fork.setMinHeapSize(forkOptions.getMemoryInitialSize()); fork.setMaxHeapSize(forkOptions.getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); });
fork.setMinHeapSize(forkOptions.getMemoryInitialSize()); fork.setMaxHeapSize(forkOptions.getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); });
private void start() { workerExecutor.submit(config -> { config.setClasspath(getClasspath()); config.setNamespace("gradle-clojure.tools.clojure-nrepl"); config.setFunction("start!"); config.setArgs(port, controlPort); config.forkOptions(fork -> { fork.setJvmArgs(getForkOptions().getJvmArgs()); fork.setMinHeapSize(getForkOptions().getMemoryInitialSize()); fork.setMaxHeapSize(getForkOptions().getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); }); }
fork.setMinHeapSize(options.getForkOptions().getMemoryInitialSize()); fork.setMaxHeapSize(options.getForkOptions().getMemoryMaximumSize()); fork.setDefaultCharacterEncoding(StandardCharsets.UTF_8.name()); }); });