Re: Gradle plugin does not propagate debug/release to dependencies

844 views
Skip to first unread message

Xavier Ducrohet

unread,
May 26, 2013, 2:37:19 PM5/26/13
to adt...@googlegroups.com
Right now "Debug" and "release" for libraries mean something different than for app project.

"debug" is the build type when building the library to test it locally (ie running tests against the library in its own project).

"release" is the build type used when generating an 'aar' package for use by other project. This includes when using multi-project.

This is something we want to fix but not ETA yet.


On Sun, May 26, 2013 at 8:49 AM, Dominik Schürmann <dom...@dominikschuermann.de> wrote:
Hi,

I am building a simple android project with one dependency on an android library project.
I ran into the issue that debug settings are not enabled in the library project.
There is also a bug report about it: http://code.google.com/p/android/issues/detail&id=52962

I was also wondering about the following: It seems the library project is build as release _and_ debug even when I use assembleDebug.
My output for gradle assembleDebug looks like this:

~/P/Donations Lib> gradle assembleDebug
The TaskContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
:libraries:Donations:mergeReleaseProguardFiles UP-TO-DATE
[...]
:libraries:Donations:bundleRelease UP-TO-DATE
:ExampleApp:prepareDonationsLibLibrariesDonationsUnspecifiedLibrary UP-TO-DATE
[...]
:ExampleApp:assembleDebug UP-TO-DATE
:libraries:Donations:mergeDebugProguardFiles UP-TO-DATE
[...]
:libraries:Donations:assembleDebug UP-TO-DATE

BUILD SUCCESSFUL

Total time: 16.61 secs

The project I am working on: https://github.com/dschuermann/android-donations-lib

Are there any configuration errors in my gradle scripts?

Regards
Dominik

--
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 adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



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

Please do not send me questions directly. Thanks!

Oleksii Kropachov

unread,
Jun 20, 2013, 9:25:36 AM6/20/13
to adt...@googlegroups.com
Is there any workaround for this issue? All I need is BuildConfig.DEBUG = true for nested library projects. Is it possible?

Xavier Ducrohet

unread,
Jun 21, 2013, 1:24:12 AM6/21/13
to adt...@googlegroups.com
Not at the moment.


--
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 adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Deniz M Veli

unread,
Jul 9, 2013, 4:45:14 PM7/9/13
to adt...@googlegroups.com
Can this please be prioritized?

Most Android libraries make extensive use of the BuildConfig.DEBUG flag, and it's been a recommended approach in the past.

It's not ideal to have to change code to workaround an issue with your build tools.

Cheers,
Deniz.

Xavier Ducrohet

unread,
Jul 9, 2013, 8:21:20 PM7/9/13
to adt...@googlegroups.com
This is high priority for us, but it's dependent on a change in Gradle. I'm hoping we can get this in 1.8

Deniz M Veli

unread,
Jul 10, 2013, 10:39:43 AM7/10/13
to adt...@googlegroups.com
Thanks Xavier.

Richard Du

unread,
Sep 18, 2013, 2:12:59 AM9/18/13
to adt...@googlegroups.com
Hello, Xavier,

Just for your information, I just tried with Gradle 1.8-rc-1(released on 10th September 2013, http://www.gradle.org/release-candidate), and seems this problem still exist.

Thanks,
Richard

Anton Rutkevich

unread,
Oct 30, 2013, 10:15:19 AM10/30/13
to adt...@googlegroups.com
Gradle 1.9-rc-2 is out already. 
Any good news?

Dmytro Shkil

unread,
Nov 5, 2013, 7:22:36 AM11/5/13
to adt...@googlegroups.com
Xavier, please fix.


On Wednesday, September 18, 2013 9:12:59 AM UTC+3, Richard Du wrote:

Xavier Ducrohet

unread,
Nov 8, 2013, 9:12:31 PM11/8/13
to adt...@googlegroups.com
Just a quick update: no change has happened on this. We still needed changes in both Gradle and the plugin. We are starting to look at exactly what needs to be done, so it'll get done but probably not for a couple of releases of Gradle.

Andrey Polyakov

unread,
Nov 15, 2013, 8:40:17 PM11/15/13
to adt...@googlegroups.com
I've been porting a multi-project setup from Eclipse for the last few days until I discovered this issue. Unfortunately this is a deal breaker. Hopefully we can see this behaviour implemented sooner rather than later.
Reply all
Reply to author
Forward
0 new messages