forked from material-components/material-components-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
114 lines (96 loc) · 3.43 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
apply plugin: 'com.android.library'
archivesBaseName = 'design'
dependencies {
compile 'com.android.support:support-annotations:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:transition:25.1.0'
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'
}
androidTestCompile ("com.android.support.test.espresso:espresso-contrib:${project.rootProject.ext.espressoVersion}") {
exclude group: 'com.android.support'
}
androidTestCompile 'org.mockito:mockito-core:1.9.5'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
testCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
exclude module: 'support-annotations'
}
testCompile 'junit:junit:4.12'
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// This disables the builds tools automatic vector -> PNG generation
generatedDensities = []
}
sourceSets {
main.manifest.srcFile 'AndroidManifest.xml'
main.java.srcDirs = [
'base',
'gingerbread',
'honeycomb',
'honeycomb-mr1',
'ics',
'lollipop',
'src'
]
main.res.srcDirs = [
'res',
'res-public'
]
main.assets.srcDir 'assets'
main.resources.srcDir 'src'
androidTest.setRoot('tests')
androidTest.java.srcDir 'tests/src'
androidTest.res.srcDir 'tests/res'
androidTest.manifest.srcFile 'tests/AndroidManifest.xml'
test.java.srcDir 'jvm-tests/src'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes.all {
consumerProguardFiles 'proguard-rules.pro'
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
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 jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){
dependsOn variant.javaCompile
from variant.javaCompile.destinationDir
from 'LICENSE.txt'
}
def javadocTask = project.tasks.create(name: "javadoc${suffix}", type: Javadoc) {
source android.sourceSets.main.java
classpath = files(variant.javaCompile.classpath.files) + files(
"${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar")
}
def javadocJarTask = project.tasks.create(name: "javadocJar${suffix}", type: Jar) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts.add('archives', javadocJarTask);
artifacts.add('archives', sourcesJarTask);
}