I have moved all my projects from Eclipse to Android Studio, so decided to write how I have done for generating JAR and XML file for Basic4Android.
1. Create new project - File>New Project or if you have one go to Step2
2. File>New Module>Java Library
3. Copy .bat and doclet files to "libs" folder for example. .bat file is very simple with the following code:
4. Now open "Run/Debug Configurations" and add Gradle, in tasks write JAR , then add your .bat file as external tool with the path to your project as parameter. Now you can generate JAR and XML files in build folder of your module by clicking "Run" button.
Note: if you use JAVA8 as compiler, add to gradle the following lines:
this makes JAR in compatibility with JAVA7.
Regards
John
1. Create new project - File>New Project or if you have one go to Step2
2. File>New Module>Java Library
3. Copy .bat and doclet files to "libs" folder for example. .bat file is very simple with the following code:
B4X:
If Not Exist %1build\libs\ ( mkdir %1build\libs\ )
javadoc.exe -doclet BADoclet -docletpath %1libs\ -sourcepath %1src\main\java\ -classpath %1libs\* -b4atarget %1build\libs\YOUR_NAME.xml -subpackages YOUR_PACKAGE -exclude PACKAGE_TO_EXCLUDE or NONE
4. Now open "Run/Debug Configurations" and add Gradle, in tasks write JAR , then add your .bat file as external tool with the path to your project as parameter. Now you can generate JAR and XML files in build folder of your module by clicking "Run" button.
Note: if you use JAVA8 as compiler, add to gradle the following lines:
B4X:
project(':YOUR_MODULE_NAME') {
apply plugin: 'java'
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
Regards
John
Last edited: