diff options
author | Thibault Gagnaux <tgagnaux@gmail.com> | 2021-12-20 20:48:17 +0100 |
---|---|---|
committer | Thibault Gagnaux <tgagnaux@gmail.com> | 2021-12-21 11:22:55 +0100 |
commit | 992490f446720cd4cf4fb9aadff463b2328a8287 (patch) | |
tree | e3a19d9c3f79a6ba9620f05da2db8ba5421df9ff /src/main/java/ch/fhnw/thga/gradleplugins/internal | |
parent | f923b4f8733003d55891dd4da25d849c81c4933c (diff) | |
download | frege-gradle-plugin-992490f446720cd4cf4fb9aadff463b2328a8287.tar.gz frege-gradle-plugin-992490f446720cd4cf4fb9aadff463b2328a8287.tar.bz2 frege-gradle-plugin-992490f446720cd4cf4fb9aadff463b2328a8287.zip |
feat: adds `replSource` property and command-line option
The `replSource` property specifies the frege source file that you want to
load into the repl. It is excluded in the `fregeCompile` task so that
we don't get two java class files (one from `compileFrege` and one
from the fregeRepl `:l` command) that shadow each other on the classpath.
As a result, we can make interactive changes to the `replSource` file and
use the `:r` reload command to see them.
Diffstat (limited to 'src/main/java/ch/fhnw/thga/gradleplugins/internal')
-rw-r--r-- | src/main/java/ch/fhnw/thga/gradleplugins/internal/DependencyFregeTask.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/ch/fhnw/thga/gradleplugins/internal/DependencyFregeTask.java b/src/main/java/ch/fhnw/thga/gradleplugins/internal/DependencyFregeTask.java index 4459bd4..87f4d2b 100644 --- a/src/main/java/ch/fhnw/thga/gradleplugins/internal/DependencyFregeTask.java +++ b/src/main/java/ch/fhnw/thga/gradleplugins/internal/DependencyFregeTask.java @@ -8,6 +8,7 @@ import org.gradle.api.tasks.Input; import org.gradle.api.tasks.InputDirectory; import org.gradle.api.tasks.InputFile; import org.gradle.api.tasks.TaskAction; +import org.gradle.api.tasks.options.Option; import ch.fhnw.thga.gradleplugins.SharedTaskLogic; @@ -21,6 +22,11 @@ public abstract class DependencyFregeTask extends DefaultTask { @InputDirectory public abstract DirectoryProperty getFregeOutputDir(); + @Input + @Option(option = "replSource", + description = "The filename which you want to load into the repl, e.g. 'myFregeFile.fr'") + public abstract Property<String> getReplSource(); + @TaskAction public void fregeDependencies() { |