| apply plugin: 'com.android.library' |
| archivesBaseName = 'customtabs' |
| |
| dependencies { |
| compile project(':support-compat') |
| compile project(':support-annotations') |
| |
| androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") { |
| exclude module: 'support-annotations' |
| } |
| androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") { |
| exclude module: 'support-annotations' |
| } |
| testCompile 'junit:junit:4.12' |
| } |
| |
| android { |
| compileSdkVersion project.ext.currentSdk |
| |
| defaultConfig { |
| testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| } |
| |
| sourceSets { |
| main.manifest.srcFile 'AndroidManifest.xml' |
| main.java.srcDirs = ['src'] |
| main.aidl.srcDirs = ['src'] |
| main.res.srcDir 'res' |
| main.assets.srcDir 'assets' |
| main.resources.srcDir 'java' |
| |
| androidTest.setRoot('tests') |
| androidTest.java.srcDir('tests/src/') |
| } |
| |
| compileOptions { |
| sourceCompatibility JavaVersion.VERSION_1_7 |
| targetCompatibility JavaVersion.VERSION_1_7 |
| } |
| } |
| |
| android.libraryVariants.all { variant -> |
| def name = variant.buildType.name |
| |
| if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) { |
| return; // Skip debug builds. |
| } |
| def suffix = name.capitalize() |
| |
| def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| classifier = 'sources' |
| from android.sourceSets.main.java.srcDirs |
| } |
| |
| artifacts.add('archives', sourcesJarTask); |
| } |