Dear Java Friends,
I started using Maven from 2013 August. After a while I came across Gradle. It is pretty much similar and simpler than Maven. It also has the notion of plugins as Maven. Today I have learnt a new plugin named application and used it like charm.
Demo app code at my Github: https://github.com/PraveenGandhi/gradle-application-plugin-demo
Long back I have seen a presentation (http://www.infoq.com/presentations/Improve-Your-Java-with-Groovy) by Ken Kousen called "Improve Your Java with Groovy". There he emphasizes about Gradle and says:
Maven people seeing Gradle for the first time, some times just weep, you know how much simpler life can be.
Usually I used to create some kind of automation utilities at work (inspired by my Senior at Cognizant). Now the time has come to share these tools that make my work easier with other friends (might not be typical java developers) like testers and Business guys.
I cannot give these tools as they are to others, if I give like that I need to help to to use it. Rather it is better to make some executable scripts (.bat files) which makes the usage of the tool much easier. Initially I used to create such by my bear hands. Now it is all there as a simple Gradle plugin (application).
How?
From Gradle docs:
The Gradle application plugin extends the language plugins with common application related tasks. It allows running and bundling applications for the jvm by creating a jvm application Distribution.
It gives us the tasks like run, distZip,distTar and so on.
I have used run to simply run the app using Gradle.
I used distZip to create a distribution which has every thing required to run the app without the Sophisticated build tools and/or IDEs.
The above said distribution (project_name-version_number.zip) has two folders namely bin and lib.
As the name,
bin folder has start-up scripts like batch(for windows) and bash(for UN*X).
lib folder has the output jar (of the current project) and all the libraries mentioned in the dependency list of build.gradle.
Long live Gradle :)
I started using Maven from 2013 August. After a while I came across Gradle. It is pretty much similar and simpler than Maven. It also has the notion of plugins as Maven. Today I have learnt a new plugin named application and used it like charm.
Demo app code at my Github: https://github.com/PraveenGandhi/gradle-application-plugin-demo
Long back I have seen a presentation (http://www.infoq.com/presentations/Improve-Your-Java-with-Groovy) by Ken Kousen called "Improve Your Java with Groovy". There he emphasizes about Gradle and says:
Maven people seeing Gradle for the first time, some times just weep, you know how much simpler life can be.
Usually I used to create some kind of automation utilities at work (inspired by my Senior at Cognizant). Now the time has come to share these tools that make my work easier with other friends (might not be typical java developers) like testers and Business guys.
I cannot give these tools as they are to others, if I give like that I need to help to to use it. Rather it is better to make some executable scripts (.bat files) which makes the usage of the tool much easier. Initially I used to create such by my bear hands. Now it is all there as a simple Gradle plugin (application).
How?
From Gradle docs:
The Gradle application plugin extends the language plugins with common application related tasks. It allows running and bundling applications for the jvm by creating a jvm application Distribution.
It gives us the tasks like run, distZip,distTar and so on.
I have used run to simply run the app using Gradle.
I used distZip to create a distribution which has every thing required to run the app without the Sophisticated build tools and/or IDEs.
The above said distribution (project_name-version_number.zip) has two folders namely bin and lib.
As the name,
bin folder has start-up scripts like batch(for windows) and bash(for UN*X).
lib folder has the output jar (of the current project) and all the libraries mentioned in the dependency list of build.gradle.
Long live Gradle :)
No comments:
Post a Comment