I am fairly new to android studio, and I am trying to export a jar out of an Android Studio project for another Unity project.
I followed the instruction given on the link Create An Android Plugin For Unity Using Android Studio
But whenever I'm trying to export its showing "Build Successful" and "External task execution finished 'exportJar'" but I am not able to find any jar in specified folder of gradle file.
I looked into the folders "app/release" its empty and "app/build/intermediates/bundles/release/" contains only another folder named "instant-run".
So I am bit confused whether I am skipping any step or looking on the wrong path.
I m using Android Studio v2.1.2
App.build file
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.example.merchantapp"
minSdkVersion 8
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:22.2.1'
compile files('libs/PGSDK_v1.0.jar')
compile files('libs/classes.jar')
}
task deleteOldJar(type: Delete) {
delete 'release/AndroidPlugin.jar'
}
//task to export contents as jar
task exportJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('release/')
include('classes.jar')
///Rename the jar
rename('classes.jar', 'AndroidPlugin.jar')
}
exportJar.dependsOn(deleteOldJar, build)
android {
lintOptions {
abortOnError true
}
}