Newer
Older
OperationSite_Test / app / build.gradle
import java.text.SimpleDateFormat

plugins {
    id('com.android.application')
    id('org.jetbrains.kotlin.android')
}

android {
    namespace 'com.casic.br.operationsite.test'
    compileSdk 35

    defaultConfig {
        applicationId 'com.casic.br.operationsite.test'
        minSdk 26
        targetSdk 35
        versionCode 1080
        versionName '1.0.8.0'
    }

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

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    buildFeatures {
        buildConfig = true
        viewBinding = true
    }

    applicationVariants.configureEach {
        outputs.configureEach {
            outputFileName = 'XCGZ_YS_' + getBuildDate() + '_' + defaultConfig.versionName + '.apk'
        }
    }
}

static def getBuildDate() {
    SimpleDateFormat dateFormat = new SimpleDateFormat('yyyyMMdd', Locale.CHINA)
    return dateFormat.format(System.currentTimeMillis())
}

dependencies {
    //基础依赖库
    implementation 'com.github.AndroidCoderPeng:Kotlin-lite-lib:1.1.5'
    implementation 'androidx.core:core-ktx:1.13.1'
    implementation 'androidx.appcompat:appcompat:1.7.0'
    implementation 'com.google.android.material:material:1.12.0'
    //Google官方授权框架
    implementation 'pub.devrel:easypermissions:3.0.0'
    //沉浸式状态栏。基础依赖包,必须要依赖
    implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
    //Kotlin协程
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
    //MVVM+LiveData
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    //图片加载框架
    implementation 'com.github.bumptech.glide:glide:4.14.2'
    //图片选择框架
    implementation 'io.github.lucksiege:pictureselector:v3.11.1'
    //图片压缩
    implementation 'top.zibin:Luban:1.1.8'
    //返回值转换器
    implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
    implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
    //okhttp3日志拦截器
    implementation 'com.squareup.okhttp3:logging-interceptor:4.6.0'
    //网络请求和接口封装
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.okhttp3:okhttp:4.12.0'
    //官方Json解析库
    implementation 'com.google.code.gson:gson:2.10.1'
    //上拉加载下拉刷新
    implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'
    //CameraX
    implementation 'androidx.camera:camera-core:1.2.3'
    // CameraX Camera2 extensions
    implementation 'androidx.camera:camera-camera2:1.2.3'
    // CameraX Lifecycle library
    implementation 'androidx.camera:camera-lifecycle:1.2.3'
    // CameraX View class
    implementation 'androidx.camera:camera-view:1.2.3'
    //TCP
    implementation 'io.netty:netty-all:4.1.23.Final'
    //视频播放器,RTSP流
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-java:v10.1.0'
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-exo2:v10.1.0'
    implementation 'com.github.CarGuo.GSYVideoPlayer:gsyvideoplayer-ex_so:v10.1.0'
    //大图
    implementation 'com.github.chrisbanes:PhotoView:2.3.0'
}