2

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
    }
}
  1. 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.

  2. how to compile source sets (foo, bar) other than main? and how to package them into .aar file?

Sunnyday
  • 2,252
  • 1
  • 17
  • 46

0 Answers0