Blame view

build.gradle 6.29 KB
5aabe1c0   黄灿宏   畅游通核销app: 1.增加扫码配置
1
2
  import java.text.SimpleDateFormat
  
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
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
  //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')
90601e4f   黄灿宏   标准版本 1.扩展设备10 增...
35
36
37
38
      implementation files('libs\\rskapi.jar')
      implementation files('libs\\zkandroidcore.jar')
      implementation files('libs\\zkandroididcardreader.jar')
      implementation files('libs\\iodev2.jar')
c05c7a9b   黄灿宏   标准版本 1.扩展设备8 2....
39
      implementation files('libs\\decoderapijni.jar')
72876d86   杜方   畅游通核销app: 1.增加550...
40
41
42
      implementation files('libs\\android-logging-log4j-1.0.3.jar')
      implementation files('libs\\log4j-1.2.17.jar')
      implementation files('libs\\zypos1.8.jar')
07670a44   黄灿宏   畅游通核销app: 1.增加日志上...
43
44
      implementation files('libs\\jsch-0.1.54.jar')
      implementation 'org.jetbrains:annotations-java5:15.0'
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
45
46
47
      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')
07670a44   黄灿宏   畅游通核销app: 1.增加日志上...
48
      implementation 'com.squareup.okhttp3:okhttp:3.6.0'
90601e4f   黄灿宏   标准版本 1.扩展设备10 增...
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
  //    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'
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
68
69
70
  }
  
  android {
90601e4f   黄灿宏   标准版本 1.扩展设备10 增...
71
      compileSdkVersion 21
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  
      buildTypes {
          release {
              //在这里添加:
              lintOptions {
                  checkReleaseBuilds false
                  abortOnError false
              }
              minifyEnabled false
              shrinkResources false//去掉不用资源
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
5aabe1c0   黄灿宏   畅游通核销app: 1.增加扫码配置
86
87
88
89
90
91
92
93
94
      //在apk文件后边生成版本号信息
      android.applicationVariants.all {
          variant ->
              variant.outputs.all {
                  //在这里修改apk文件名 Selfserviceticketingandroid_V1.0.5_202006220953
                  outputFileName = "CYTAndroid_V${variant.versionName}_${releaseTime()}.apk"
              }
      }
  
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
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
      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 {
90601e4f   黄灿宏   标准版本 1.扩展设备10 增...
120
          minSdkVersion 14
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
121
          targetSdkVersion 21
90601e4f   黄灿宏   标准版本 1.扩展设备10 增...
122
          vectorDrawables.useSupportLibrary =true
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
123
  
90601e4f   黄灿宏   标准版本 1.扩展设备10 增...
124
          ndk {
8094643a   黄灿宏   畅游通核销app: 1.适配之前机...
125
              abiFilters "armeabi", "armeabi-v7a"//可以适当补填其他
90601e4f   黄灿宏   标准版本 1.扩展设备10 增...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
  //            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"
  //        }
  //    }
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
145
146
  
  }
5aabe1c0   黄灿宏   畅游通核销app: 1.增加扫码配置
147
148
149
  def releaseTime() {
      return new SimpleDateFormat("yyyyMMddHHmm").format(new Date())
  }
96b488c3   杜方   畅游通核销app: 1.提交项目配置文件
150
151
152
153
154
155
156
157
158
159
160
  
  repositories {
      maven {
          url 'https://maven.aliyun.com/repository/google/'
  //        url 'https://maven.google.com/'
  //        name 'Google'
      }
      maven {
          url 'https://maven.aliyun.com/repository/jcenter/'
      }
  }