I think this solved my prob:

project.rootProject.allprojects.each {subproject ->


On Mon, Jul 25, 2011 at 11:26 AM, phil swenson <[email protected]> wrote:
> I recently asked about a method to filter out custom jar tasks from
> the assemble task for a custom gradle plugin I'm wriging.  Basically I
> need some jar tasks NOT to be executed by assemble.
>
> I was directed by Luke to apply a filter by overriding the assemble
> task.  Here is my code - which is called after my custom jar tasks are
> defined:
>
> protected void filterAssembleTask() {
>        project.task('assemble', overwrite: true) {
>            dependsOn
> project.tasks.withType(AbstractArchiveTask.class).matching {
>                if (it.name.contains(LOCALE_PREFIX)) {
>
> project.logger.lifecycle("...........................excluding $it")
>                    return false
>                }
>
> project.logger.lifecycle("...........................including $it")
>                true
>            }
>        }
>    }
>
> So basically, any jar task that starts with LOCAL_PREFIX I want to
> hide from the assemble task.
>
> Unfortunately, assemble still is executing these tasks.  Any ideas why
> this would be?
>
> Here is my output :
>
> ...........................excluding task
> ':eda-eventtypeeditor-centrasite:localeBuildBundleArchiveFor[ja]'
> ...........................excluding task
> ':eda-eventtypeeditor-centrasite:localeBuildBundleArchiveFor[noLocale]'
>
> and later:
>
> :eda-eventtypeeditor-centrasite:localeBuildBundleArchiveFor[ja]
> jarTask.doFirst => locale = ja, destDir =
> /Users/phil/dev/sag/eda/trunk/modules/eventtypeeditor-centrasite/build/l10n/jars/OSGI-INF/l10n
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task
> ':eda-eventtypeeditor-centrasite:localeBuildBundleArchiveFor[ja]'.
> Cause: java.lang.AssertionError: message file
> /Users/phil/dev/sag/eda/trunk/modules/eventtypeeditor-centrasite/build/l10n/messages_ja.properties
> not found!. Expression: file.exists()
> Cause: message file
> /Users/phil/dev/sag/eda/trunk/modules/eventtypeeditor-centrasite/build/l10n/messages_ja.properties
> not found!. Expression: file.exists()
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to