Re: Test resources not found from unit test [136013]

2015-02-10 Thread 'Michal Bendowski' via adt-dev
I was planning to work on a fix tomorrow (London time). On Tue, Feb 10, 2015, 18:55 Joe Hansche jhans...@meetme.com wrote: This is related to the Unit Test support being added to Gradle 1.1.0, and the linked bug report [1]. The problem appears to be that the compileVariantUnitTestJava task

Re: AS 1.1.0 unit test support messed up my development setup

2015-03-18 Thread 'Michal Bendowski' via adt-dev
Hi Florian, The unit testing support is not meant to replace running tests on a device, they allow you to write a new kind of tests with a shorter iteration time. Most likely, you won't be able to easily convert your existing tests to unit tests that mock out all the platform code. So in short:

Re: AS 1.1.0 unit test support messed up my development setup

2015-03-20 Thread 'Michal Bendowski' via adt-dev
In unit tests, you can use Mockito to create a mock instance of Resources that will return the values you specify. This way you only test your unit, not the resources setup. It's not possible to use the real Android logic for grabbing resources from an APK - this logic only runs on a device. On

Re: androidTestCompile dependencies not working in gradle plugin 1.1/1.2?

2015-04-01 Thread 'Michal Bendowski' via adt-dev
Hi Tom, Of course, this is not expected. Can you file a bug at https://code.google.com/p/android/issues/entry?template=Tools%20bug%20report ? Please provide more detail, ideally your build.gradle file as-is. Thanks, Michal On Wed, Apr 1, 2015 at 8:45 AM Tom Billiet tom.bill...@gmail.com wrote:

Re: final on inner class methods even in mock jar

2015-03-02 Thread 'Michal Bendowski' via adt-dev
RecyclerView is part of the support library - at current stage we only process the platform android.jar. In the future we will look at stripping the final modifiers from other dependencies. Michal On Sat, Feb 28, 2015 at 7:03 AM Joris Schutijzer joris.schutij...@gmail.com wrote: Hi, We are

Re: Recommended directory structure and how to override it

2015-04-28 Thread 'Michal Bendowski' via adt-dev
I'm not sure what exactly do you mean by told. 1.3 will come with an :app:sourceSets task that prints out something in this form: Project :app androidTest --- Compile

Re: Can unit tests skip assembleDebug?

2015-04-18 Thread 'Michal Bendowski' via adt-dev
This is about running from Studio, not gradle. Please see http://b.android.com/156256, it should be fixed in the 1.3 timeframe. Thanks, Michal On Sat, Apr 18, 2015 at 1:58 AM Xavier Ducrohet x...@android.com wrote: This seems broken. I've tried it on the latest 1.2 beta and it's not the

Re: Add ability to turn off generating PNG from SVG

2015-11-13 Thread 'Michal Bendowski' via adt-dev
It controls which densities are used for generating PNGs from vector XMLs, so if you set defaultConfig.generatedDensities = ["xhdpi", "xxhdpi"] you will only get two PNGs per XML. See the DSL reference

Re: Execute a custom task for all product flavors

