I want to make a library which uses SharedPreferences. Now to do so I'd need to have android.jar available to me. But, as my project will never run stand-alone, I highly doubt making it a full-blown android application will be the right way to go.
Right now I've got the following build.gradle:
apply plugin: 'eclipse'
apply plugin: 'maven'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
apply plugin: 'android-library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
testCompile 'junit:junit:4.12'
testCompile 'org.slf4j:slf4j-simple:1.6.1'
}
}
But also the following error:
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'NetworkSynchronizer'.
java.io.FileNotFoundException: D:\Users\Beheerder\git\NetworkSynchronizer\src\main\AndroidManifest.xml (The system cannot find the file specified)
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Is this the right way to go, should I just add an AndroidManifest.xml, or how else should I handle this?