Hi!

To learn some of the "ins & outs" of Gradle, I'm attempting to changeover
and existing ant build process to a native gradle one.  The build process is
generating a binary image file which gets loaded on to a flash memory part.
Its not a particularly complex build but it does call out to several
external tools. In a nutshell the process is

1) Compile high level java code

2) Compile several different sets of assembly code into native libraries (1
output file per library)

3) Run a conversion program which glues the output of #1 and #2 together to
produce the final loadable image file.

I'm trying to make full use of the incremental build capabilities but I
think I'm missing something in the "theory of operation".  I defined a
"CompileNative'  task type using @InputFile and @OutputFile which handles
calling the necessary tools. I then defined a task for each library I need
to build.

*task('flashLibrary',type:CompileNative){
    sourceFile=new File("${project.nativeSrc}/flash/FlashIOP.a51")
}*

The incremental support is working great w.r.t to this task alone. If I
change the source file, delete the output file..etc it rebuilds the library.
Perfect.

The final task which handles step #3 looks like this:
*
task('image',type:TiniConvert,dependsOn [compileJava,flashLibrary]){

}*

My issue is that when I do a "gradle image" AND the flashLibrary is
determined to be out of date and re-executed, the 'image' task does not
execute (considered up to date) although it needs to execute again to
incorporate the modified library.

Now, I kind of understand this because my "TiniConvert' task does not
formally mark the binary library files as Inputs. However, it seems better
to me if the gradle task dependency engine could somehow handle that for me.
Since 'image' is a dependent of 'flashLibrary' and flashLibrary was
re-executed shouldn't that mean 'image' will re-execute as well or is that
only true if I formally configure 'TiniConvert' with the output of the
dependent tasks marked as @Input?

It makes so little sense to me that I'm almost certain I'm doing something
wrong :)

Thanks for the help in advance!




On Thu, Oct 28, 2010 at 1:28 PM, Matthias Bohlen <[email protected]>wrote:

> Hi,
>
> I have just tried gradle 0.9-rc-2. I had to change my build file slightly:
>
> eclipseProject {
>     natures += 'net.sf.eclipsecs.core.CheckstyleNature'
>     buildCommands += 'net.sf.eclipsecs.core.CheckstyleBuilder'
> }
>
> (before, it was "natureNames" and "buildCommandNames").
>
> After starting gradle, I noticed a little more delay during the
> "Loading..." phase. After that, it ran fine.
>
> Another strange effect: Messages from Checkstyle suddenly come in German (I
> am using a German MacBook Pro) although in my checkstyle.xml, it says:
>
> <property name="localeCountry" value="US" />
> <property name="localeLanguage" value="en" />
>
> (I re-checked and found out that this has changed since rc-2, in rc-1 all
> Checkstyle warnings come in English, as configured). I cannot see why.
>
> By the way: How did you manage to create colored output in my Mac OS X
> terminal? Can you post a code snippet for that, here? (just curious...)
>
> Cheers,
> Matthias
>
>


-- 
Ross Sargant
Software Engineer
p: 954-623-6015 x2108
email: [email protected]

TVR Communications LLC
541 S. State Road 7,Suite 5,Margate, Florida,33068

http://www.tvrc.com

Reply via email to