Gant


Source link: https://github.com/Gant/Gant

Travis-CI status:

Introduction

Gant is a lightweight dependency programming framework for Groovy and Java systems.

Gant was originally created as a build framework: Groovy has AntBuilder and Gant was a framework built around it, created so as to be able to avoid using XML with Ant. Groovy makes a much better build specification language than XML; Gant gives access to all the Ant tasks using Groovy. So successful was this model that Gant was forked to create the official Groovy Front-End to Ant that is now an Ant standard feature.

Experimentation with Gant showed though that the computational model at the heart of Gant was not going to allow for a fully fledged build framework. Thus was Gradle born. Gradle is now the standard Groovy-based build framework. Even Gant, which originally used Gant for its build, now uses Gradle for its build.

Gant has been an integral part of the Grails Web application framework until version 3, at which point it switched to using Gradle.

Gant is the basis for the GINT integration testing framework.

Overview

Gant is a tool for scripting Ant tasks using Groovy instead of XML to specify the logic. A Gant specification is a Groovy script and so can bring all the power of Groovy to bear directly, something not possible with Ant scripts. Whilst it might be seen as a competitor to Ant, Gant uses Ant tasks for many of the actions, so Gant is really an alternative way of doing things using Ant, but using a programming language rather than XML to specify the rules.

Here is an example Gant script:

includeTargets << gant.targets.Clean cleanPattern << ['**/*~',  '**/*.bak'] cleanDirectory << 'build'  target(stuff: 'A target to do some stuff.') {

println 'Stuff'
depends clean
echo message: 'A default message from Ant.'
otherStuff() 
}
  target(otherStuff: 'A target to do some other stuff') {

println 'OtherStuff'
echo message: 'Another message from Ant.'
clean() 
}
  setDefaultTarget stuff 

In this script there are two targets, stuff and otherStuff -- the default target for this build is designated as stuff and is the target run when Gant is executed from the command line with no target as parameter.

Targets are closures so they can be called as functions, in which case they are executed as you expect, or they can be dependencies to other targets by being parameters to the depends function, in which case they are executed if an only if they have not been executed already in this run. (There is a page with some more information on Targets.)

You may be wondering about the stuff at the beginning of the script. Gant has two ways of using pre-built sub-scripts, either textual inclusion of another Gant script or the inclusion of a pre-compiled class. The example here shows the latter -- the class gant.targets.Clean is a class that provides simple clean capabilities.

The default name for the Gant script is build.gant, in the same way that the default for an Ant script in build.xml.

Gant provides a way of finding what the documented targets are:

|> gant -p  clean

 Action the cleaning. clobber
  Action the clobbering.  Do the cleaning first. otherStuff  A target to do some other stuff. stuff

 A target to do some stuff.  Default target is stuff.  |> 

The messages on this output are exactly the strings associated with the target name in the introduction to the target.

The Source

The Gant mainline source is in a Git repository held on GitHub. Feel free to fork, amend and send in pull requests. The master branch is currently both the 1.9.x series maintenance branch and the development branch. All development should though happen on feature branches until accepted and merged into master.

The website for the project can be found here, though it could do with a makeover.

Licence

Gant is licenced under ASL 2.0.

Resources

ImageTransition is a small android library to transition between a circular ImageView from one Activity to a rectangular ImageView in the launched Activity.

Handles the drawable binding and position on View, EditText, ImageView or TextView. Also can change the icon color, alpha and size using a SelectorDrawable.

This is mainly core java project. It solves the problem of valid and meaningful random data generation in code flow itself (rather than parsing some random data file and loading data into some list).

It can use existing class models and generate wide range of preexisting random data to test data intensive application in absence of APIs.

Flare provide the easy implementation of circular indicator with ViewPager. (viewpager indicator)

A custom view that display multiple attributes by a polygon shape.

A small library that allows You to easily manage fingererprint authentication inside your Activity or Fragment on devices with fingerprint scanner and Android M and higher. Min sdk 14

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes