use manifestPlaceholders just in AndroidTest on library project

Skip to first unread message

Tomáš Procházka

Dec 4, 2017, 6:20:05 PM12/4/17
to adt-dev
I have library project with instrumentation test (AndroidTest).
I'm using manifestPlaceholders which I don't want to replace during the library build but in the target app.

Instrumentation tests and Gradle Sync in the AS itself will crash because value for found placeholder doesn't exists.
But I can't define it in this way:

defaultConfig {
manifestPlaceholders = [certPlaceholder:""]

Because it will be already replaced in the produced AAR file.

Is there any way how to define manifestPlaceholders just for use in tests?

Jerome Dochez

Dec 5, 2017, 11:22:58 AM12/5/17
to adt-dev
it's not possible right now, we probably would need to add manifestPlaceholders to testOptions. 

can you file a RFE, we will probably do it in the 3.2 train.


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
For more options, visit

Tomáš Procházka

Dec 6, 2017, 6:36:19 AM12/6/17
to adt-dev

I created the feature request here

Is there any possible workaround now?

Dne úterý 5. prosince 2017 17:22:58 UTC+1 Jerome Dochez napsal(a):
To unsubscribe from this group and stop receiving emails from it, send an email to

Tomáš Procházka

May 18, 2019, 3:03:49 PM5/18/19
to adt-dev
Please, can you look at it?

It is really a big blocker for us. It is not possible to write tests if you have a library project with manifest placeholders.
If you define it defaultConfig it replaces all placeholders before deploying to artifactory.
If we don't do that placeholder are not replaced during running tests and it fails.

Dne středa 6. prosince 2017 12:36:19 UTC+1 Tomáš Procházka napsal(a):
Reply all
Reply to author
0 new messages