|
Post by jacecen on May 31, 2021 9:42:03 GMT
Hi
How can I include a precompiled library (.jar) in the extension I am developing?
I have tried adding the path in the android / prebuilts section of the project's build.yml, but it has not worked for me.
I have also tried to copy it through the generated rakefile, but the script does not recognize the variable TARGET_TEMP_DIR.
Lastly, I have tried to copy the file manually, but it keeps giving me non-existent package errors in imports.
|
|
|
Post by Alex Epifanov on May 31, 2021 14:40:24 GMT
Not sure if documented way works now ( though we didn't break in intentionally ). Known working ways are either 1 ) setting extension type to 'brebuilt' ( see openssl.so extension for reference. It only contains native .so libs but you should be able to put jars as well ( put them inside ./ext/platform/android ). or 2 ) implement prebuilt part of your extension as .aar dependency and include it to your extension's build.yml in the 'maven_deps' section. The aar should be available at one of the repositories searched by the build system, look here: github.com/rhomobile/rhodes/blob/master/platform/android/build/maven_deps_extractor.rb#L35We can also provide more convenient solution that suits your needs.
|
|
|
Post by jacecen on Jun 1, 2021 18:13:54 GMT
Hi Alex Finally fix the problem. What I did was create a local copy of the build_common.rb script, modify it following the indications of a zebra presentation from 2015 (Using Extensions or Cordova Plugins in your RhoMobile Application) and modify the rakefile to use the local script, and it has worked. Thank you
|
|