build.gradle
6.29 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import java.text.SimpleDateFormat
//apply plugin: 'android'
apply plugin: 'com.android.application'
buildscript {
repositories {
mavenCentral()
maven {
url 'https://maven.aliyun.com/repository/google/'
// url 'https://maven.google.com/'
// name 'Google'
}
maven {
url 'https://maven.aliyun.com/repository/jcenter/'
}
// maven {
// url 'https://maven.google.com/'
// name 'Google'
// }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
}
dependencies {
implementation files('libs/android-support-v4.jar')
implementation files('libs/bcprov-jdk16-1.45.jar')
implementation files('libs/dom4j-1.6.1.jar')
implementation files('libs/fastjson-1.2.3.jar')
implementation files('libs/sunjce_provider.jar')
implementation files('libs/zbar.jar')
implementation files('libs/zxing.jar')
implementation files('libs/gson-2.6.2.jar')
implementation files('libs\\rskapi.jar')
implementation files('libs\\zkandroidcore.jar')
implementation files('libs\\zkandroididcardreader.jar')
implementation files('libs\\iodev2.jar')
implementation files('libs\\decoderapijni.jar')
implementation files('libs\\android-logging-log4j-1.0.3.jar')
implementation files('libs\\log4j-1.2.17.jar')
implementation files('libs\\zypos1.8.jar')
implementation files('libs\\jsch-0.1.54.jar')
implementation 'org.jetbrains:annotations-java5:15.0'
compileOnly files('external_libs/classes_2.1.11_20160907.jar')
compileOnly files('external_libs/bw_odm_20160526.jar')
implementation files('libs/bw_pos_sdk2.0.18.jar')
implementation 'com.squareup.okhttp3:okhttp:3.6.0'
// implementation('com.android.support:support-v4:21.0.0')
// implementation('com.android.support:appcompat-v7:21.0.0'){ // You should exclude one of them not both of them
// exclude module: "support-v4"
// exclude group: "com.android.support", module: "support-v4"
// exclude group: "com.android.support", module: "slidingpanelayout"
// exclude group: "com.android.support", module: "cursoradapter"
// exclude group: "com.android.support", module: "support-compat"
// exclude group: "com.android.support", module: "cursoradapter"
// exclude group: "com.android.support", module: "drawerlayout"
// exclude group: "com.android.support", module: "viewpager"
// exclude group: "com.android.support", module: "collections"
// exclude group: "com.android.support", module: "loader"
// exclude group: "com.android.support", module: "localbroadcastmanager"
// exclude group: "com.android.support", module: "support-fragment"
//// exclude group: "com.android.support", module: "support-core-ui"
// exclude group: "com.android.support", module: "support-core-utils"
// }
// implementation 'com.android.support:support-vector-drawable:26.1.0'
// implementation 'com.android.support:design:26.1.0'
}
android {
compileSdkVersion 21
buildTypes {
release {
//在这里添加:
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled false
shrinkResources false//去掉不用资源
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//在apk文件后边生成版本号信息
android.applicationVariants.all {
variant ->
variant.outputs.all {
//在这里修改apk文件名 Selfserviceticketingandroid_V1.0.5_202006220953
outputFileName = "CYTAndroid_V${variant.versionName}_${releaseTime()}.apk"
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
// Move the tests to tests/java, tests/res, etc...
// instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
vectorDrawables.useSupportLibrary =true
ndk {
abiFilters "armeabi", "armeabi-v7a"//可以适当补填其他
// abiFilters "armeabi"//可以适当补填其他
}
}
// configurations {
// all { // You should exclude one of them not both of them
// exclude group: "com.android.support", module: "customview"
// exclude group: "com.android.support", module: "slidingpanelayout"
// exclude group: "com.android.support", module: "cursoradapter"
// exclude group: "com.android.support", module: "support-compat"
// exclude group: "com.android.support", module: "cursoradapter"
// exclude group: "com.android.support", module: "drawerlayout"
// exclude group: "com.android.support", module: "viewpager"
// exclude group: "com.android.support", module: "collections"
// exclude group: "com.android.support", module: "loader"
// exclude group: "com.android.support", module: "localbroadcastmanager"
// exclude group: "com.android.support", module: "support-fragment"
// exclude group: "com.android.support", module: "support-core-ui"
// }
// }
}
def releaseTime() {
return new SimpleDateFormat("yyyyMMddHHmm").format(new Date())
}
repositories {
maven {
url 'https://maven.aliyun.com/repository/google/'
// url 'https://maven.google.com/'
// name 'Google'
}
maven {
url 'https://maven.aliyun.com/repository/jcenter/'
}
}