diff --git a/app/build.gradle b/app/build.gradle index 7f27820..782c654 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,8 +1,3 @@ -//plugins { -// id 'com.android.application' -// id 'org.jetbrains.kotlin.android' -//} - plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.android) @@ -48,7 +43,6 @@ android { abortOnError false } minifyEnabled false //开启代码混淆,防止反编译查看源代码 - zipAlignEnabled true // 对齐zip debuggable false // 是否debug proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' //修改生成的apk名字 @@ -89,35 +83,23 @@ dependencies { - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0' - implementation 'com.squareup.retrofit2:retrofit:2.9.0' - implementation 'com.squareup.retrofit2:converter-gson:2.9.0' - //implementation 'org.litepal.android:core:1.5.1'//源代码下载整合本项目到模块 第三方数据库封装,巡检,点检用到 - implementation 'com.github.huangyanbin:SmartTable:2.2.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'de.hdodenhof:circleimageview:3.1.0' - implementation 'com.github.wanglu1209:PhotoViewer:0.50' - implementation 'io.github.azhon:appupdate:4.2.6' - implementation 'com.tencent.bugly:crashreport:3.2.1' - implementation 'com.github.xuexiangjys:XUI:1.1.4' - implementation 'org.greenrobot:eventbus:3.0.0' - //implementation 'com.zhihu.android:matisse:0.5.3-beta3'//源代码下载整合本项目到模块 图片展示模块 + implementation libs.logging.interceptor + implementation libs.retrofit + implementation libs.com.squareup.retrofit2.converter.gson5 + implementation libs.smarttable + implementation libs.androidx.recyclerview + implementation libs.circleimageview + implementation libs.photoviewer + implementation libs.appupdate + implementation libs.crashreport + implementation libs.xui + implementation libs.eventbus //第三方浏览器 - implementation 'io.github.justson:agentweb-core:v5.1.1-androidx' - //implementation 'com.lcodecorex:tkrefreshlayout:1.0.7'//源代码下载整合本项目到模块 下拉刷新、下拉刷新模块 - - - implementation 'androidx.multidex:multidex:2.0.1' - + implementation libs.agentweb.core + implementation libs.androidx.multidex -// implementation 'androidx.core:core-ktx:1.9.0' -// implementation 'androidx.appcompat:appcompat:1.6.1' -// implementation 'com.google.android.material:material:1.8.0' -// implementation 'androidx.constraintlayout:constraintlayout:2.1.4' -// implementation 'androidx.activity:activity:1.8.0' - - //加载内部其它模块 + //加载项目内部其它模块 //视频压缩 implementation project(':videocompressor') //网络请求模块 @@ -134,60 +116,41 @@ dependencies { //深信服零信任SDK implementation files('libs/SangforSDK.aar') - implementation 'de.hdodenhof:circleimageview:3.1.0' + implementation libs.circleimageview //腾讯APP崩溃分析 - implementation 'com.tencent.bugly:crashreport:3.2.1' + implementation libs.crashreport //第三方库图片选择器 // PictureSelector basic (Necessary) - implementation 'io.github.lucksiege:pictureselector:v3.10.7' + implementation libs.pictureselector // image compress library (Not necessary) - implementation 'io.github.lucksiege:compress:v3.10.7' + implementation libs.compress // uCrop library (Not necessary) - implementation 'io.github.lucksiege:ucrop:v3.10.7' + implementation libs.ucrop // simple camerax library (Not necessary) - implementation 'io.github.lucksiege:camerax:v3.10.7' + implementation libs.camerax //第三方库图片异步加载 - implementation 'com.github.bumptech.glide:glide:4.11.0' - implementation 'androidx.annotation:annotation:1.6.0' - implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1' - - annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' + implementation libs.glide + implementation libs.annotation + implementation libs.androidx.lifecycle.livedata.ktx + implementation libs.androidx.lifecycle.viewmodel.ktx + annotationProcessor libs.compiler //第三方工具类 - implementation 'cn.hutool:hutool-all:5.8.5' - //implementation 'cn.hutool:hutool-crypto:5.7.16' - implementation 'org.bouncycastle:bcprov-jdk15on:1.65' + implementation libs.cn.hutool.all + implementation libs.bcprov.jdk15on //mqtt - implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.4' - implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1' - implementation 'org.bouncycastle:bcpkix-jdk15on:1.56' - implementation 'commons-codec:commons-codec:1.15' + implementation libs.paho.org.eclipse.paho.client.mqttv3 + implementation libs.paho.org.eclipse.paho.android.service + implementation libs.bcpkix.jdk15on + implementation libs.commons.codec.commons.codec4 //本地广播 - implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' + implementation libs.androidx.localbroadcastmanager.localbroadcastmanager //人脸识别 - implementation 'com.google.mlkit:face-detection:16.1.6' - //摄像头 CameraX core library using the camera2 implementation - def camerax_version = "1.4.0-alpha04" - // The following line is optional, as the core library is included indirectly by camera-camera2 - implementation "androidx.camera:camera-core:${camerax_version}" - implementation "androidx.camera:camera-camera2:${camerax_version}" - // If you want to additionally use the CameraX Lifecycle library - implementation "androidx.camera:camera-lifecycle:${camerax_version}" - // If you want to additionally use the CameraX VideoCapture library - implementation "androidx.camera:camera-video:${camerax_version}" - // If you want to additionally use the CameraX View class - implementation "androidx.camera:camera-view:${camerax_version}" - // If you want to additionally add CameraX ML Kit Vision Integration - implementation "androidx.camera:camera-mlkit-vision:${camerax_version}" - // If you want to additionally use the CameraX Extensions library - implementation "androidx.camera:camera-extensions:${camerax_version}" - + implementation libs.com.google.mlkit.face.detection2 + //二维码扫描 + implementation libs.barcode.scanning -// testImplementation 'junit:junit:4.13.2' -// androidTestImplementation 'androidx.test.ext:junit:1.1.5' -// androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' configurations { all*.exclude group: 'com.google.code.gson' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e9725d7..01ca0a6 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -78,6 +78,7 @@ tools:replace="android:allowBackup" tools:targetApi="s"> + + , Int, Int) -> Unit) : + ImageAnalysis.Analyzer { + //配置当前扫码格式 + private val options = BarcodeScannerOptions.Builder() + .setBarcodeFormats( + Barcode.FORMAT_QR_CODE, + Barcode.FORMAT_AZTEC + ).build() + + //获取解析器 + private val detector = BarcodeScanning.getClient(options) + + @SuppressLint("UnsafeExperimentalUsageError", "UnsafeOptInUsageError") + override fun analyze(imageProxy: ImageProxy) { + val mediaImage = imageProxy.image ?: kotlin.run { + imageProxy.close() + return + } + val image = InputImage.fromMediaImage(mediaImage, imageProxy.imageInfo.rotationDegrees) + detector.process(image) + .addOnSuccessListener { barCodes -> + Log.i("app", "barCodes: ${barCodes.size}") + if (barCodes.size > 0) { + listener.invoke(barCodes, imageProxy.width, imageProxy.height) + //接收到结果后,就关闭解析 + detector.close() + } + } + .addOnFailureListener { Log.i("app", "Error: ${it.message}") } + .addOnCompleteListener { imageProxy.close() } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/rehome/dywoa/ui/activity/KksSearchActivity.kt b/app/src/main/java/com/rehome/dywoa/ui/activity/KksSearchActivity.kt index 7bd9070..3c27548 100644 --- a/app/src/main/java/com/rehome/dywoa/ui/activity/KksSearchActivity.kt +++ b/app/src/main/java/com/rehome/dywoa/ui/activity/KksSearchActivity.kt @@ -27,15 +27,9 @@ import java.util.Calendar class KksSearchActivity : BaseActivityOaToolbarViewBinding() { - private val QRCODE_SCAN_CAMERA_REQUEST_CODE = 4 //扫描二維码请求摄像头权限 private var qrCodeStrSearch: String? = null - private val permission = arrayOf( - Manifest.permission.CAMERA, - Manifest.permission.WRITE_EXTERNAL_STORAGE - ) - private lateinit var launcherResultQRCode: ActivityResultLauncher override fun getViewBinding() = ActivityKksSearchBinding.inflate(layoutInflater) @@ -79,56 +73,17 @@ class KksSearchActivity : BaseActivityOaToolbarViewBinding, - grantResults: IntArray - ) { - super.onRequestPermissionsResult(requestCode, permissions, grantResults) - //扫描二维码 - if (QRCODE_SCAN_CAMERA_REQUEST_CODE == requestCode) { - if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) { - val intent = Intent(this, MipcaActivityCapture::class.java) - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP) - launcherResultQRCode.launch(intent) - } else { - //权限拒绝 - Toast.makeText( - this, - "权限拒绝,无法打开摄像头,请手动设置开启APP访问摄像头权限", - Toast.LENGTH_SHORT - ).show() - } - } + private fun intentTOQRCode() { + val intentMHJ = Intent(this, QrCodeActivity::class.java) + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP) + launcherResultQRCode.launch(intentMHJ) } /** * 跳转到扫码界面扫码 */ private fun goScan() { - //检查是否有相机权限 - if (ContextCompat.checkSelfPermission( - this, - Manifest.permission.CAMERA - ) == PackageManager.PERMISSION_GRANTED - ) { - val intent = Intent(this, MipcaActivityCapture::class.java) - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP) - launcherResultQRCode.launch(intent) - } else { - ActivityCompat.requestPermissions( - this, - permission, - QRCODE_SCAN_CAMERA_REQUEST_CODE - ) - } + intentTOQRCode(); } //创建一个ActivityResultLauncher @@ -139,7 +94,7 @@ class KksSearchActivity : BaseActivityOaToolbarViewBinding() { + + private lateinit var lifecycleCameraController: LifecycleCameraController + private lateinit var cameraExecutor: ExecutorService + private val CAMERA_REQUEST_CAMERA_SCAN: Int = 88 //请求码 + +// override fun onCreate(savedInstanceState: Bundle?) { +// super.onCreate(savedInstanceState) +// binding = ActivityQrCodeBinding.inflate(layoutInflater) +// setContentView(binding.root) +// initController() +// } + + override fun getViewBinding() = ActivityQrCodeBinding.inflate(layoutInflater) + + override fun getToolbar()= binding.toolbarView.toolbar + + override fun initView() { + initToolbar("二维码/条码扫描") + setLeftOnClickListener { finish() } + checkPermission() + //initController() + } + + override fun initData() { + + } + + private fun checkPermission(){ + //检测摄像头权限 + if (!context.packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY)) { + binding.frCamera.visibility=View.GONE + Toast.makeText( + context, + "权限拒绝,请手动设置开启APP访问摄像头权限", + Toast.LENGTH_LONG + ).show() + return + } + + //动态权限申请 + if (ContextCompat.checkSelfPermission( + context, + Manifest.permission.CAMERA + ) != PackageManager.PERMISSION_GRANTED + ) { + binding.frCamera.visibility=View.GONE + //权限请求 + ActivityCompat.requestPermissions( + this, + arrayOf(Manifest.permission.CAMERA), + CAMERA_REQUEST_CAMERA_SCAN + ) + } else { + //已授权,打开摄像头扫描 + initController() + } + } + + override fun onRequestPermissionsResult( + requestCode: Int, + permissions: Array, + grantResults: IntArray + ) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults) + if (CAMERA_REQUEST_CAMERA_SCAN == requestCode) { + if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + binding.frCamera.visibility=View.VISIBLE + //已授权,打开摄像头扫描 + initController() + } else { + binding.frCamera.visibility=View.GONE + //权限拒绝 + Toast.makeText( + this, + "权限拒绝,请手动设置开启APP访问摄像头权限", + Toast.LENGTH_SHORT + ).show() + } + } + } + + @SuppressLint("ClickableViewAccessibility", "UnsafeOptInUsageError") + private fun initController() { + cameraExecutor = Executors.newSingleThreadExecutor() + lifecycleCameraController = LifecycleCameraController(this) + lifecycleCameraController.bindToLifecycle(this) + lifecycleCameraController.imageCaptureFlashMode = ImageCapture.FLASH_MODE_AUTO + lifecycleCameraController.setImageAnalysisAnalyzer( + cameraExecutor, + QRCodeAnalyser { barcodes, imageWidth, imageHeight -> + if (barcodes.isEmpty()) { + return@QRCodeAnalyser + } + initScale(imageWidth, imageHeight) + val list = ArrayList() + val strList = ArrayList() + + barcodes.forEach { barcode -> + barcode.boundingBox?.let { rect -> + val translateRect = translateRect(rect) + list.add(translateRect) +// Log.e( +// "ztzt", "left:${translateRect.left} +" + +// " top:${translateRect.top} + right:${translateRect.right}" + +// " + bottom:${translateRect.bottom}" +// ) +// Log.e("ztzt", "barcode.rawValue:${barcode.rawValue}") + strList.add(barcode.rawValue ?: "No Value") + } + } + judgeIntent(strList) + binding.scanView.setRectList(list) + + }) + binding.previewView.controller = lifecycleCameraController + } + + private fun judgeIntent(list: ArrayList) { + val sb = StringBuilder() + list.forEach { + sb.append(it) + //sb.append("\n") + } + intentToResult(sb.toString()) + } + + private fun intentToResult(result: String) { + val resultIntent = Intent() + val bundle = Bundle() + bundle.putString("code", result) + resultIntent.putExtras(bundle) + setResult(RESULT_OK, resultIntent) + finish(); + } + + private var scaleX = 0f + private var scaleY = 0f + + private fun translateX(x: Float): Float = x * scaleX + private fun translateY(y: Float): Float = y * scaleY + + //将扫描的矩形换算为当前屏幕大小 + private fun translateRect(rect: Rect) = RectF( + translateX(rect.left.toFloat()), + translateY(rect.top.toFloat()), + translateX(rect.right.toFloat()), + translateY(rect.bottom.toFloat()) + ) + + //初始化缩放比例 + private fun initScale(imageWidth: Int, imageHeight: Int) { + //Log.e("ztzt", "imageWidth:${imageWidth} + imageHeight:${imageHeight}") + scaleY = binding.scanView.height.toFloat() / imageWidth.toFloat() + scaleX = binding.scanView.width.toFloat() / imageHeight.toFloat() + //Log.e("ztzt", "scaleX:${scaleX} + scaleY:${scaleY}") + } +} \ No newline at end of file diff --git a/app/src/main/java/com/rehome/dywoa/weiget/ScanView.kt b/app/src/main/java/com/rehome/dywoa/weiget/ScanView.kt new file mode 100644 index 0000000..444074a --- /dev/null +++ b/app/src/main/java/com/rehome/dywoa/weiget/ScanView.kt @@ -0,0 +1,89 @@ +package com.rehome.dywoa.weiget + + +import android.animation.ObjectAnimator +import android.content.Context +import android.graphics.* +import android.util.AttributeSet +import android.view.View +import androidx.core.content.ContextCompat +import com.rehome.dywoa.R + +/** + * Author:HuangWenfei + * description: 二维码扫描 + * date:2025/02/13 + */ +class ScanView(context: Context, attrs: AttributeSet) : View(context, attrs) { + private val circlePaint = Paint() //二维码圆圈画笔 + private var rectList: ArrayList? = null //二维码数组 + private var scanLine: Bitmap//横线 + private var isShowLine = true//是否显示扫描线 + private var animator: ObjectAnimator? = null + private var floatYFraction = 0f + set(value) { + field = value + invalidate() + } + + init { + circlePaint.apply { + this.style = Paint.Style.FILL + this.color = ContextCompat.getColor( + context, android.R.color.holo_green_dark + ) + } + + scanLine = BitmapFactory.decodeResource(resources, R.drawable.scan_light) + getAnimator().start() + } + + override fun onDraw(canvas: Canvas) { + super.onDraw(canvas) + parseResult(canvas) + if (isShowLine) { + canvas.drawBitmap(scanLine, (width - scanLine.width) / 2f, height * floatYFraction, circlePaint) + } + } + + private fun getAnimator(): ObjectAnimator { + if (animator == null) { + animator = ObjectAnimator.ofFloat( + this, + "floatYFraction", + 0f, + 1f + ) + animator?.duration = 3000 + animator?.repeatCount = -1 //-1代表无限循环 + } + return animator!! + } + + private fun parseResult(canvas: Canvas?) { + rectList?.let { list -> + if (list.isEmpty()) { + return + } + list.forEach { + canvas?.drawCircle( + it.left + (it.right - it.left) / 2f, + it.top + (it.bottom - it.top) / 2f, + 50f, + circlePaint + ) + } + } + } + + fun setRectList(list: ArrayList?) { + rectList = list + rectList?.let { + if (it.isNotEmpty()) { + isShowLine = false + getAnimator().cancel() + invalidate() + } + } + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable-xhdpi/scan_light.png b/app/src/main/res/drawable-xhdpi/scan_light.png new file mode 100644 index 0000000..1acef0b Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/scan_light.png differ diff --git a/app/src/main/res/drawable/scan_bg.xml b/app/src/main/res/drawable/scan_bg.xml new file mode 100644 index 0000000..fdbe3e1 --- /dev/null +++ b/app/src/main/res/drawable/scan_bg.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_qr_code.xml b/app/src/main/res/layout/activity_qr_code.xml new file mode 100644 index 0000000..471ed55 --- /dev/null +++ b/app/src/main/res/layout/activity_qr_code.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7022beb..c3d1dd9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -102,4 +102,7 @@ 密码长度不能小于8位,且必须为大小写字母、数字和特殊字符组成! 输入验证码(必填) 发送验证码 + 将二维码/条码放入框内即可扫描 + 签到 + 请扫描二维码进行签到 \ No newline at end of file diff --git a/autolayout/build.gradle b/autolayout/build.gradle index c77c962..0ebad9f 100644 --- a/autolayout/build.gradle +++ b/autolayout/build.gradle @@ -11,5 +11,5 @@ android { } dependencies { - implementation libs.androidx.appcompat.v170 + implementation libs.androidx.appcompat } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4ffe11f..183fc6d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,36 +1,86 @@ [versions] +agentwebCore = "v5.1.1-androidx" agp = "8.8.0" -androidxAppcompatVersion = "1.1.0" -annotationVersion = "1.8.2" -appcompatVersion = "1.7.0" +androidxLocalbroadcastmanager = "1.1.0" +annotationVersion = "1.9.1" +appupdate = "4.2.6" +bcpkixJdk15on = "1.67" +circleimageview = "3.1.0" +commonsCodecCommonsCodec2 = "1.15" +crashreport = "4.1.9.3" +eventbus = "3.3.1" glide = "4.11.0" +hutoolAllVersion = "5.8.5" kotlin = "1.9.24" -coreKtx = "1.10.1" +coreKtx = "1.15.0" junit = "4.13.2" -junitVersion = "1.1.5" -espressoCore = "3.5.1" -appcompat = "1.6.1" -material = "1.10.0" -activity = "1.8.0" -constraintlayout = "2.1.4" -recyclerview = "1.3.0" +junitVersion = "1.2.1" +espressoCore = "3.6.1" +appcompat = "1.7.0" +library = "1.0.4" +lifecycleLivedataKtx = "2.6.2" +lifecycleViewmodelKtx = "2.6.2" +loggingInterceptor = "4.9.0" +material = "1.12.0" +activity = "1.10.0" +constraintlayout = "2.2.0" +multidex = "2.0.1" +orgEclipsePahoClientMqttv3Version = "1.2.4" +orgEclipsePahoAndroidServiceVersion = "1.1.1" +photoviewer = "0.50" +pictureselector = "v3.10.7" +recyclerview = "1.4.0" +retrofit = "2.9.0" +smarttable = "2.2.0" squareupPicasso = "2.5.2" +barcodeScanning = "16.1.1" +supportV4 = "28.0.0" +xui = "1.2.1" [libraries] -androidx-appcompat-v170 = { module = "androidx.appcompat:appcompat", version.ref = "appcompatVersion" } +agentweb-core = { module = "io.github.justson:agentweb-core", version.ref = "agentwebCore" } androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } +androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" } +androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" } +androidx-localbroadcastmanager-localbroadcastmanager = { module = "androidx.localbroadcastmanager:localbroadcastmanager", version.ref = "androidxLocalbroadcastmanager" } +androidx-multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" } androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" } annotation = { module = "androidx.annotation:annotation", version.ref = "annotationVersion" } -appcompat-v110 = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppcompatVersion" } +appupdate = { module = "io.github.azhon:appupdate", version.ref = "appupdate" } +bcpkix-jdk15on = { module = "org.bouncycastle:bcpkix-jdk15on", version.ref = "bcpkixJdk15on" } +bcprov-jdk15on = { module = "org.bouncycastle:bcprov-jdk15on", version.ref = "bcpkixJdk15on" } +camerax = { module = "io.github.lucksiege:camerax", version.ref = "pictureselector" } +circleimageview = { module = "de.hdodenhof:circleimageview", version.ref = "circleimageview" } +cn-hutool-all = { module = "cn.hutool:hutool-all", version.ref = "hutoolAllVersion" } +com-google-mlkit-face-detection2 = { module = "com.google.mlkit:face-detection", version.ref = "barcodeScanning" } com-squareup-picasso-picasso = { module = "com.squareup.picasso:picasso", version.ref = "squareupPicasso" } +com-squareup-retrofit2-converter-gson5 = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" } +commons-codec-commons-codec4 = { module = "commons-codec:commons-codec", version.ref = "commonsCodecCommonsCodec2" } +compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" } +compress = { module = "io.github.lucksiege:compress", version.ref = "pictureselector" } +crashreport = { module = "com.tencent.bugly:crashreport", version.ref = "crashreport" } +eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbus" } glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } +library = { module = "it.sephiroth.android.library.imagezoom:library", version.ref = "library" } +logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" } material = { group = "com.google.android.material", name = "material", version.ref = "material" } androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" } androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } +barcode-scanning = { module = "com.google.mlkit:barcode-scanning", version.ref = "barcodeScanning" } +paho-org-eclipse-paho-android-service = { module = "org.eclipse.paho:org.eclipse.paho.android.service", version.ref = "orgEclipsePahoAndroidServiceVersion" } +paho-org-eclipse-paho-client-mqttv3 = { module = "org.eclipse.paho:org.eclipse.paho.client.mqttv3", version.ref = "orgEclipsePahoClientMqttv3Version" } +photoviewer = { module = "com.github.wanglu1209:PhotoViewer", version.ref = "photoviewer" } +pictureselector = { module = "io.github.lucksiege:pictureselector", version.ref = "pictureselector" } +recyclerview-v7 = { module = "com.android.support:recyclerview-v7", version.ref = "supportV4" } +smarttable = { module = "com.github.huangyanbin:SmartTable", version.ref = "smarttable" } +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } +support-v4 = { module = "com.android.support:support-v4", version.ref = "supportV4" } +ucrop = { module = "io.github.lucksiege:ucrop", version.ref = "pictureselector" } +xui = { module = "com.github.xuexiangjys:XUI", version.ref = "xui" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" } diff --git a/matisse/build.gradle b/matisse/build.gradle index b732aaf..f2add3b 100644 --- a/matisse/build.gradle +++ b/matisse/build.gradle @@ -12,11 +12,10 @@ android { } dependencies { - implementation libs.appcompat.v110 + implementation libs.androidx.appcompat implementation libs.annotation implementation libs.androidx.recyclerview - //noinspection UseTomlInstead - implementation 'it.sephiroth.android.library.imagezoom:library:1.0.4' + implementation libs.library compileOnly libs.glide compileOnly libs.com.squareup.picasso.picasso } \ No newline at end of file diff --git a/tkrefreshlayout/build.gradle b/tkrefreshlayout/build.gradle index 6000299..e456e7d 100644 --- a/tkrefreshlayout/build.gradle +++ b/tkrefreshlayout/build.gradle @@ -11,6 +11,6 @@ android { } dependencies { - implementation 'com.android.support:support-v4:28.0.0' - implementation 'com.android.support:recyclerview-v7:28.0.0' + implementation libs.support.v4 + implementation libs.recyclerview.v7 } \ No newline at end of file