GradleFx/GradleFx — pull request #29 by RIAstar (2012-03-05 20:52:53+00:00)
Title: New feature: localization convention

Added 2 localization properties to the project scope:
- locales: an array of locale strings for which we want to compile resource bundles
- localeDir: the directory where the resource bundles are located (without the `{locale}` token); default value is `'src/main/locale'`

Example with conventions:

locales = ['nl_BE', 'fr_BE']

Example without conventions:

localeDir = 'path/to/my/locale'
locales = ['en_US']

Replaces:

srcDirs.add('src/main/locale/{locale}')
additionalCompilerOptions = [
'-locale=nl_BE'
]

Remarks:
- I moved the 'addSourcePaths' method to 'AbstractCompileTask', since there were two implementations in 'Mxmlc' and 'Compc' that were both essentially doing the same thing. Also resource bundles can be compiled into applications as well as into libraries.
- I made a single 'localeDir' instead of an array of 'localeDirs' because I could think of no good reason why ther should be more than one.