LiquidPlayer/LiquidCore

Android Gradle Plugin 4.0.0, direct local .aar file dependencies are not supported when building an AAR

kdarrimajou opened this issue · 3 comments

Hi,
I got this error when I updated Android Gradle Plugin to version 4.0.0 :

> Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :appconsent-core project caused this error: /.liquidcore/liquidcore-Nodejs-0.7.9.aar, /.liquidcore/liquidcore-V8-0.7.9.aar

To fix this issue you have to host AAR on separate repository. Can you do this ?

The AARs are hosted on github. If you look at include.gradle and include.V8.gradle, this is where the AAR download happens. If you can figure out a solution, please file a PR. Otherwise I am not quite sure when I can get to it.

IMO it would be much more simply working with this library if it would be possible to include it as a dependency, hosted on some maven repository. This would resolve this issue too.

I am going to be a little off-topic, I just want to share an opinion from a library user perspective. I found something like the following code less invasive.

// This plugin defines the necessary tasks for bundling the js code
apply plugin: "liquidcore-plugin"

dependencies {
  implementation "liquidcore-v8-package"
}

The assumptions are that the library is distributed through a maven repository and that the tasks are going to be defined inside a plugin. (I am sharing this opinion here because the following code would isolate the AAR dependency in its own module and solve the issue)