在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):bricker/guard-gradle开源软件地址(OpenSource Url):https://github.com/bricker/guard-gradle开源编程语言(OpenSource Language):Ruby 88.6%开源软件介绍(OpenSource Introduction):Guard::GradleContinuously integrate while you work. Run those tests without thinking. It's the ying to your testing yang, baby. WTF?Because once on Guard you become hooked. No need to manually run your tests -- they are run automatically when a file changes. What's Guard you ask? Good question Ruby tyro.
InstallationIt's assumed you're more familiar with Java than you are with Ruby (after all, this is a Gradle tool, right?!); consequently, it's super easy to get going with Guard::Gradle provided you have Ruby installed. Open up a terminal and type: $ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13] If you see something like For those who want to get going ASAPWe've made this super easy. Open up a terminal, curl https://raw.githubusercontent.com/bricker/guard-gradle/master/etc/installer.sh | bash - It's important you do this in the root directory of a project you wish to use Gradle::Guard in. This plugin is designed to work on individual project instances, much like a The above script will install:
Therefore, after you run the command above, you'll be left with a script dubbed For those familiar w/RubyGuard::Gradle is intended to work with project instances; accordingly, you'll need to follow these steps for each project. If you already haven't installed Bundler, go ahead and install it ( In the root of your project, create a source 'https://rubygems.org'
gem 'guard-gradle' Save the file and then run:
Then create a
The default guard :gradle do
watch(%r{^src/main/(.+)\.*$}) { |m| m[1].split('.')[0].split('/')[-1] }
end For those who give a flip: UsageTo fire up Guard, type:
(I highly recommend you alias This Guard plugin simply runs the
Note, the plugin will try and execute the exact corresponding test for a changed file. For example, if you change the file Multi-project buildsIf you have a multi-project build, you can still use Guard::Gradle. You'll need to edit your guard :gradle, multi_project: true do
watch(%r{^Foo/src/main/(.+)\.*$}) { |m| "Foo/" + m[1].split('.')[0].split('/')[-1]}
watch(%r{^Bar/src/main/(.+)\.*$}) { |m| "Bar/" + m[1].split('.')[0].split('/')[-1] }
end Be sure to have this Configurable command/task/flagsIf you want to customize how gradle runs, there are several configuration flags available.
For example, if you want to run with quiet logging, using a global gradle, and
the guard :gradle, command: 'gradle', task: 'cleanTest test', flags: '--quiet' do
watch(%r{^src/main/(.+)\.*$}) { |m| m[1].split('.')[0].split('/')[-1] }
end NotificationsGuard works natively with Growl. There are other options as well -- feel free to check out the Guard wiki page for more information. For instance, as I use Growl, I have updated my Contributing
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论