Android library with multiple source sets:
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 12
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
foo
bar
}
}
Inside the android studio, when adding a new class into the library, there is no selection of source Set to add the new class to.
how to compile source sets (foo, bar) other than main? and how to package them into .aar file?