-
Notifications
You must be signed in to change notification settings - Fork 292
/
build.gradle
143 lines (124 loc) · 3.44 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
allprojects {
repositories {
jcenter()
mavenCentral();
maven {
url 'https://oss.sonatype.org/content/repositories/releases'
}
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
applicationId "in.srain.cube.demo"
minSdkVersion 8
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
}
signingConfigs {
debug {
storeFile file('tools/debug.keystore')
}
release {
storeFile file('tools/cubeapp.keystore')
storePassword "cubeapp"
keyAlias "cubeapp"
keyPassword "cubeapp"
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.release
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['resources']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
// aidl.srcDirs = ['src']
// renderscript.srcDirs = ['src']
}
androidTest.setRoot('tests')
}
dexOptions {
preDexLibraries = false
}
allprojects {
repositories {
jcenter()
mavenCentral();
}
}
lintOptions {
abortOnError false
}
}
def EXCLUDE_JAR_LIST = ['cube-sdk', 'support-v4-r7-source', 'ultra-ptr', 'support-annotation']
task copyLibs << {
// copy jars
copy {
from configurations.compile
into "libs"
eachFile { file ->
for (name in EXCLUDE_JAR_LIST) {
if (file.name.contains(name)) {
file.exclude()
return
}
}
}
}
// copy source
copy {
def sourceList = configurations.compile.incoming.dependencies.collect { dependency ->
dependency.artifact { artifact ->
artifact.name = dependency.name
artifact.type = 'source'
artifact.extension = 'jar'
artifact.classifier = 'sources'
}
dependency
}
from(configurations.detachedConfiguration(sourceList as Dependency[]).resolvedConfiguration.
resolvedConfiguration.lenientConfiguration.getFiles(Specs.SATISFIES_ALL)) {
}
into("libs")
eachFile { file ->
for (name in EXCLUDE_JAR_LIST) {
if (file.name.contains(name)) {
file.exclude()
return
}
}
}
}
}
dependencies {
compile 'com.google.android:support-v4:r7'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'in.srain.cube:clog:1.0.2'
compile('in.srain.cube:ultra-ptr:1.0.9.1-SNAPSHOT@aar') {
exclude group: 'in.srain.cube', module: 'clog'
}
compile('in.srain.cube:cube-sdk:1.0.44.33-SNAPSHOT@aar') {
exclude group: 'in.srain.cube', module: 'clog'
}
}