This repository has been archived by the owner on Jan 7, 2023. It is now read-only.
/
build.gradle
117 lines (94 loc) · 2.77 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
buildscript {
ext.packer_version = '1.9.2'
repositories {
maven { url '/tmp/repo/' }
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
classpath "com.android.tools.build:gradle:2.2.3"
classpath "com.mcxiaoke.packer-ng:plugin:$packer_version"
}
}
repositories {
maven { url '/tmp/repo/' }
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
apply plugin: 'com.android.application'
apply plugin: 'packer'
// https://code.google.com/p/android/issues/detail?id=171089
dependencies {
compile "com.mcxiaoke.packer-ng:helper:$packer_version"
}
//packer-begin
packer {
archiveNameFormat = '${appPkg}-${buildType}-v${versionName}-${channel}'
archiveOutput = new File(project.rootProject.buildDir, "apks")
// channelList = ['*Douban*', 'Google/', '中文/@#市场', 'Hello@World',
// 'GradleTest', '20070601!@#$%^&*(){}:"<>?-=[];\',./']
// channelFile = new File(project.rootDir, "channels.txt")
channelMap = [
"free" : project.rootProject.file("channels/free.txt"),
"paid" : project.rootProject.file("channels/paid.txt"),
"other": project.rootProject.file("channels/channels.txt")
]
}
//packer-end
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
encoding "UTF-8"
}
compileSdkVersion project.compileSdkVersion
buildToolsVersion project.buildToolsVersion
defaultConfig {
versionName project.VERSION_NAME
versionCode Integer.parseInt(project.VERSION_CODE)
minSdkVersion project.minSdkVersion
targetSdkVersion project.targetSdkVersion
}
signingConfigs {
v2 {
storeFile file("android.keystore")
storePassword "android"
keyAlias "android"
keyPassword "android"
v2SigningEnabled true
}
v1 {
storeFile file("android.keystore")
storePassword "android"
keyAlias "android"
keyPassword "android"
v2SigningEnabled false
}
}
buildTypes {
release {
signingConfig signingConfigs.v2
minifyEnabled false
}
beta {
signingConfig signingConfigs.v1
minifyEnabled false
}
alpha {
minifyEnabled false
}
}
productFlavors {
free {}
paid {}
other {}
}
lintOptions {
abortOnError false
htmlReport true
}
packagingOptions {
exclude 'LICENSE.txt'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}