use manifestPlaceholders just in AndroidTest on library project

442 views
Skip to first unread message

Tomáš Procházka

unread,
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

unread,
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.

jerome

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tomáš Procházka

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

I created the feature request here https://issuetracker.google.com/issues/70261854

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 adt-dev+u...@googlegroups.com.

Tomáš Procházka

unread,
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
Forward
0 new messages