forked from MirakelX/mirakel-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
91 lines (83 loc) · 2.68 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
buildscript {
dependencies {
repositories {
mavenCentral()
maven {
url "file:~/.m2/"
artifactUrls "file:~/.m2/"
}
}
classpath 'com.android.tools.build:gradle:0.14.0'
// classpath 'com.jakewharton.hugo:hugo-plugin:1.0.+'
classpath 'org.robolectric:robolectric-gradle-plugin:0.13.+'
}
}
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
}
gradle.projectsEvaluated {
def projects=["custom_views","date-time-picker","widget","settings","colorpickerpreference","donationslib","new_ui","main"]
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', '**/*.png'
}
from (res_v14_dir){
include '**/*.xml', '**/*.png'
}
into (rootDir.toString()+"/"+proj+"/merged-res")
}
}
}
ext {
compileSdkVersion = 21
buildToolsVersion = "21.1.0"
minSDKVersion = 8
}
configure(allprojects) {
ext.androidSDKVersion = "21"
ext.androidBuildToolsVersion = "21.1.0"
ext.androidSupportVersion = "21.0.+"
ext.androidPluginVersion ="0.14.0"
ext.androidMinSDKVersion ="14"
ext.jodaLibraryVersion = "2.2"
ext.nineoldandroisVersion="2.4.0"
ext.robotiumVersion = "5.2.1"
ext.gsonVersion = "2.2.+"
ext.junitVersion = "4.11"
ext.guavaVersion = "17.0"
ext.butterknifeVersion = "5.1.1"
ext.dashclockVersion = "2.0.0"
ext.robolectricVersion= "2.3"
}
allprojects {
repositories {
mavenCentral()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}