java - Building JAR from Android SDK -


i have task create android specific .jar file (in java) that can used in different projects developing android apps. planning develop whole .jar file in android sdk . have strange situation need .property/.xml file store database passwords. question

  1. can have .property/.xml file part of .jar can read/write value.(i guess not possible).
  2. if not should create temp. files while jar invoked. in case need change password when ever app (using jar ) starts.

i confused go here.

hope question understandable.

if want create aar file have add following declaration build.gradle:

apply plugin: 'com.android.library'  

then when you'll build project see aar file following directory:

build/outputs/aar/ 

if rename aar file zip , unzip it, you'll see classes.jar file.

however have understand aar file. according android tools project site:

the 'aar' bundle binary distribution of android library project.

the file extension .aar, , maven artifact type should aar well, file simple zip file following entries:

 /androidmanifest.xml (mandatory)  /classes.jar (mandatory)  /res/ (mandatory)  /r.txt (mandatory)  /assets/ (optional)  /libs/*.jar (optional)  /jni/<abi>/*.so (optional)  /proguard.txt (optional)  /lint.jar (optional) 

these entries directly @ root of zip file.


Comments