I'm going to create an android library (.aar) wrapping many Bluetooth devices SDK (.jar and .aar files). This files cannot be published in a Maven or alternative repositories.
Following these links (link1, link2), I've successfully added an .aar file as dependency module.
Building my library as .aar file I've noticed that the .jar and .aar dependency files are not embedded in the generated file. In fact, adding my library to a demo Android Application cause a Class not found exception.
I know that currently is available a library called FAT AAR providing the solution, but I'd like to know how to perform this operation without the library.
The build.gradle of the embedded .aar library is the following:
configurations.maybeCreate("default")
artifacts.add("default", file("xxxxxx_v2.5.3.aar"))
task clean(type: Delete) {
delete rootProject.buildDir
}
group = "com.xxxxxx.ble.dev"
version = "2.5.3"
I've already tried to add in the dependencies section of my build.gradle library the following code, without any result.
api project(':name_of_the_module')
api project(':name_of_the_module', configuration: 'default')
implementation project(':name_of_the_module')
implementation project(':name_of_the_module', configuration: 'default')
My dev IDE is Android Studio Dolphin | 2021.3.1 Patch 1 Build #AI-213.7172.25.2113.9123335, built on September 30, 2022