Archive for the ‘Groovy’ Category

Gradle and PHP

Posted: June 19, 2010 in Groovy, PHP
Tags: ,

You may not realize this but the gradle website is in php. that basically means that you can also use gradle to build php websites including mvc framework ones. This will get interesting..


I should preface this by stating that I do like the announce plugin concept of announcing builds to 3rd party services. Tbhat being said you really should not put your ids, passwords in any build.gradle such as:
announce {
username = 'twitterid'
password = 'twitterpsswrd'

Obviously you should not do that but use the environments config slurper pattern and define the twitter id and passwords in the init.gradle file stored in user.home/.gradle/ and call define loadconfiguration() and call it in the build.gradle file with of course using the $config.twitter.twitterid and $config.twitter.twitterpsswrd patterns.

Than you have a reasonable secure pattern if you intend to extend the announce plugin say to connect to a googlewave widget for example.

Enhanced by Zemanta

The first step in using gradle as your build system is to realize that you can have blank main/java, main/groovy, test/java, test/groovy folders in your src path. This way you never have to adjust your project moving files and such as yo just declare some new source paths that match what your IDE setup as the project.

The trick is to enable the underlying plugins before the main project one. For example, for the Grails plugin you enable java and groovy before that plugin and than you can set customized source paths for java and groovy according to how your IDE sets up  the typical grails project.

Enhanced by Zemanta