This repository has been archived by the owner on Jul 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
csdk.gradle
69 lines (58 loc) · 1.57 KB
/
csdk.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
import java.util.regex.Pattern
def doExtractStringFromManifest(name) {
def manifestFile = file(android.sourceSets.main.manifest.srcFile)
def pattern = Pattern.compile(name + "=\"(.*?)\"")
def matcher = pattern.matcher(manifestFile.getText())
matcher.find()
return matcher.group(1)
}
def minSdkVersion = 16
if(cdvMinSdkVersion == null) {
ext.cdvMinSdkVersion = minSdkVersion;
} else if (cdvMinSdkVersion.toInteger() < minSdkVersion) {
ext.cdvMinSdkVersion = minSdkVersion;
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url 'https://repo.adobe.com/nexus/content/repositories/releases/'
}
maven {
url 'http://maven.localytics.com/public'
}
}
}
android {
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
}
}
defaultConfig {
applicationId = doExtractStringFromManifest("package")
multiDexEnabled true
manifestPlaceholders = [appPackageName: "${applicationId}"]
}
dexOptions {
jumboMode true
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
}
}