This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 639
/
settings.gradle
170 lines (163 loc) · 6.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/*
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
include ':agera'
include ':extensions:content'
include ':extensions:rvadapter'
include ':extensions:rvdatabinding'
include ':extensions:database'
include ':extensions:net'
include ':testapp'
gradle.ext.versionCode = 10400
gradle.ext.versionName = '1.4.0'
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 = 25
gradle.ext.buildToolsVersion = '25.0.1'
gradle.ext.supportLibraryVersion = '25.2.0'
gradle.ext.javaVersion = JavaVersion.VERSION_1_7
gradle.allprojects {
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'me.tatarka:gradle-retrolambda:3.4.0'
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.2'
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
}
}
testOptions {
unitTests.all {
jacoco {
includeNoLocationClasses = 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.4'
testCompile 'org.mockito:mockito-core:2.3.5'
testCompile 'nl.jqno.equalsverifier:equalsverifier:2.1.8'
}
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
}
}
}
}
}