build.gradle 3.26 KB
apply plugin: 'com.android.application'

android {
    compileSdkVersion 35
    buildToolsVersion '35.0.0'
    namespace 'com.diligrp.tms.kdy'
    defaultConfig {
        applicationId "com.diligrp.tms.kdy"
        minSdkVersion 21
        targetSdkVersion 33
        versionCode 205
        versionName "1.0.0"
        multiDexEnabled true
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
        ndk {
            abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'
        }
    }
    signingConfigs {
        config {
//            keyAlias 'stevedoring'
//            keyPassword 'stevedoring8888'
//            storeFile file('stevedoring.jks')
//            storePassword 'stevedoring8888'
            keyAlias 'diliandroidcertificate'
            keyPassword getLocalProperty('key.password')
            storeFile file('posandroid.keystore')
            storePassword getLocalProperty('keystore.password')
            v1SigningEnabled true
            v2SigningEnabled true
        }
    }

    buildTypes {
        debug {
            signingConfig signingConfigs.config
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        release {
            signingConfig signingConfigs.config
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    //使用uniapp时,需复制下面代码
    /*代码开始*/
    aaptOptions {
        additionalParameters '--auto-add-overlay'
        //noCompress 'foo', 'bar'
        ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
    }
    /*代码结束*/
}

def getLocalProperty(String key) {
    Properties props = new Properties()
    if (file("../local.properties").canRead()) {
        props.load(file("../local.properties").newDataInputStream())
        return props.getProperty(key)
    } else {
        throw new GradleException("local.properties not found!")
    }
}

repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    implementation fileTree(include: ['*.aar', '*.jar'], dir: 'libs')
    implementation fileTree(include: ['androidprintsdk.jar'], dir: 'libs')

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
    implementation 'androidx.core:core:1.1.0'
    implementation "androidx.fragment:fragment:1.1.0"
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'com.facebook.fresco:fresco:2.5.0'
    implementation "com.facebook.fresco:animated-gif:2.5.0"
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    implementation 'com.alibaba:fastjson:1.2.83'
    implementation 'androidx.webkit:webkit:1.5.0'
    implementation 'com.squareup.okhttp3:okhttp:3.12.12'
    implementation 'com.squareup.okio:okio:1.15.0'
    implementation "com.amap.api:3dmap-location-search:10.0.700_loc6.4.5_sea9.7.2"
//    implementation "net.lingala.zip4j:zip4j:2.11.5"
    // 添加uni-app插件
    implementation project(':uniplugin_jpush')
//    implementation project(':serialport')
//    implementation project(':usbPrinter')
}