Doris Liu | d5206a7 | 2017-02-23 16:00:37 -0800 | [diff] [blame^] | 1 | apply plugin: 'com.android.library' |
| 2 | archivesBaseName = 'support-dynamic-animation' |
| 3 | |
| 4 | dependencies { |
| 5 | compile project(':support-core-utils') |
| 6 | androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") { |
| 7 | exclude module: 'support-annotations' |
| 8 | } |
| 9 | androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") { |
| 10 | exclude module: 'support-annotations' |
| 11 | } |
| 12 | |
| 13 | testCompile 'junit:junit:4.12' |
| 14 | testCompile "org.mockito:mockito-core:1.9.5" |
| 15 | |
| 16 | testCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") { |
| 17 | exclude module: 'support-annotations' |
| 18 | } |
| 19 | androidTestCompile 'org.mockito:mockito-core:1.9.5' |
| 20 | androidTestCompile 'com.google.dexmaker:dexmaker:1.2' |
| 21 | androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2' |
| 22 | compile 'com.google.code.findbugs:jsr305:2.0.1' |
| 23 | } |
| 24 | |
| 25 | android { |
| 26 | compileSdkVersion project.ext.currentSdk |
| 27 | |
| 28 | defaultConfig { |
| 29 | minSdkVersion 16 |
| 30 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| 31 | } |
| 32 | |
| 33 | sourceSets { |
| 34 | main.manifest.srcFile 'AndroidManifest.xml' |
| 35 | main.java.srcDir 'src' |
| 36 | main.res.srcDirs 'res', 'res-public' |
| 37 | |
| 38 | androidTest.setRoot('tests') |
| 39 | androidTest.java.srcDir 'tests/src' |
| 40 | androidTest.res.srcDir 'tests/res' |
| 41 | androidTest.manifest.srcFile 'tests/AndroidManifest.xml' |
| 42 | } |
| 43 | |
| 44 | compileOptions { |
| 45 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 46 | targetCompatibility JavaVersion.VERSION_1_7 |
| 47 | } |
| 48 | |
| 49 | lintOptions { |
| 50 | // TODO: fix errors and reenable. |
| 51 | abortOnError false |
| 52 | } |
| 53 | |
| 54 | packagingOptions { |
| 55 | exclude 'LICENSE.txt' |
| 56 | } |
| 57 | |
| 58 | testOptions { |
| 59 | unitTests.returnDefaultValues = true |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | android.libraryVariants.all { variant -> |
| 64 | def name = variant.buildType.name |
| 65 | |
| 66 | if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) { |
| 67 | return; // Skip debug builds. |
| 68 | } |
| 69 | def suffix = name.capitalize() |
| 70 | |
| 71 | def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| 72 | classifier = 'sources' |
| 73 | from android.sourceSets.main.java.srcDirs |
| 74 | } |
| 75 | |
| 76 | artifacts.add('archives', sourcesJarTask); |
| 77 | } |
| 78 | |
| 79 | uploadArchives { |
| 80 | repositories { |
| 81 | mavenDeployer { |
| 82 | repository(url: uri(rootProject.ext.supportRepoOut)) { |
| 83 | } |
| 84 | |
| 85 | pom.project { |
| 86 | name 'Android Support DynamicAnimation v16' |
| 87 | description "Physics-based animation in support library, where the animations are driven by physics force. You can use this Animation library to create smooth and realistic animations." |
| 88 | url 'http://developer.android.com/tools/extras/support-library.html' |
| 89 | inceptionYear '2017' |
| 90 | |
| 91 | licenses { |
| 92 | license { |
| 93 | name 'The Apache Software License, Version 2.0' |
| 94 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 95 | distribution 'repo' |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | scm { |
| 100 | url "http://source.android.com" |
| 101 | connection "scm:git:https://android.googlesource.com/platform/frameworks/support" |
| 102 | } |
| 103 | developers { |
| 104 | developer { |
| 105 | name 'The Android Open Source Project' |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | } |