I am creating some dynamic jar tasks in a custom plugin I'm writing...
My problem is "gradle assemble" calls it. And these custom jar tasks
depend on other processes to be completed before they run. And this
particular task that runs the code below depends on "Assemble". So it
fails if I run assemble and it fails if I run this custom task.....
Here is the code:
locales.each {locale ->
Jar jarTask =
project.tasks.add("$BUNDLE_ARTIFACT_TASK_PREFIX[${locale}]",
Jar.class) as Jar
String classifier = locale == "noLocale" ? "" : locale
jarTask.from
"${project.l10nConvention.localizationOutputPath}/$JARS_DIR"
jarTask.destinationDir = new File("${project.buildDir}/libs")
jarTask.baseName = project.name
jarTask.appendix = "l10n"
jarTask.classifier = classifier
jarTask.manifest {
attributes("Bundle-ManifestVersion": '2')
attributes("Bundle-Name": project.name)
attributes("Bundle-SymbolicName":
"${project.symbolicName}.${jarTask.appendix}.${jarTask.classifier}")
attributes("Bundle-Vendor": "myco")
}
ArchivePublishArtifact jarArchive = new
ArchivePublishArtifact(jarTask)
jarArchive.type = ARCHIVE_TYPE
configuration.addArtifact(jarArchive)
}
So my question is: how do I prevent this jarTask from being executed
as part of Assemble?
thanks
phil
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email