I'm running into a similar, but not a standard case, issue.  In my case I
have a multiple project build like so:

Data project -- does not have any source code, but some source data that the
gradle build script (in a task I called 'compile') processes and turns into
a data file
Main project -- contains source code (uses the 'java' plugin) and needs to
data file produced by thee Data project

I want the Main project to have a dependency on the Data project.  But, it's
not a compile time dependency, so I thought about using the runtime
configuration.  But that implies that the Data project's archive would go in
the classpath, not what I wanted.  Further, that doesn't work because the
Data project is not using the 'java' plugin an therefore doesn't have a
uploadDefaultInternal task (this requirement is not obvious an confused me
for a bit).

What I think I really want is to define a new configuration called
'datafile' (or something) that declares a "linkConfWithTask" type
relationship to the compile task in my Data project.  Then my Main project
can have that type of dependency on Data.  So:

configurations
{
   datafile (tasks: ['compile'])
}

dependencies
{
   datafile project(':Data')
}

could be in my Main project's build.gradle.  This would mean that the Data
project's compile task would be run before any task in my Main project.


-- 
John Murph
Automated Logic Research Team

Reply via email to