build.gradle file
build.gradle file apply plugin: 'com.android.library'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
publishNonDefault true
defaultConfig {
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
//Path to your source code
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/../lib'
}
}
}
// This is important, it will run lint checks but won't abort build
lintOptions {
abortOnError false
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile files('libs/AdvancedWebView.jar')
compile project(':ShortcutBadger')
compile files('libs/commons-net-3.4.jar')
compile files('libs/ksoap2-android-assembly-3.6.0-jar-with-dependencies.jar')
}
task clearJar(type: Delete) {
delete 'release/' + POM_ARTIFACT_ID + '_' + VERSION_NAME + '.jar'
}
task makeJar(type: Copy) {
from('build/intermediates/bundles/debug/')
into('release/')
include('classes.jar')
rename ('classes.jar', POM_ARTIFACT_ID + '_' + VERSION_NAME + '.jar')
}
makeJar.dependsOn(clearJar, build)
and this is my mainifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="package name">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true">
<activity android:name=".SplashScreen"
android:label="@string/app_name"/>
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:label="@string/app_name" >
</activity>
<activity android:name=".NextActivity"
android:label="@string/app_name"/>
</application>
</manifest>