gradle-eval-plugin icon indicating copy to clipboard operation
gradle-eval-plugin copied to clipboard

Simpler way to run evaluation from command line

Open h0tk3y opened this issue 4 years ago • 1 comments

Running the eval task within a single given subproject and passing it --command='...' may be tedious. We could find a simpler way to pass an expression in the command line.

h0tk3y avatar Sep 17 '20 18:09 h0tk3y

One way is to create a shell script or a function that does that.

For example, in the fish shell:

function geval
    if test (count $argv) -lt 2 
        ./gradlew eval --command="$argv[1]"
    else if [ $argv[1] = ":" ]
        ./gradlew :eval --command="$argv[2]"
    else 
        ./gradlew "$argv[1]":eval --command="$argv[2]"
    end
end

h0tk3y avatar Sep 17 '20 18:09 h0tk3y