This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
/
build.gradle
104 lines (82 loc) · 2.39 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
def getApplicationId = { "com.stanfy.enroscar.${it.name.replaceAll(/\W/, '').replaceAll(/enroscar/, '')}" }
def projectVersion = "2.2-SNAPSHOT"
def checkstyleDir = new File(rootDir, 'config/checkstyle')
def checkstyleConfig = new File(checkstyleDir, 'checkstyle.xml')
def libraryModules = [
'content', 'ui'
].collect { project(":$it") }
ext {
androidBuildToolsVersion = '23.0.1'
androidSupportLibVersion = '23.4.0'
}
configure(libraryModules) {
version = projectVersion
group = 'com.stanfy.enroscar'
apply plugin: 'com.android.library'
apply from: file("$rootDir/gradle/tests.gradle")
apply from: file("$rootDir/gradle/publish.gradle")
//apply plugin: 'checkstyle'
// checkstyle {
// configFile = checkstyleConfig
// configProperties['basedir'] = project.projectDir
// }
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
android {
compileSdkVersion 21
buildToolsVersion project.androidBuildToolsVersion
defaultConfig {
minSdkVersion 9
testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner"
testApplicationId "${getApplicationId(project)}.test"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
ignore 'GradleDependency'
}
}
dependencies {
def commonDeps = [
'com.squareup.okhttp:mockwebserver:2.4.0',
'org.assertj:assertj-core:1.7.0',
'com.squareup.assertj:assertj-android:1.1.0@aar',
'com.squareup.assertj:assertj-android-support-v4:1.1.0@aar'
]
androidTestCompile(commonDeps)
androidTestCompile('com.jakewharton.espresso:espresso:1.1-r3') {
exclude group: 'org.hamcrest'
}
testCompile(commonDeps)
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:2.4'
testCompile 'org.mockito:mockito-all:1.9.5'
}
project.ext.dependOnProjects = { list ->
project.dependencies {
list.each {
compile project(it)
}
}
}
android {
if (project.hasProperty('preDex')) {
dexOptions {
preDexLibraries = Boolean.valueOf("$project.preDex")
}
}
}
}