forked from chenyangcun/MaterialDesignExample
-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.gradle
141 lines (135 loc) · 5.54 KB
/
settings.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
include ':app',':agera'
gradle.ext.versionCode = 10100
gradle.ext.versionName = '1.1.0-SNAPSHOT'
gradle.ext.bintrayRepo = 'Agera'
gradle.ext.bintrayName = 'agera'
gradle.ext.bintrayUser = 'ernstsson'
gradle.ext.description = 'Reactive Programming for Android'
gradle.ext.group = 'com.google.android.agera'
gradle.ext.url = 'https://github.com/google/agera'
gradle.ext.gitUrl = 'https://github.com/google/agera.git'
gradle.ext.licenseName = 'The Apache Software License, Version 2.0'
gradle.ext.licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
gradle.ext.minSdkVersion = 9
gradle.ext.compileSdkVersion = 23
gradle.ext.buildToolsVersion = '23.0.3'
gradle.ext.supportLibraryVersion = '23.3.0'
gradle.ext.javaVersion = JavaVersion.VERSION_1_7
gradle.allprojects {
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.3.1'
classpath 'com.novoda:bintray-release:0.3.4'
}
}
repositories {
jcenter()
}
tasks.withType(JavaForkOptions) {
jvmArgs '-Djava.awt.headless=true'
}
tasks.withType(Test) {
testLogging {
exceptionFormat "full"
events "passed", "failed", "skipped"
showCauses true
showExceptions true
showStackTraces true
showStandardStreams true
}
}
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
defaultConfig {
versionCode gradle.versionCode
versionName gradle.versionName
}
}
if (android.hasProperty('libraryVariants')) {
version = gradle.versionName
group = gradle.group
android {
lintOptions {
textReport true
textOutput 'stdout'
checkAllWarnings true
}
buildTypes {
debug {
testCoverageEnabled true
}
}
}
dependencies {
compile 'com.android.support:support-annotations:' +
gradle.supportLibraryVersion
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.1-rc1'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'nl.jqno.equalsverifier:equalsverifier:2.0.2'
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task jacocoTestReport(type:JacocoReport, dependsOn: "testDebugUnitTest") {
group = "Reporting"
description = "Generate Jacoco coverage reports"
def fileFilter = ['**/R.class', '**/R$*.class', '**/BR.class',
'**/BuildConfig.*', '**/Manifest*.*', 'android/**/*.*']
def debugTree = fileTree(dir:
"${project.buildDir}/intermediates/classes/debug",
excludes: fileFilter)
def mainSrc = "${project.projectDir}/src/main/java"
sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
additionalSourceDirs = files([
"${buildDir}/generated/source/buildConfig/debug",
"${buildDir}/generated/source/r/debug"
])
executionData = fileTree(dir: project.projectDir, includes:
['**/*.exec', '**/*.ec'])
reports {
xml.enabled = true
xml.destination = "${buildDir}/jacocoTestReport.xml"
csv.enabled = false
html.enabled = true
html.destination = "${buildDir}/reports/jacoco"
}
}
android.libraryVariants.all { variant ->
task("${variant.name}Javadoc", type: Javadoc) {
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
classpath = files(variant.javaCompile.classpath.files,
project.android.getBootClasspath())
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
}
task javadocJar(type: Jar, dependsOn: 'releaseJavadoc') {
classifier = 'javadoc'
from {
releaseJavadoc.destinationDir
}
}
artifacts {
archives javadocJar
archives sourcesJar
}
android {
compileSdkVersion gradle.compileSdkVersion
buildToolsVersion gradle.buildToolsVersion
}
}
}
}
}