forked from OpenSilk/Orpheus
/
build.gradle
72 lines (61 loc) · 2.8 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
/*
* Copyright (c) 2015 OpenSilk Productions LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
apply plugin: 'com.android.library'
apply plugin: 'org.robolectric'
// Versioning
def versionMajor = 0
def versionMinor = 1
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
assert(versionMinor < 100) // Double digits
assert(versionPatch < 100) // Double digits
assert(versionBuild < 100) // Double digits
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 15
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
versionName String.format("%d.%d.%d-SNAPSHOT", versionMajor, versionMinor, versionPatch)
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
defaultPublishConfig "debug"
}
robolectric {
include '**/*Test.class'
//jvmArgs '-XX:MaxPermSize=512m', '-XX:-UseSplitVerifier'
afterTest {
descriptor, result -> println "Executing test for ${descriptor.name} with result: ${result.resultType}"
}
}
dependencies {
provided(group: 'com.google.dagger', name:'dagger-compiler', version: rootProject.ext.dagger2Version)
compile (group: 'com.google.dagger', name:'dagger', version: rootProject.ext.dagger2Version)
compile (group:'io.reactivex', name: 'rxandroid', version: rootProject.ext.rxAndroidVersion)
compile (group:'com.jakewharton.timber', name:'timber', version:rootProject.ext.timberVersion)
compile 'com.squareup.mortar:mortar:0.17'
compile (group: 'com.android.support', name: 'support-v4', version: rootProject.ext.supportLibVersion)
compile (group: 'com.android.support', name: 'appcompat-v7', version: rootProject.ext.supportLibVersion)
//we dont add this here its just for the gsoncomonent stub
provided(group: 'com.google.code.gson', name: 'gson', version: rootProject.ext.gsonVersion)
//not needed as compile but prevents having to add it as provided for all modules
compile 'javax.annotation:jsr250-api:1.0'
}