Gradle 如何获得;格拉德尔“;具有类似的输出详细信息,如;蚂蚁;?
我的问题没有答案的问题和 我的ant脚本Gradle 如何获得;格拉德尔“;具有类似的输出详细信息,如;蚂蚁;?,gradle,ant,build.gradle,build.xml,Gradle,Ant,Build.gradle,Build.xml,我的问题没有答案的问题和 我的ant脚本build.xml 简单脚本build.gradle ant.importBuild'build.xml' 命令gradle build的输出缺少一些详细信息 我们可以注意到有关命令mkdir、javac、copy和jar的缺行 选项--info太冗长 如果这能帮助其他人,我在这里分享我的解决方案 这取决于Gradle的版本 使用Gradle 2.13 提升脚本build.gradle中任务生成(Ant目标)的日志级别: ant.importBuild'
build.xml
简单脚本build.gradle
ant.importBuild'build.xml'
命令gradle build
的输出缺少一些详细信息
我们可以注意到有关命令mkdir
、javac
、copy
和jar
的缺行
选项--info
太冗长
如果这能帮助其他人,我在这里分享我的解决方案
这取决于Gradle的版本
使用Gradle 2.13
提升脚本build.gradle
中任务生成(Ant目标)的日志级别:
ant.importBuild'build.xml'
build.logging.level=LogLevel.INFO
gradlebuild
的输出现在类似于ant build
使用Gradle3.2
在脚本build.gradle
中添加ant.lifecycleLogLevel=“INFO”
:
ant.importBuild'build.xml'
ant.lifecycleLogLevel=“INFO”
命令的输出gradlebuild
<project>
<target name="build">
<mkdir dir="dest"/>
<javac srcdir="src" destdir="dest" includeAntRuntime="false"/>
<copy todir="dest" >
<fileset dir="src" casesensitive="no">
<include name="**/*.properties"/>
</fileset>
</copy>
<jar destfile="MyJar.jar">
<fileset dir="dest"/>
</jar>
</target>
</project>
Buildfile: /some/path/build.xml
build:
[mkdir] Created dir: /some/path/dest
[javac] Compiling 25 source files to /some/path/dest
[copy] Copying 3 files to /some/path/dest
[jar] Building jar: /some/path/MyJar.jar
BUILD SUCCESSFUL
Total time: 0 seconds
:build
BUILD SUCCESSFUL
Total time: 1.638 secs
> gradle --info build
Starting Build
Settings evaluated using settings file '/master/settings.gradle'.
Projects loaded. Root project using build file '/some/path/build.gradle'.
Included projects: [root project 'o']
Evaluating root project 'o' using build file '/some/path/build.gradle'.
Compiling build file '/some/path/build.gradle' using SubsetScriptTransformer.
Compiling build file '/some/path/build.gradle' using BuildScriptTransformer.
All projects evaluated.
Selected primary task 'build' from project :
Tasks to be executed: [task ':build']
:build (Thread[main,5,main]) started.
:build
Executing task ':build' (up-to-date check took 0.001 secs) due to:
Task has not declared any outputs.
[ant:mkdir] Created dir: /some/path/dest
[ant:javac] Compiling 25 source files to /some/path/dest
[ant:copy] Copying 3 files to /some/path/dest
[ant:jar] Building jar: /some/path/MyJar.jar
:build (Thread[main,5,main]) completed. Took 0.646 secs.
BUILD SUCCESSFUL
Total time: 1.947 secs
:build
[ant:mkdir] Created dir: /some/path/dest
[ant:javac] Compiling 25 source files to /some/path/dest
[ant:copy] Copying 3 files to /some/path/dest
[ant:jar] Building jar: /some/path/MyJar.jar
BUILD SUCCESSFUL
Total time: 1.692 secs
:build
[ant:mkdir] Created dir: /some/path/dest
[ant:javac] Compiling 25 source files to /some/path/dest
[ant:copy] Copying 3 files to /some/path/dest
[ant:jar] Building jar: /some/path/MyJar.jar
BUILD SUCCESSFUL
Total time: 0.531 secs