2015-08-27 Thread 'Michal Bendowski' via adt-dev
You will have to do something like this: android { applicationVariants.all { v - def myTask = tasks.create(custom + v.name) { // do stuff } myTask.dependOn v.assemble // or myTask.dependOn tasks.getByName(assemble + v.name.capitalize) } } You may find some

Re: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited

2015-11-23 Thread 'Michal Bendowski' via adt-dev
Yeah, the code paths are different depending on the version of build tools and we missed that initially. It will be fixed in the next version. On Thu, Nov 19, 2015 at 11:38 AM Joe Bowbeer wrote: > Suppressing these warnings by any means that is effective is fine with me >

Re: AndroidAnnotations Instant Run fix

2016-02-28 Thread 'Michal Bendowski' via adt-dev
Updated. On Friday, February 26, 2016 at 5:21:54 PM UTC, Csaba Kozák wrote: > > Hey, > > thanks for the answer! > > I agree, this is better that Instant Run does not break tools and > libraries due to manifest change. > I will remove our workaround from our lib, then. > > BTW, the format of our

Re: Jack & Jill JVM testing support

2016-03-11 Thread 'Michal Bendowski' via adt-dev
The Gradle plugin should compile your code with the old tools if you request unit tests to run (even if you have enabled jack and your APKs are built using jack). If it doesn't work for you, please file a bug. Michal On Friday, March 11, 2016 at 4:33:43 AM UTC, Artem Zinnatullin wrote: > >

Re: proguardFiles ordering not always obeyed?

2016-05-23 Thread 'Michal Bendowski' via adt-dev
I filed http://b.android.com/210923 and will have a look at it. Thanks, Michal On Wednesday, May 18, 2016 at 8:23:34 PM UTC+1, Joe Bowbeer wrote: > > I'm noticing in some builds on Jenkins (but never in local builds), that > the proguardFiles specified in a custom buildType are appended out of

Re: @Keep annotation

2016-05-23 Thread 'Michal Bendowski' via adt-dev
@Keep is recognized by "-keep" rules in the default ProGuard files, which means the names will be preserved as well, right? Michal On Friday, May 20, 2016 at 2:56:02 PM UTC+1, Tomáš Procházka wrote: > > @Keep annotation is very usefull, you mentioned it on the I/O as new think > bat id exist

Re: Changes between 2.1.2 and 2.2.0-alpha5

2016-07-19 Thread 'Michal Bendowski' via adt-dev
Hi! Sorry for a late reply. We missed the ZipAlign problem, thanks for reporting, we'll investigate. VariantDependencies is not a public API so we reserve the right to break it, sorry. What exactly is your use case for using it? Michal On Monday, July 11, 2016 at 5:14:39 PM UTC+1, Tomáš

Re: Publish Android SDK dependencies to Bintray, with EULA

2016-06-29 Thread 'Michal Bendowski' via adt-dev
You may be interested in checking out the new "auto-download" feature in our Gradle plugin 2.2: it will download missing SDK components required for the build, assuming you copy the accepted license files from $ANDROID_HOME to the CI server. Only works from the command line for now. Michal On

Re: Publish Android SDK dependencies to Bintray, with EULA

2016-07-01 Thread 'Michal Bendowski' via adt-dev
You need to copy (applicable) $ANDROID_HOME/license/* files to the CI server and that should be enough. Gradle should be able to download the required platform and build tools as well as update extras/google, extras/android repositories and install packages in the new extras/m2repository format

Re: Changes between 2.1.2 and 2.2.0-alpha5

2016-09-02 Thread 'Michal Bendowski' via adt-dev
We release the source code of the plugin after every stable release, so the 2.2 source code is not available yet. The only way in which we expose the final, effective dependency graph is in "the model". What you can try to do is use Gradle's Tooling API to get the model, i.e. an instance of the

Re: Is there any way to ignore local.properties through Gradle options?

2016-11-30 Thread 'Michal Bendowski' via adt-dev
What scripts are you talking about? local.properties are not meant to be checked-in to your VCS, hence we don't expect them to exist in a CI environment for instance. Michal On Tuesday, November 29, 2016 at 11:45:57 PM UTC, Artem Zinnatullin wrote: > > At the moment Android Gradle Plugin looks

Re: Is there any way to ignore local.properties through Gradle options?

2016-12-01 Thread 'Michal Bendowski' via adt-dev
So are you copying the entire project to a remote machine or just substituting certain tasks to run there? If the former, you should skip local.properties when copying. If the latter, than it seems you have control over the task, so you can change the compile classpath? Michal On Wednesday,

Re: Android test apk does not contain resources from library projects after updating to android gradle plugin 2.3.0

2017-04-03 Thread 'Michal Bendowski' via adt-dev
I'm sorry for not getting back to you sooner. I was unable to reproduce it: when I use the test APK R class (com.myapp.test.R), I can still reference resources from an androidTestCompile dependency. When you say "tests do not compile", you mean javac failure or aapt failure? Michal On