/
build.gradle
93 lines (83 loc) · 3.12 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
/*
* Copyright (c) 2014 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: 'robolectric'
// Versioning
def versionMajor = 0
def versionMinor = 2 //Mirror api version
def versionPatch = 1
assert(versionMinor < 100) // Double digits
assert(versionPatch < 1000)
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 15
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode versionMajor * 1000000 + versionMinor * 10000 + versionPatch
versionName String.format("%d.%d.%d-SNAPSHOT", versionMajor, versionMinor, versionPatch)
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
robolectric {
include '**/*Test.class'
}
// hack for robolectric
// https://github.com/JakeWharton/gradle-android-test-plugin/issues/54
tasks.whenTaskAdded { task ->
if (task.name == 'testDebug') {
task.jvmArgs '-XX:MaxPermSize=512m', '-XX:-UseSplitVerifier'
// use afterTest to listen to the test execution results
afterTest { descriptor, result ->
println "Executing test for {$descriptor.name} with result: ${result.resultType}"
}
}
}
// for uploadArchives
group "org.opensilk.music.plugin"
version android.defaultConfig.versionName
apply from: '../../maven_local.gradle'
dependencies {
compile 'io.reactivex:rxandroid:0.23.0'
// for library
compile project(':../Orpheus:api')
//When included in Orpheus
// compile project(':api')
androidTestCompile('junit:junit:4.11')
androidTestCompile('org.robolectric:robolectric:2.4') {
// exclude module: 'classworlds'
exclude module: 'commons-logging'
exclude module: 'httpclient'
// exclude module: 'maven-artifact'
// exclude module: 'maven-artifact-manager'
// exclude module: 'maven-error-diagnostics'
// exclude module: 'maven-model'
// exclude module: 'maven-project'
// exclude module: 'maven-settings'
// exclude module: 'plexus-container-default'
// exclude module: 'plexus-interpolation'
// exclude module: 'plexus-utils'
// exclude module: 'wagon-file'
// exclude module: 'wagon-http-lightweight'
// exclude module: 'wagon-provider-api'
}
androidTestCompile('com.squareup:fest-android:1.0.0')
androidTestCompile('org.mockito:mockito-core:1.10.0')
}