The next versions will have a new structure. It will include the .xml as always. The jar will be a complete empty jar file and there will be an additional .aar with includes the library code and the resources.
I did ask Erel if a library .jar could be replaced by an .aar file in
this thread, the answer is no, an empty/dummy .jar file is always required.
The same thread details a lack of support for 'jni' folders in .aar libraries, the b4a compiler does not copy jni folder resources to the compiled .apk file.
Something you'd have to watch for if your .aar contains .so files.
Perhaps another feature request could be for a b4a library .jar to be optional - it can be replaced with an .aar file.
With .aar jni folder support and no requirement to create a b4a .jar we could finally abandon the old .jar libraries entirely and use the newer .aar format.
About SLC:
How do you do it with SLC? In my tests I got many errors because SLC couldn't reference all the support library symbols and I can't pass any jars to it because there aren't any jars anymore.
In my java class i create the annotation:
@BA.DependsOn(values={
"common.aar",
"commonwidget.aar",
"videowidget.aar"
})
These three library files are located in my b4a additional libraries folder.
This enables using the library in b4a, to get SLC to compile it i also had to:
- Create a folder named 'libs' in the root of my SLC source folder.
My SLC source folder is named 'GoogleVR_B4A':
GoogleVR_B4A\libs
GoogleVR_B4A\src
- Extract the classes.jar file from each of my .aar files to my libs folder.
Rename each classes.jar - give them all unique filenames.
My SLC source folder now looks like:
GoogleVR_B4A\libs
GoogleVR_B4A\libs\common.classes.jar
GoogleVR_B4A\libs\commonwidget.classes.jar
GoogleVR_B4A\libs\videowidget.classes.jar
GoogleVR_B4A\src
SLC compiles perfectly with these extracted classes.jar files in the libs folder.
The GoogleVR SDK library files are not available via maven and must be manually downloaded.
You're using library files that are available via maven - and these library files are the ones you need to extract the classes.jar from.
That makes using SLC less attractive - your library updates no longer require a simple edit to the gradle file in android studio, instead you'd need to manually replace the old classes.jar files with new versions.
Compiling (to .jar or, ideally, .aar) and creating xml entirely within Android Studio sounds like a much better option.