forked from MirakelX/mirakel-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
100 lines (95 loc) · 2.96 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
buildscript {
dependencies {
repositories {
mavenCentral()
maven {
url "file:~/.m2/"
artifactUrls "file:~/.m2/"
}
}
classpath 'com.android.tools.build:gradle:0.10.+'
// classpath 'com.jakewharton.hugo:hugo-plugin:1.0.+'
classpath 'org.robolectric:robolectric-gradle-plugin:0.11.+'
}
}
dependencies {
repositories {
mavenCentral()
// NOTE: This is only needed when developing the plugin!
mavenLocal()
}
}
def String getProjectProperty(String propertyName) {
String propertyValue = "null"
if (hasProperty(propertyName)) {
propertyValue = this.properties[propertyName]
} else {
throw GradleScriptException("PropertyName " + propertyName + " is not defined in properties file")
}
return propertyValue
}
apply plugin: "sonar-runner"
sonarRunner {
sonarProperties {
property "sonar.host.url", getProjectProperty('sonar.host.url')
property "sonar.jdbc.url", getProjectProperty('sonar.db.url')
property "sonar.jdbc.username", getProjectProperty('sonar.db.user')
property "sonar.jdbc.password", getProjectProperty('sonar.db.password')
}
}
subprojects {
sonarRunner {
sonarProperties {
property "sonar.projectKey", project.name
property "sonar.projectName", project.name
property "sonar.projectVersion", "V1.0"
property "sonar.language", "java"
property "sonar.sources", "src"
property "sonar.binaries", "build/apk"
}
}
}
gradle.projectsEvaluated {
def projects=["custom_views","date-time-picker","widget","settings"]
for(String proj:projects){
def res_dir=rootDir.toString()+"/"+proj+"/res"
def res_v14_dir=rootDir.toString()+"/"+proj+"/res-v14"
def script = (rootDir.toString()+"/build/scripts/generate_v14_compatible_resources.py --res-dir "+res_dir+" --res-v14-compatibility-dir "+res_v14_dir+"").execute()
script.err.eachLine {line -> println "ERROR: " + line}
script.waitFor()
def res = fileTree(dir: res_dir)
def res_v14 =fileTree(dir: res_v14_dir)
delete proj+"/merged-res";
copy{
from (res_dir){
include '**/*.xml'
}
from (res_v14_dir){
include '**/*.xml'
}
into (rootDir.toString()+"/"+proj+"/merged-res")
}
}
}
ext {
compileSdkVersion = 19
buildToolsVersion = "19.1.0"
minSDKVersion = 8
}
configure(allprojects) {
ext.androidSDKVersion = "19"
ext.androidBuildToolsVersion = "19.0"
ext.androidSupportVersion = "19.0.1"
ext.androidPluginVersion ="0.10.+"
ext.androidMinSDKVersion ="8"
ext.jodaLibraryVersion = "2.2"
ext.nineoldandroisVersion="2.4.0"
ext.robotiumVersion = "5.1"
ext.gsonVersion = "2.2.+"
ext.junitVersion= "4.11"
}
allprojects {
repositories {
mavenCentral()
}
}