123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- plugins {
- id "com.android.application"
- id "kotlin-android"
- id "dev.flutter.flutter-gradle-plugin"
- }
- def localProperties = new Properties()
- def localPropertiesFile = rootProject.file('local.properties')
- if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
- localProperties.load(reader)
- }
- }
- def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
- if (flutterVersionCode == null) {
- flutterVersionCode = '1'
- }
- def flutterVersionName = localProperties.getProperty('flutter.versionName')
- if (flutterVersionName == null) {
- flutterVersionName = '1.0'
- }
- android {
- namespace "com.szls.lszlgl"
- compileSdkVersion flutter.compileSdkVersion
- ndkVersion flutter.ndkVersion
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
- defaultConfig {
- applicationId "com.szls.lszlgl"
-
-
- minSdkVersion 21
- targetSdkVersion flutter.targetSdkVersion
- versionCode flutterVersionCode.toInteger()
- versionName flutterVersionName
- }
- println "targetSdkVersion: ${flutter.targetSdkVersion}"
-
- signingConfigs {
- release {
- v1SigningEnabled true
- v2SigningEnabled true
- storeFile file(KEY_PATH)
- storePassword KEY_PWD
- keyAlias = ALIAS_NAME
- keyPassword ALIAS_PWD
- }
- }
- buildTypes {
- release {
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- signingConfig signingConfigs.release
- shrinkResources false
- minifyEnabled false
- }
- profile {
- signingConfig signingConfigs.release
- shrinkResources false
- minifyEnabled false
- }
- debug {
- signingConfig signingConfigs.release
- }
- }
- android.applicationVariants.all {
- def buildType = it.buildType.name
- def flavor = it.productFlavors[0].name
- def outputFile
- it.outputs.each {
- outputFile = it.outputFile
-
-
- it.outputFileName = "lszlgl_${flavor}_${defaultConfig.versionName}_${defaultConfig.versionCode}.apk"
- }
- }
-
- flavorDimensions "default"
- productFlavors {
- develop {
-
- dimension "default"
- manifestPlaceholders = [
- APP_NAME : "国粮质检-测试",
-
- JPUSH_PKGNAME: "com.szls.lszlgl.debug",
- JPUSH_APPKEY : "2f42e3db4d0083b0bc5a3f6c",
- JPUSH_CHANNEL: "developer-default"
- ]
- applicationIdSuffix ".debug"
- }
- product {
-
- dimension "default"
- manifestPlaceholders = [
- APP_NAME : "国粮质检",
-
- JPUSH_PKGNAME: "com.szls.lszlgl",
- JPUSH_APPKEY : "336425aac947172a06b70cbb",
- JPUSH_CHANNEL: "developer-default"
- ]
- }
- }
- lintOptions {
- checkReleaseBuilds false
- abortOnError false
- }
- dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation 'com.amap.api:location:5.6.0'
-
- implementation files('libs/3.2.2-release.aar')
-
- implementation files('libs/LPAPI-2019-11-20-R.jar')
- implementation files('libs/image-1.8.4.6.aar')
-
- implementation files('libs/LabelPrinterJavaSDK.jar')
-
- implementation 'com.guolindev.permissionx:permissionx:1.7.1'
- }
- }
- flutter {
- source '../..'
- }
|