How to publish another variant aware artifact per android module ?

41 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Stéphane NICOLAS

ungelesen,
08.12.2017, 01:51:3708.12.17
an adt-dev
Hi all,

I am trying, for an OSS lib, to write a plugin that
  • creates a jar artifact, only code, no resource
  • the jar is created via a task, compiled via a task
  • the configurations, sourceset, are pure java (I don't use andoird source sets)

I can get this to work, but I would like this to be variant aware: I would like a consumer project to be able to consume different jars by passing their current android variant to the producer.

And I am stuck, I spent hours reading the code, and I couldn't find a way to do it. It looks like there is no open API to achieve it.


Can anyone help ?


Thanks in advance,

 Stephane

Stéphane NICOLAS

ungelesen,
11.12.2017, 13:54:1311.12.17
an adt-dev
It's clearly not an easy one, but we are making progress.

The last thing we are struggling with is getting the build type and product flavor attirbutes and applying them to our custom coonfigurations for attributes matching (we want to use the android attributes so that we benefit from the matching strategy).

Thanks in advance if anyone can point us in the right direction, otherwise our plan is to copy the attributes from a working configuration from the android plugin.

Stéphane NICOLAS

ungelesen,
11.12.2017, 19:58:3511.12.17
an adt-dev
FYI: It worked by copying the attributes from a variant's config. We had to exclude some attributes but it works well to get access to proper buitype and product flavor attributes.
Our plugin is variant aware !
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten