How to release multiple AARs as artifacts in subproject

Hi,

I try to build project where sub-project android library should release multiple aar’s (android archive files). In details: library code packed as AAR and also needed to include two dependent AARs that are heavily patched during compilation process.

I try to implement concept introduced for java libraries:

  1. create custom configurations
  2. publish configurations in artifacts/archives scope/closures and with builtBy assigned task

But that approach does not work for android libraries/applications with AAR archives. It works with JAR but not with AARs.

Can you help me find an approach that will work with AARs? Or give the way to inject ‘dependency into project after configuration phase’ OR ‘force task execution in the configuration phase’

gist: https://gist.github.com/OleksandrKucherenko/8239dc7c792417eae344708f2e51f1b6

source: https://github.com/oblador/react-native-keychain/pull/260

Thanks