Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 20403

Capture Exec output using Kotlin DSL

$
0
0

Please refer to the following Ant snippet when reading the rest of the issue description.

    <target name="git.log" depends="init">
        <exec executable="bash" failonerror="true">
            <arg line="${util.dir}/build/git-log2json.sh" />
            <redirector output="${build.app.java.dir}/commit.json" />
        </exec>
    </target>

The above ant target executes a shell script and writes the output of the script to a file. This file is then bundled as part of a war.

How does one achieve the same effect in Gradle when using Kotlin DSL? I’m guessing that an Exec task would be the way to go. However I’m not able to find any examples. FWIW I’m already using the built-in war plugin to create the war file.


Viewing all articles
Browse latest Browse all 20403

Latest Images

Trending Articles



Latest Images