You can run the build with --info and it'll tell you what triggers a task
to run.


Interestingly it says
Executing task ':library:bundleRelease' (up-to-date check took 0.0010 secs)
due to:
  Output file
/Volumes/Sources/ext/ub-tools-ide133/tools/base/build-system/tests/multiproject/library/build/outputs/aar/library-1.0.aar
has changed.

Which is weird. This means another task is changing the aar.

On Sat, Aug 23, 2014 at 12:04 AM, Jake Wharton <[email protected]>
wrote:

> I'm still seeing this behavior. Did you ever get to take a look?
>
>
> On Fri, May 16, 2014 at 11:38 AM, Xavier Ducrohet <[email protected]> wrote:
>
>> This shouldn't happen. I'll double check.
>>
>>
>> On Fri, May 16, 2014 at 12:16 AM, Jake Wharton <[email protected]>
>> wrote:
>>
>>> Ok, I lied. Quick investigation into Gradle. It has inputs and outputs
>>> declared for incremental invocation (inputs
>>> <https://github.com/gradle/gradle/blob/master/subprojects/core/src/main/groovy/org/gradle/api/tasks/AbstractCopyTask.java#L114-L125>
>>>  & outputs
>>> <https://github.com/gradle/gradle/blob/master/subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTask.java#L79-L82>
>>> ).
>>>
>>> As to whether the configuration by the plugin code is enough I am not
>>> sure.
>>>
>>>
>>> On Fri, May 16, 2014 at 12:04 AM, Jake Wharton <[email protected]>
>>> wrote:
>>>
>>>> The configuration of the Zip command on the ‘bundle’ tasks seems to
>>>> always be causing the output file to be modified.
>>>>
>>>> The easiest way to demonstrate it using the gradle-samples-0.10.zip
>>>> contents. These commands should be run in the ‘multiproject’ folder:
>>>>
>>>> gradle clean :library:assemble > /dev/null
>>>> ls -lhT library/build/libs/library-1.0.aar
>>>> gradle :library:assemble > /dev/null
>>>> ls -lhT library/build/libs/library-1.0.aar
>>>>
>>>> Here’s the output from me running:
>>>>
>>>> $ gradle clean :library:assemble > /dev/null
>>>> $ ls -lhT library/build/libs/library-1.0.aar
>>>> -rw-r--r--  1 jw  jw   2.7K May 15 23:57:18 2014 
>>>> library/build/libs/library-1.0.aar
>>>> $ gradle :library:assemble > /dev/null
>>>> $ ls -lhT library/build/libs/library-1.0.aar
>>>> -rw-r--r--  1 jw  jw   2.7K May 15 23:57:32 2014 
>>>> library/build/libs/library-1.0.aar
>>>>
>>>> When you run with --info you can see that it knows what’s happening:
>>>>
>>>> :library:bundleRelease (Thread[main,5,main]) started.
>>>> :library:bundleRelease
>>>> Executing task ':library:bundleRelease' (up-to-date check took 0.002 secs) 
>>>> due to:
>>>>   Output file 
>>>> /Users/jw/Downloads/gradle-samples-0.10/multiproject/library/build/libs/library-1.0.aar
>>>>  has changed.
>>>> :library:bundleRelease (Thread[main,5,main]) completed. Took 0.011 secs.
>>>>
>>>> The task inputs and outputs are configured in LibraryPlugin:
>>>>
>>>> bundle.destinationDir = project.file("$project.buildDir/libs")// ...
>>>> bundle.from(project.file("$project.buildDir/$DIR_BUNDLES/${variantData.variantConfiguration.dirName}"))
>>>>
>>>> I didn’t dig down into the Gradle impl of Zip to find out what’s
>>>> exactly happening.
>>>>
>>>> Is this working as intended or is it a breakage of incremental?
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "adt-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Xavier Ducrohet
>> Android SDK Tech Lead
>> Google Inc.
>> http://developer.android.com | http://tools.android.com
>>
>> Please do not send me questions directly. Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "adt-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to