2014年12月27日

Gradle Goodness: Run a Build Script With a Different Name

摘要: Normally Gradle looks for a build script file with the name build.gradle in the current directory to execute a build. But we can easily use a differen... 阅读全文

posted @ 2014-12-27 20:45 为梦飞翔 阅读(208) 评论(0) 推荐(0) 编辑

Gradle Goodness: Group Similar Tasks

摘要: In Gradle we can assign a task to a group. Gradle uses the group for example in the output of $ gradle -t to output all the tasks of the same group to... 阅读全文

posted @ 2014-12-27 20:43 为梦飞翔 阅读(394) 评论(0) 推荐(0) 编辑

Gradle Goodness: Add Incremental Build Support to Tasks

摘要: Gradle has a very powerful incremental build feature. This means Gradle will not execute a task unless it is necessary. We can help Gradle and configu... 阅读全文

posted @ 2014-12-27 20:41 为梦飞翔 阅读(372) 评论(0) 推荐(0) 编辑

Gradle Goodness: Add Incremental Build Support to Custom Tasks with Annotations

摘要: In a previous post we learned how we can use the inputs and outputs properties to set properties or files that need to be checked to see if a task is ... 阅读全文

posted @ 2014-12-27 20:37 为梦飞翔 阅读(233) 评论(0) 推荐(0) 编辑

Gradle Goodness: Automatic Clean Tasks

摘要: Gradle adds the task rule clean to our projects when we apply the base plugin. This task is able to remove any output files or directories we have def... 阅读全文

posted @ 2014-12-27 20:33 为梦飞翔 阅读(253) 评论(0) 推荐(0) 编辑

Gradle Goodness: Excluding Tasks for Execution

摘要: In Gradle we can create dependencies between tasks. But we can also exclude certain tasks from those dependencies. We use the command-line option -x o... 阅读全文

posted @ 2014-12-27 20:28 为梦飞翔 阅读(272) 评论(0) 推荐(0) 编辑

Gradle Goodness: Display Available Tasks

摘要: To see which tasks are available for our build we can run Gradle with the command-line option -t or --tasks. Gradle outputs the available tasks from o... 阅读全文

posted @ 2014-12-27 20:16 为梦飞翔 阅读(255) 评论(0) 推荐(0) 编辑

Gradle Goodness: Parse Files with SimpleTemplateEngine in Copy Task

摘要: With the copy task of Gradle we can copy files that are parsed by Groovy's SimpleTemplateEngine. This means we can expand properties in the source fil... 阅读全文

posted @ 2014-12-27 20:12 为梦飞翔 阅读(356) 评论(0) 推荐(0) 编辑

Gradle Goodness: Copy Files with Filtering

摘要: Gradle Goodness: Copy Files with FilteringGradle's copy task is very powerful and includes filtering capabilities. This means we can change the conten... 阅读全文

posted @ 2014-12-27 20:06 为梦飞翔 阅读(1258) 评论(0) 推荐(0) 编辑

Gradle Goodness: Renaming Files while Copying

摘要: With the Gradle copy task we can define renaming rules for the files that are copied. We use the rename() method of the copy task to define the naming... 阅读全文

posted @ 2014-12-27 19:53 为梦飞翔 阅读(603) 评论(0) 推荐(0) 编辑

Gradle Goodness: Profiling Information

摘要: If we want to know more about how much time is spent in tasks we can use the --profile command-line option. Gradle will generate a report file in the ... 阅读全文

posted @ 2014-12-27 19:36 为梦飞翔 阅读(196) 评论(0) 推荐(0) 编辑

Gradle Goodness: Working with Live Task Collection

摘要: Gradle support the definition of so called live collections. These collections are mostly created based on criteria like with a filter() or matching()... 阅读全文

posted @ 2014-12-27 19:32 为梦飞翔 阅读(216) 评论(0) 推荐(0) 编辑

Gradle Goodness: Adding Tasks to a Predefined Group

摘要: In Gradle we can group related tasks using the group property of a task. We provide the name of our group and if we look at the output of the tasks ta... 阅读全文

posted @ 2014-12-27 19:18 为梦飞翔 阅读(485) 评论(0) 推荐(0) 编辑

Gradle Goodness: Set Java Compiler Encoding

摘要: If we want to set an explicit encoding for the Java compiler in Gradle we can use the options.encoding property. For example we could add the followin... 阅读全文

posted @ 2014-12-27 19:16 为梦飞翔 阅读(309) 评论(0) 推荐(0) 编辑

Gradle Goodness: Unpacking an Archive

摘要: To create an archive with Gradle is easy. We have several tasks like Zip, Tar, Jar, War and Ear to create a new archive. But there is no UnZip or UnTa... 阅读全文

posted @ 2014-12-27 19:13 为梦飞翔 阅读(373) 评论(0) 推荐(0) 编辑

Gradle Goodness: Running Java Applications from External Dependency

摘要: With Gradle we can execute Java applications using the JavaExec task or the javaexec() method. If we want to run Java code from an external dependency... 阅读全文

posted @ 2014-12-27 18:53 为梦飞翔 阅读(243) 评论(0) 推荐(0) 编辑

Gradle Goodness: Task Output Annotations Create Directory Automatically

摘要: Gradle Goodness: Task Output Annotations Create Directory AutomaticallyOne of the great features of Gradle is incremental build support. With incremen... 阅读全文

posted @ 2014-12-27 09:54 为梦飞翔 阅读(380) 评论(0) 推荐(0) 编辑

Gradle Goodness: Init Script for Adding Extra Plugins to Existing Projects

摘要: Gradle Goodness: Init Script for Adding Extra Plugins to Existing ProjectsGradle is very flexible. One of the ways to alter the build configuration is... 阅读全文

posted @ 2014-12-27 09:47 为梦飞翔 阅读(263) 评论(0) 推荐(0) 编辑

Gradle Goodness: Changing Name of Default Build File

摘要: Gradle uses the name build.gradle as the default name for a build file. If we write our build code in a file build.gradle then we don't have to specif... 阅读全文

posted @ 2014-12-27 09:41 为梦飞翔 阅读(290) 评论(0) 推荐(0) 编辑

导航