| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- buildscript {
- repositories {
- maven { url 'https://maven.aliyun.com/repository/google' }
- maven { url 'https://maven.aliyun.com/repository/central' }
- google()
- mavenCentral()
- }
- dependencies {
- classpath "com.android.tools.build:gradle:${androidGradleToolsVersion}"
- //implementation 'com.github.jiangdongguo.AndroidUSBCamera:libausbc:latest_tag'
- //classpath "com.android.tools.build:gradle:7.4.2"
- }
- }
- /*Maven 是一个流行的构建工具和依赖管理工具,用于 Java 项目的构建、依赖管理和项目管理。
- 它提供了一个标准化的项目结构、构建生命周期和丰富的插件生态系统*/
- allprojects {
- repositories {
- maven { url 'https://maven.aliyun.com/repository/google' }
- maven { url 'https://maven.aliyun.com/repository/central' }
- maven { url 'https://jitpack.io' }
- google()
- mavenCentral()
- jcenter() // Warning: this repository is going to shut down soon
- //maven { url 'https://install.felgo.com/maven/' }
- }
- }
- apply plugin: 'com.android.application'
- dependencies {
- implementation 'androidx.appcompat:appcompat:1.4.1'
- implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'com.google.android.material:material:1.4.0'
- implementation 'com.github.getActivity:XXPermissions:13.5' //权限申请框架
- implementation 'com.github.warkiz.widget:indicatorseekbar:2.1.2'
- implementation 'com.herohan:UVCAndroid:1.0.5'
- // implementation 'com.felgo.plugins:plugin-notification:4.+'
- implementation files('libs/watchdogdev.jar') //看门狗
- //implementation files('libs/UVCAndroid-1.0.5.arr') //https://github.com/shiyinghan/UVCAndroid
- //implementation files('libs/hutool-core-5.6.3.jar') //https://gitee.com/dromara/hutool#%F0%9F%8F%97%EF%B8%8F%E6%B7%BB%E7%A0%96%E5%8A%A0%E7%93%A6
- // testImplementation 'junit:junit:4.13.2'
- // androidTestImplementation 'androidx.test.ext:junit:1.1.3'
- // androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
- //implementation files('libs/MvCameraControl.jar')
- }
- android {
- /*******************************************************
- * The following variables:
- * - androidBuildToolsVersion,
- * - androidCompileSdkVersion
- * - qt5AndroidDir - holds the path to qt android files
- * needed to build any Qt application
- * on Android.
- *
- * are defined in gradle.properties file. This file is
- * updated by QtCreator and androiddeployqt tools.
- * Changing them manually might break the compilation!
- *******************************************************/
- compileSdkVersion androidCompileSdkVersion.toInteger()
- buildToolsVersion androidBuildToolsVersion
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility 1.8
- targetCompatibility 1.8
- }
- defaultConfig {
- multiDexEnabled true
- targetSdkVersion androidCompileSdkVersion.toInteger()
- applicationId = productIdentifier
- versionCode = productVersionCode.toInteger()
- versionName = productVersionName
- minSdkVersion = project.hasProperty("qtMinSdkVersion") ? qtMinSdkVersion.toInteger() : 23
- ndk {
- abiFilters 'arm64-v8a'
- }
- }
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
- aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
- res.srcDirs = [qt5AndroidDir + '/res', 'res']
- resources.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- assets.srcDirs = ['assets']
- jniLibs.srcDirs = ['libs']
- }
- }
- lintOptions {
- //checkReleaseBuilds false
- abortOnError false
- }
- aaptOptions { // Do not compress Qt binary resources file
- noCompress 'rcc','tflite'
- }
- tasks.withType(JavaCompile) {
- options.incremental = true
- }
- packagingOptions {
- jniLibs {
- useLegacyPackaging = true
- }
- }
- }
|