hi gradle,
as i noted in an earlier post, i think that gradle-support
for building grails-apps would be a useful thing.
unfortunately i dont feel like the man to do a proper gradle-plugin
for grails (this is mainly a matter of skills but also a matter
of time). i also think, that regarding the future of the grails-build
there are some basic decisions/moves to be made, that are solely
in the responsibility of the grails-team.
what could be done IMO from the gradle-perspective is a
quick&dirty solution, that can be useful as long as grails
doesnt come out with something better.
my idea for this is a plugin, that wraps the existing
gradle commands and adds the ability to resolve and
publish artefacts.
here a script-snippet, that tries to show what
a mean with 'wrapping grails-commands':
*** snip ***
task clean() << {
ant.exec(executable: getExecutable(), dir: "$projectDir",
failonerror: 'true', failifexecutionfails: 'true') {
arg(line: getArgLine('clean'))
}
}
task war() << {
ant.exec(executable: getExecutable(), dir: "$projectDir",
failonerror: 'true', failifexecutionfails: 'true') {
arg(line: getArgLine('war'))
}
}
task test() << {
ant.exec(executable: getExecutable(), dir: "$projectDir",
failonerror: 'false', failifexecutionfails: 'true') {
arg(line: getArgLine('test-app'))
}
}
String getExecutable() {
String executable
if (windowsOrNot()) {
executable = 'cmd'
} else {
// dann isses Unix
executable = 'sh'
}
return executable
}
String getArgLine(String arg) {
String argLine
if (windowsOrNot()) {
argLine = "/c grails.bat $arg"
} else {
// dann isses Unix
argLine = "-l grails.sh $arg"
}
return argLine
}
boolean windowsOrNot() {
return '\\'.equals(File.separator)
}
*** snap ***
have a successful day
--
View this message in context:
http://www.nabble.com/a-quick-and-dirty-wrapper-for-the-grails-build-tp24032743p24032743.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email