On May 23, 2009, at 8:37 AM, Jason Porter wrote:
In the release announcement of 0.6.0 the idea of a Twitter plugin was
introduced to post when successful milestones happen (like the
completion of 0.6.0). I'm up for the challenge of creating one, but I
think a general task / plugin (I'm not sure which would be best) that
would let you do announcements would be more beneficial.
This is a very cool idea. The Gradle build itself will be the first
user of such a task.
I imagine a module (for lack of knowing which is better) that would be
able to take a type argument or configuration and in the backend it
would set that up for you and use the closure for configuration stuff.
So I'm thinking you could do things like RSS, Twitter, or email just
to name a few. Then in your configuration closure you'd specify the
needed information, SMTP, twitter credentials, message, etc.
My first question: Would a task or a plugin be better for this?
On first sight I would say a task might be a good enough. For example
our test task is also part of a framework where you can either choose
JUnit or TestNG.
How things can look like at the end:
There is a task jar (with as many helper and framework classes you
like). This jar would be available from a repository.
In the settings.gradle you would say:
mavenCentral()
dependencies("com.jason:announce-task:1.0")
In the build.gradle you can do:
task twitter(type: 'com.jason.gradle.Twitter') {
use('twitter')
....
}
The stuff in the closure is applied against the API of your Announce
task.
Second: Is a general framework like this with different
implementations possible in Gradle?
Yes.
- Hans
--
Hans Dockter
Gradle Project Manager
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email