From 5866df73308cc6bf52cdc8703c83a7d31dcbe165 Mon Sep 17 00:00:00 2001 From: guohongbin Date: Thu, 24 Jul 2025 10:35:48 +0800 Subject: [PATCH 01/13] fix build error --- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9436fb3a..9353cc3a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue May 04 22:45:29 CST 2021 +#Thu Jul 24 10:32:48 CST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip From 7d36df027b7d4f8a011217b4c12f910cca94d762 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 10:52:38 +0800 Subject: [PATCH 02/13] Update dependencies to latest versions --- app/build.gradle | 16 ++++++++-------- cameralibrary/build.gradle | 20 ++++++++++---------- facedetectlibrary/build.gradle | 8 ++++---- filterlibrary/build.gradle | 10 +++++----- gdxlibrary/build.gradle | 8 ++++---- imagelibrary/build.gradle | 12 ++++++------ landmarklibrary/build.gradle | 8 ++++---- medialibrary/build.gradle | 10 +++++----- pickerlibrary/build.gradle | 18 +++++++++--------- utilslibrary/build.gradle | 14 +++++++------- videolibrary/build.gradle | 14 +++++++------- widgetlibrary/build.gradle | 10 +++++----- 12 files changed, 74 insertions(+), 74 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 80069498..9441c5db 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -49,13 +49,13 @@ dependencies { implementation project(':medialibrary') implementation project(':utilslibrary') implementation project(':videolibrary') - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - implementation 'com.github.bumptech.glide:glide:4.11.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.recyclerview:recyclerview:1.4.0' + implementation 'com.google.android.material:material:1.12.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + implementation 'com.github.bumptech.glide:glide:4.16.0' // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/cameralibrary/build.gradle b/cameralibrary/build.gradle index 8d7db2e1..0bbc1e10 100644 --- a/cameralibrary/build.gradle +++ b/cameralibrary/build.gradle @@ -33,8 +33,8 @@ android { } } -def camerax_version = "1.0.0-rc03" -def lifecycle_version = '2.2.0' +def camerax_version = "1.4.2" +def lifecycle_version = '2.9.2' dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') @@ -50,11 +50,11 @@ dependencies { implementation project(':widgetlibrary') // AndroidX libraries - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.appcompat:appcompat:1.7.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - implementation 'com.google.android.material:material:1.2.1' + implementation 'androidx.recyclerview:recyclerview:1.4.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + implementation 'com.google.android.material:material:1.12.0' // Lifecycle and LiveData implementation "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" @@ -70,9 +70,9 @@ dependencies { implementation "androidx.camera:camera-lifecycle:$camerax_version" // Glide - implementation 'com.github.bumptech.glide:glide:4.11.0' + implementation 'com.github.bumptech.glide:glide:4.16.0' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/facedetectlibrary/build.gradle b/facedetectlibrary/build.gradle index 8e6327d2..20cb1fdc 100644 --- a/facedetectlibrary/build.gradle +++ b/facedetectlibrary/build.gradle @@ -39,10 +39,10 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation project(':landmarklibrary') implementation project(':utilslibrary') - implementation 'androidx.appcompat:appcompat:1.2.0' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' implementation(name: 'MGFaceppSDK-0.5.2', ext: 'aar') implementation(name: 'MGLicenseManagerSDK-0.3.1', ext: 'aar') } diff --git a/filterlibrary/build.gradle b/filterlibrary/build.gradle index a9d8e567..ce77ee58 100644 --- a/filterlibrary/build.gradle +++ b/filterlibrary/build.gradle @@ -50,10 +50,10 @@ dependencies { implementation project(':landmarklibrary') implementation project(':utilslibrary') implementation project(':gdxlibrary') - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.appcompat:appcompat:1.7.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.recyclerview:recyclerview:1.4.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/gdxlibrary/build.gradle b/gdxlibrary/build.gradle index ef91c2bf..0ee6fd66 100644 --- a/gdxlibrary/build.gradle +++ b/gdxlibrary/build.gradle @@ -48,8 +48,8 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.2.0' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/imagelibrary/build.gradle b/imagelibrary/build.gradle index 77e2b24d..3df2871c 100644 --- a/imagelibrary/build.gradle +++ b/imagelibrary/build.gradle @@ -31,11 +31,11 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':utilslibrary') implementation project(':filterlibrary') - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.appcompat:appcompat:1.7.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.recyclerview:recyclerview:1.4.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/landmarklibrary/build.gradle b/landmarklibrary/build.gradle index 2234502f..91e57dd1 100644 --- a/landmarklibrary/build.gradle +++ b/landmarklibrary/build.gradle @@ -30,8 +30,8 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.2.0' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/medialibrary/build.gradle b/medialibrary/build.gradle index c5563eab..7ccac7b6 100644 --- a/medialibrary/build.gradle +++ b/medialibrary/build.gradle @@ -64,9 +64,9 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':utilslibrary') implementation project(':filterlibrary') - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } \ No newline at end of file diff --git a/pickerlibrary/build.gradle b/pickerlibrary/build.gradle index 8b10a8ee..73159c97 100644 --- a/pickerlibrary/build.gradle +++ b/pickerlibrary/build.gradle @@ -30,14 +30,14 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':utilslibrary') - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'io.reactivex.rxjava2:rxjava:2.2.10' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'com.google.android.material:material:1.12.0' + implementation 'androidx.recyclerview:recyclerview:1.4.0' + implementation 'io.reactivex.rxjava2:rxjava:2.2.21' implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' - implementation 'com.github.bumptech.glide:glide:4.11.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'com.github.bumptech.glide:glide:4.16.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/utilslibrary/build.gradle b/utilslibrary/build.gradle index 1056ba0f..d525a386 100644 --- a/utilslibrary/build.gradle +++ b/utilslibrary/build.gradle @@ -32,11 +32,11 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'com.google.android.material:material:1.12.0' + implementation 'androidx.recyclerview:recyclerview:1.4.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/videolibrary/build.gradle b/videolibrary/build.gradle index d979dd56..2609fc3b 100644 --- a/videolibrary/build.gradle +++ b/videolibrary/build.gradle @@ -32,11 +32,11 @@ dependencies { implementation project(':filterlibrary') implementation project(':medialibrary') implementation project(':utilslibrary') - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.recyclerview:recyclerview:1.4.0' + implementation 'com.google.android.material:material:1.12.0' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/widgetlibrary/build.gradle b/widgetlibrary/build.gradle index 83b7ba27..5e7bcb37 100644 --- a/widgetlibrary/build.gradle +++ b/widgetlibrary/build.gradle @@ -30,9 +30,9 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.2.1' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'com.google.android.material:material:1.12.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } From dbc6d1f2e958b19eb413db9a0377fe40e6058c9b Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 11:04:38 +0800 Subject: [PATCH 03/13] Update Android build configuration --- app/build.gradle | 4 ++-- build.gradle | 2 +- cameralibrary/build.gradle | 4 ++-- facedetectlibrary/build.gradle | 4 ++-- filterlibrary/build.gradle | 4 ++-- gdxlibrary/build.gradle | 4 ++-- imagelibrary/build.gradle | 4 ++-- landmarklibrary/build.gradle | 4 ++-- medialibrary/build.gradle | 4 ++-- pickerlibrary/build.gradle | 4 ++-- utilslibrary/build.gradle | 4 ++-- videolibrary/build.gradle | 4 ++-- widgetlibrary/build.gradle | 4 ++-- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9441c5db..45b0c0b8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { applicationId "com.cgfay.caincamera" diff --git a/build.gradle b/build.gradle index aaa9a03d..c6ad14d8 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:8.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/cameralibrary/build.gradle b/cameralibrary/build.gradle index 0bbc1e10..980526db 100644 --- a/cameralibrary/build.gradle +++ b/cameralibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 21 diff --git a/facedetectlibrary/build.gradle b/facedetectlibrary/build.gradle index 20cb1fdc..0e3f0071 100644 --- a/facedetectlibrary/build.gradle +++ b/facedetectlibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 21 diff --git a/filterlibrary/build.gradle b/filterlibrary/build.gradle index ce77ee58..0a986422 100644 --- a/filterlibrary/build.gradle +++ b/filterlibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 21 diff --git a/gdxlibrary/build.gradle b/gdxlibrary/build.gradle index 0ee6fd66..092be433 100644 --- a/gdxlibrary/build.gradle +++ b/gdxlibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 21 diff --git a/imagelibrary/build.gradle b/imagelibrary/build.gradle index 3df2871c..1e93583b 100644 --- a/imagelibrary/build.gradle +++ b/imagelibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 21 diff --git a/landmarklibrary/build.gradle b/landmarklibrary/build.gradle index 91e57dd1..0b1db687 100644 --- a/landmarklibrary/build.gradle +++ b/landmarklibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { diff --git a/medialibrary/build.gradle b/medialibrary/build.gradle index 7ccac7b6..201aa94f 100644 --- a/medialibrary/build.gradle +++ b/medialibrary/build.gradle @@ -5,8 +5,8 @@ def platformVersion = 21 // 18: openGLES 3 min api level // def platformVersion = 12 //openGLES 2 min api level android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion "${platformVersion}" diff --git a/pickerlibrary/build.gradle b/pickerlibrary/build.gradle index 73159c97..0015000d 100644 --- a/pickerlibrary/build.gradle +++ b/pickerlibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 21 diff --git a/utilslibrary/build.gradle b/utilslibrary/build.gradle index d525a386..26b0b9ba 100644 --- a/utilslibrary/build.gradle +++ b/utilslibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { diff --git a/videolibrary/build.gradle b/videolibrary/build.gradle index 2609fc3b..5f3c358a 100644 --- a/videolibrary/build.gradle +++ b/videolibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 21 diff --git a/widgetlibrary/build.gradle b/widgetlibrary/build.gradle index 5e7bcb37..f284cf7a 100644 --- a/widgetlibrary/build.gradle +++ b/widgetlibrary/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 30 - buildToolsVersion '30.0.2' + compileSdkVersion 34 + buildToolsVersion '34.0.0' defaultConfig { minSdkVersion 21 From bd43a60ca591c6cba605fa5d86da025d9038950f Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 11:12:22 +0800 Subject: [PATCH 04/13] centralize library versions --- app/build.gradle | 24 ++++++++++++------------ build.gradle | 1 + cameralibrary/build.gradle | 30 +++++++++++++++--------------- facedetectlibrary/build.gradle | 16 ++++++++-------- filterlibrary/build.gradle | 20 ++++++++++---------- gdxlibrary/build.gradle | 16 ++++++++-------- imagelibrary/build.gradle | 22 +++++++++++----------- landmarklibrary/build.gradle | 16 ++++++++-------- medialibrary/build.gradle | 18 +++++++++--------- pickerlibrary/build.gradle | 28 ++++++++++++++-------------- utilslibrary/build.gradle | 24 ++++++++++++------------ versions.gradle | 21 +++++++++++++++++++++ videolibrary/build.gradle | 22 +++++++++++----------- widgetlibrary/build.gradle | 18 +++++++++--------- 14 files changed, 149 insertions(+), 127 deletions(-) create mode 100644 versions.gradle diff --git a/app/build.gradle b/app/build.gradle index 45b0c0b8..6f06f274 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { applicationId "com.cgfay.caincamera" - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 2 versionName "1.1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -49,13 +49,13 @@ dependencies { implementation project(':medialibrary') implementation project(':utilslibrary') implementation project(':videolibrary') - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'androidx.recyclerview:recyclerview:1.4.0' - implementation 'com.google.android.material:material:1.12.0' - implementation 'androidx.constraintlayout:constraintlayout:2.2.1' - implementation 'com.github.bumptech.glide:glide:4.16.0' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "androidx.recyclerview:recyclerview:${rootProject.ext.recyclerViewVersion}" + implementation "com.google.android.material:material:${rootProject.ext.materialVersion}" + implementation "androidx.constraintlayout:constraintlayout:${rootProject.ext.constraintLayoutVersion}" + implementation "com.github.bumptech.glide:glide:${rootProject.ext.glideVersion}" // debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/build.gradle b/build.gradle index c6ad14d8..ea4cd92c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,5 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. +apply from: "versions.gradle" buildscript { repositories { diff --git a/cameralibrary/build.gradle b/cameralibrary/build.gradle index 980526db..453e7139 100644 --- a/cameralibrary/build.gradle +++ b/cameralibrary/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -33,8 +33,8 @@ android { } } -def camerax_version = "1.4.2" -def lifecycle_version = '2.9.2' +def camerax_version = rootProject.ext.cameraXVersion +def lifecycle_version = rootProject.ext.lifecycleVersion dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') @@ -50,11 +50,11 @@ dependencies { implementation project(':widgetlibrary') // AndroidX libraries - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.4.0' - implementation 'androidx.constraintlayout:constraintlayout:2.2.1' - implementation 'com.google.android.material:material:1.12.0' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "androidx.legacy:legacy-support-v4:${rootProject.ext.legacySupportVersion}" + implementation "androidx.recyclerview:recyclerview:${rootProject.ext.recyclerViewVersion}" + implementation "androidx.constraintlayout:constraintlayout:${rootProject.ext.constraintLayoutVersion}" + implementation "com.google.android.material:material:${rootProject.ext.materialVersion}" // Lifecycle and LiveData implementation "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" @@ -70,9 +70,9 @@ dependencies { implementation "androidx.camera:camera-lifecycle:$camerax_version" // Glide - implementation 'com.github.bumptech.glide:glide:4.16.0' + implementation "com.github.bumptech.glide:glide:${rootProject.ext.glideVersion}" - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/facedetectlibrary/build.gradle b/facedetectlibrary/build.gradle index 0e3f0071..fe3f6e1d 100644 --- a/facedetectlibrary/build.gradle +++ b/facedetectlibrary/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -39,10 +39,10 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation project(':landmarklibrary') implementation project(':utilslibrary') - implementation 'androidx.appcompat:appcompat:1.7.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" implementation(name: 'MGFaceppSDK-0.5.2', ext: 'aar') implementation(name: 'MGLicenseManagerSDK-0.3.1', ext: 'aar') } diff --git a/filterlibrary/build.gradle b/filterlibrary/build.gradle index 0a986422..1f2d1080 100644 --- a/filterlibrary/build.gradle +++ b/filterlibrary/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -50,10 +50,10 @@ dependencies { implementation project(':landmarklibrary') implementation project(':utilslibrary') implementation project(':gdxlibrary') - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.4.0' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "androidx.legacy:legacy-support-v4:${rootProject.ext.legacySupportVersion}" + implementation "androidx.recyclerview:recyclerview:${rootProject.ext.recyclerViewVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/gdxlibrary/build.gradle b/gdxlibrary/build.gradle index 092be433..00f9f04b 100644 --- a/gdxlibrary/build.gradle +++ b/gdxlibrary/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -48,8 +48,8 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.7.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/imagelibrary/build.gradle b/imagelibrary/build.gradle index 1e93583b..10446b82 100644 --- a/imagelibrary/build.gradle +++ b/imagelibrary/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -31,11 +31,11 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':utilslibrary') implementation project(':filterlibrary') - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.4.0' - implementation 'androidx.constraintlayout:constraintlayout:2.2.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "androidx.legacy:legacy-support-v4:${rootProject.ext.legacySupportVersion}" + implementation "androidx.recyclerview:recyclerview:${rootProject.ext.recyclerViewVersion}" + implementation "androidx.constraintlayout:constraintlayout:${rootProject.ext.constraintLayoutVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/landmarklibrary/build.gradle b/landmarklibrary/build.gradle index 0b1db687..b65930df 100644 --- a/landmarklibrary/build.gradle +++ b/landmarklibrary/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -30,8 +30,8 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.7.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/medialibrary/build.gradle b/medialibrary/build.gradle index 201aa94f..c1e214ce 100644 --- a/medialibrary/build.gradle +++ b/medialibrary/build.gradle @@ -1,16 +1,16 @@ apply plugin: 'com.android.library' //def platformVersion = 24 // openGLES 3.2 min api level -def platformVersion = 21 // 18: openGLES 3 min api level +def platformVersion = rootProject.ext.minSdkVersion // 18: openGLES 3 min api level // def platformVersion = 12 //openGLES 2 min api level android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { minSdkVersion "${platformVersion}" - targetSdkVersion 30 + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -64,9 +64,9 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':utilslibrary') implementation project(':filterlibrary') - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'androidx.constraintlayout:constraintlayout:2.2.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "androidx.constraintlayout:constraintlayout:${rootProject.ext.constraintLayoutVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } \ No newline at end of file diff --git a/pickerlibrary/build.gradle b/pickerlibrary/build.gradle index 0015000d..5579d06a 100644 --- a/pickerlibrary/build.gradle +++ b/pickerlibrary/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -30,14 +30,14 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':utilslibrary') - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'com.google.android.material:material:1.12.0' - implementation 'androidx.recyclerview:recyclerview:1.4.0' - implementation 'io.reactivex.rxjava2:rxjava:2.2.21' - implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' - implementation 'com.github.bumptech.glide:glide:4.16.0' - implementation 'androidx.constraintlayout:constraintlayout:2.2.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "com.google.android.material:material:${rootProject.ext.materialVersion}" + implementation "androidx.recyclerview:recyclerview:${rootProject.ext.recyclerViewVersion}" + implementation "io.reactivex.rxjava2:rxjava:${rootProject.ext.rxJavaVersion}" + implementation "io.reactivex.rxjava2:rxandroid:${rootProject.ext.rxAndroidVersion}" + implementation "com.github.bumptech.glide:glide:${rootProject.ext.glideVersion}" + implementation "androidx.constraintlayout:constraintlayout:${rootProject.ext.constraintLayoutVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/utilslibrary/build.gradle b/utilslibrary/build.gradle index 26b0b9ba..6cadf7b8 100644 --- a/utilslibrary/build.gradle +++ b/utilslibrary/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -31,12 +31,12 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'com.google.android.material:material:1.12.0' - implementation 'androidx.recyclerview:recyclerview:1.4.0' - implementation 'androidx.constraintlayout:constraintlayout:2.2.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.legacy:legacy-support-v4:${rootProject.ext.legacySupportVersion}" + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "com.google.android.material:material:${rootProject.ext.materialVersion}" + implementation "androidx.recyclerview:recyclerview:${rootProject.ext.recyclerViewVersion}" + implementation "androidx.constraintlayout:constraintlayout:${rootProject.ext.constraintLayoutVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/versions.gradle b/versions.gradle new file mode 100644 index 00000000..aabd5c14 --- /dev/null +++ b/versions.gradle @@ -0,0 +1,21 @@ +ext { + compileSdkVersion = 34 + buildToolsVersion = '34.0.0' + minSdkVersion = 21 + targetSdkVersion = 30 + + appcompatVersion = '1.7.1' + recyclerViewVersion = '1.4.0' + materialVersion = '1.12.0' + constraintLayoutVersion = '2.2.1' + legacySupportVersion = '1.0.0' + glideVersion = '4.16.0' + junitVersion = '4.13.2' + androidXJunitVersion = '1.2.1' + espressoVersion = '3.6.1' + lifecycleVersion = '2.9.2' + cameraXVersion = '1.4.2' + rxJavaVersion = '2.2.21' + rxAndroidVersion = '2.1.1' +} + diff --git a/videolibrary/build.gradle b/videolibrary/build.gradle index 5f3c358a..6795cde1 100644 --- a/videolibrary/build.gradle +++ b/videolibrary/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -32,11 +32,11 @@ dependencies { implementation project(':filterlibrary') implementation project(':medialibrary') implementation project(':utilslibrary') - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'androidx.recyclerview:recyclerview:1.4.0' - implementation 'com.google.android.material:material:1.12.0' - implementation 'androidx.constraintlayout:constraintlayout:2.2.1' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "androidx.recyclerview:recyclerview:${rootProject.ext.recyclerViewVersion}" + implementation "com.google.android.material:material:${rootProject.ext.materialVersion}" + implementation "androidx.constraintlayout:constraintlayout:${rootProject.ext.constraintLayoutVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } diff --git a/widgetlibrary/build.gradle b/widgetlibrary/build.gradle index f284cf7a..4c50fd8e 100644 --- a/widgetlibrary/build.gradle +++ b/widgetlibrary/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 34 - buildToolsVersion '34.0.0' + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" @@ -30,9 +30,9 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.7.1' - implementation 'com.google.android.material:material:1.12.0' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.2.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation "androidx.appcompat:appcompat:${rootProject.ext.appcompatVersion}" + implementation "com.google.android.material:material:${rootProject.ext.materialVersion}" + testImplementation "junit:junit:${rootProject.ext.junitVersion}" + androidTestImplementation "androidx.test.ext:junit:${rootProject.ext.androidXJunitVersion}" + androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.ext.espressoVersion}" } From c639524032dbdbf3b8b08880c44fad95e5ff20fd Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 13:06:07 +0800 Subject: [PATCH 05/13] Specify namespace for each module --- app/build.gradle | 1 + cameralibrary/build.gradle | 1 + facedetectlibrary/build.gradle | 1 + filterlibrary/build.gradle | 1 + gdxlibrary/build.gradle | 1 + imagelibrary/build.gradle | 1 + landmarklibrary/build.gradle | 1 + medialibrary/build.gradle | 1 + pickerlibrary/build.gradle | 1 + utilslibrary/build.gradle | 1 + videolibrary/build.gradle | 1 + widgetlibrary/build.gradle | 1 + 12 files changed, 12 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 6f06f274..2e6627ab 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.caincamera' defaultConfig { applicationId "com.cgfay.caincamera" diff --git a/cameralibrary/build.gradle b/cameralibrary/build.gradle index 453e7139..fb4ffccd 100644 --- a/cameralibrary/build.gradle +++ b/cameralibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.cameralibrary' defaultConfig { minSdkVersion rootProject.ext.minSdkVersion diff --git a/facedetectlibrary/build.gradle b/facedetectlibrary/build.gradle index fe3f6e1d..183b3fa3 100644 --- a/facedetectlibrary/build.gradle +++ b/facedetectlibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.facedetectlibrary' defaultConfig { minSdkVersion rootProject.ext.minSdkVersion diff --git a/filterlibrary/build.gradle b/filterlibrary/build.gradle index 1f2d1080..cd02df83 100644 --- a/filterlibrary/build.gradle +++ b/filterlibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.filterlibrary' defaultConfig { minSdkVersion rootProject.ext.minSdkVersion diff --git a/gdxlibrary/build.gradle b/gdxlibrary/build.gradle index 00f9f04b..b3201437 100644 --- a/gdxlibrary/build.gradle +++ b/gdxlibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.badlogic.gdx' defaultConfig { minSdkVersion rootProject.ext.minSdkVersion diff --git a/imagelibrary/build.gradle b/imagelibrary/build.gradle index 10446b82..f79c3073 100644 --- a/imagelibrary/build.gradle +++ b/imagelibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.imagelibrary' defaultConfig { minSdkVersion rootProject.ext.minSdkVersion diff --git a/landmarklibrary/build.gradle b/landmarklibrary/build.gradle index b65930df..20bc0c0a 100644 --- a/landmarklibrary/build.gradle +++ b/landmarklibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.landmarklibrary' defaultConfig { diff --git a/medialibrary/build.gradle b/medialibrary/build.gradle index c1e214ce..55b5650b 100644 --- a/medialibrary/build.gradle +++ b/medialibrary/build.gradle @@ -7,6 +7,7 @@ def platformVersion = rootProject.ext.minSdkVersion // 18: openGLES 3 min api android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.media' defaultConfig { minSdkVersion "${platformVersion}" diff --git a/pickerlibrary/build.gradle b/pickerlibrary/build.gradle index 5579d06a..d322fee7 100644 --- a/pickerlibrary/build.gradle +++ b/pickerlibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.scan' defaultConfig { minSdkVersion rootProject.ext.minSdkVersion diff --git a/utilslibrary/build.gradle b/utilslibrary/build.gradle index 6cadf7b8..17271e6a 100644 --- a/utilslibrary/build.gradle +++ b/utilslibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.utilslibrary' defaultConfig { diff --git a/videolibrary/build.gradle b/videolibrary/build.gradle index 6795cde1..e1b7c8af 100644 --- a/videolibrary/build.gradle +++ b/videolibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.video' defaultConfig { minSdkVersion rootProject.ext.minSdkVersion diff --git a/widgetlibrary/build.gradle b/widgetlibrary/build.gradle index 4c50fd8e..44932916 100644 --- a/widgetlibrary/build.gradle +++ b/widgetlibrary/build.gradle @@ -3,6 +3,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion rootProject.ext.buildToolsVersion + namespace 'com.cgfay.design' defaultConfig { minSdkVersion rootProject.ext.minSdkVersion From 1a25166a1731d842dd28c299647388522d45d243 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 13:49:01 +0800 Subject: [PATCH 06/13] Fix widget library R imports --- widgetlibrary/src/main/java/com/cgfay/widget/CameraTabView.java | 2 +- widgetlibrary/src/main/java/com/cgfay/widget/TabItem.java | 2 +- widgetlibrary/src/main/java/com/cgfay/widget/ThemeUtils.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/widgetlibrary/src/main/java/com/cgfay/widget/CameraTabView.java b/widgetlibrary/src/main/java/com/cgfay/widget/CameraTabView.java index c1b45aaa..5b509ffb 100644 --- a/widgetlibrary/src/main/java/com/cgfay/widget/CameraTabView.java +++ b/widgetlibrary/src/main/java/com/cgfay/widget/CameraTabView.java @@ -55,7 +55,7 @@ import android.widget.LinearLayout; import android.widget.TextView; -import com.cgfay.design.R; +import com.google.android.material.R; import com.cgfay.resources.MaterialResources; import com.cgfay.internal.ViewUtils; diff --git a/widgetlibrary/src/main/java/com/cgfay/widget/TabItem.java b/widgetlibrary/src/main/java/com/cgfay/widget/TabItem.java index 94b3e022..d57412e1 100644 --- a/widgetlibrary/src/main/java/com/cgfay/widget/TabItem.java +++ b/widgetlibrary/src/main/java/com/cgfay/widget/TabItem.java @@ -6,7 +6,7 @@ import android.util.AttributeSet; import android.view.View; -import com.cgfay.design.R; +import com.google.android.material.R; /** diff --git a/widgetlibrary/src/main/java/com/cgfay/widget/ThemeUtils.java b/widgetlibrary/src/main/java/com/cgfay/widget/ThemeUtils.java index 67599d13..c9e4298e 100644 --- a/widgetlibrary/src/main/java/com/cgfay/widget/ThemeUtils.java +++ b/widgetlibrary/src/main/java/com/cgfay/widget/ThemeUtils.java @@ -3,7 +3,7 @@ import android.content.Context; import android.content.res.TypedArray; -import com.cgfay.design.R; +import androidx.appcompat.R; /** * @author CainHuang From ecd7122c64e6c5bb577bb7965ea670455540f3c4 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 13:49:37 +0800 Subject: [PATCH 07/13] Fix compile errors for non-transitive resources --- .../java/com/cgfay/image/fragment/ImageEditedFragment.java | 4 ++-- .../src/main/java/com/cgfay/image/widget/CropCoverView.java | 5 +++-- .../src/main/java/com/cgfay/image/widget/GraffitiView.java | 2 +- pickerlibrary/build.gradle | 3 +++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/imagelibrary/src/main/java/com/cgfay/image/fragment/ImageEditedFragment.java b/imagelibrary/src/main/java/com/cgfay/image/fragment/ImageEditedFragment.java index 437d2a10..89e770ca 100644 --- a/imagelibrary/src/main/java/com/cgfay/image/fragment/ImageEditedFragment.java +++ b/imagelibrary/src/main/java/com/cgfay/image/fragment/ImageEditedFragment.java @@ -334,7 +334,7 @@ public void setImagePath(String path, boolean deleteInputFile) { */ private void requestStoragePermission() { if (shouldShowRequestPermissionRationale(Manifest.permission.READ_EXTERNAL_STORAGE)) { - PermissionConfirmDialogFragment.newInstance(getString(R.string.request_storage_permission), PermissionUtils.REQUEST_STORAGE_PERMISSION) + PermissionConfirmDialogFragment.newInstance(getString(com.cgfay.utilslibrary.R.string.request_storage_permission), PermissionUtils.REQUEST_STORAGE_PERMISSION) .show(getChildFragmentManager(), FRAGMENT_DIALOG); } else { requestPermissions(new String[]{ Manifest.permission.READ_EXTERNAL_STORAGE}, @@ -346,7 +346,7 @@ private void requestStoragePermission() { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode == PermissionUtils.REQUEST_STORAGE_PERMISSION) { if (grantResults.length != 1 || grantResults[0] != PackageManager.PERMISSION_GRANTED) { - PermissionErrorDialogFragment.newInstance(getString(R.string.request_storage_permission), PermissionUtils.REQUEST_STORAGE_PERMISSION, true) + PermissionErrorDialogFragment.newInstance(getString(com.cgfay.utilslibrary.R.string.request_storage_permission), PermissionUtils.REQUEST_STORAGE_PERMISSION, true) .show(getChildFragmentManager(), FRAGMENT_DIALOG); } else { mStorageWriteEnable = true; diff --git a/imagelibrary/src/main/java/com/cgfay/image/widget/CropCoverView.java b/imagelibrary/src/main/java/com/cgfay/image/widget/CropCoverView.java index 00e195c5..1a4b0049 100644 --- a/imagelibrary/src/main/java/com/cgfay/image/widget/CropCoverView.java +++ b/imagelibrary/src/main/java/com/cgfay/image/widget/CropCoverView.java @@ -10,6 +10,7 @@ import com.cgfay.imagelibrary.R; + /** * 裁剪遮罩视图 * Created by cain.huang on 2017/12/28. @@ -72,8 +73,8 @@ public CropCoverView(Context context) { } private void init() { - mStrokeWidth = (int) getResources().getDimension(R.dimen.dp3); - mStrokeWidthNew = (int) getResources().getDimension(R.dimen.dp1); + mStrokeWidth = (int) getResources().getDimension(com.cgfay.utilslibrary.R.dimen.dp3); + mStrokeWidthNew = (int) getResources().getDimension(com.cgfay.utilslibrary.R.dimen.dp1); mPaint = new Paint(); mPaint.setAntiAlias(true); diff --git a/imagelibrary/src/main/java/com/cgfay/image/widget/GraffitiView.java b/imagelibrary/src/main/java/com/cgfay/image/widget/GraffitiView.java index ee300c2d..b2097e7d 100644 --- a/imagelibrary/src/main/java/com/cgfay/image/widget/GraffitiView.java +++ b/imagelibrary/src/main/java/com/cgfay/image/widget/GraffitiView.java @@ -78,7 +78,7 @@ public Paint newPaint(int color) { Paint paint = new Paint(); paint.setAntiAlias(true); - paint.setStrokeWidth(getResources().getDimension(R.dimen.dp3)); + paint.setStrokeWidth(getResources().getDimension(com.cgfay.utilslibrary.R.dimen.dp3)); paint.setStyle(Paint.Style.STROKE); paint.setStrokeJoin(Paint.Join.ROUND); paint.setStrokeCap(Paint.Cap.ROUND); diff --git a/pickerlibrary/build.gradle b/pickerlibrary/build.gradle index d322fee7..9214528c 100644 --- a/pickerlibrary/build.gradle +++ b/pickerlibrary/build.gradle @@ -26,6 +26,9 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + buildFeatures { + buildConfig true + } } dependencies { From d9fdf812f6c30a5cd5de02326927573246e5f644 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 13:57:13 +0800 Subject: [PATCH 08/13] Fix resource references for namespaced modules --- .../java/com/cgfay/video/activity/VideoEditActivity.java | 2 +- .../cgfay/video/adapter/VideoEffectCategoryAdapter.java | 2 +- .../java/com/cgfay/video/adapter/VideoFilterAdapter.java | 2 +- .../java/com/cgfay/video/fragment/VideoCutFragment.java | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/videolibrary/src/main/java/com/cgfay/video/activity/VideoEditActivity.java b/videolibrary/src/main/java/com/cgfay/video/activity/VideoEditActivity.java index ca4b621f..b8caa94e 100644 --- a/videolibrary/src/main/java/com/cgfay/video/activity/VideoEditActivity.java +++ b/videolibrary/src/main/java/com/cgfay/video/activity/VideoEditActivity.java @@ -67,7 +67,7 @@ public void onOpenMusicSelectPage() { fragment.addOnMusicSelectedListener(this); getSupportFragmentManager() .beginTransaction() - .setCustomAnimations(R.anim.anim_slide_up, 0) + .setCustomAnimations(com.cgfay.utilslibrary.R.anim.anim_slide_up, 0) .add(R.id.fragment_content, fragment) .addToBackStack(FRAGMENT_MUSIC_SELECT) .commit(); diff --git a/videolibrary/src/main/java/com/cgfay/video/adapter/VideoEffectCategoryAdapter.java b/videolibrary/src/main/java/com/cgfay/video/adapter/VideoEffectCategoryAdapter.java index 40851ed1..ba3246f6 100644 --- a/videolibrary/src/main/java/com/cgfay/video/adapter/VideoEffectCategoryAdapter.java +++ b/videolibrary/src/main/java/com/cgfay/video/adapter/VideoEffectCategoryAdapter.java @@ -46,7 +46,7 @@ public ImageHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { public void onBindViewHolder(@NonNull ImageHolder holder, final int position) { holder.filterName.setText(mCategoryList.get(position).getName()); if (position == mSelected) { - holder.filterName.setTextColor(mContext.getResources().getColor(R.color.white)); + holder.filterName.setTextColor(mContext.getResources().getColor(com.cgfay.utilslibrary.R.color.white)); } else { holder.filterName.setTextColor(mContext.getResources().getColor(R.color.video_edit_effect_category_text_normal)); } diff --git a/videolibrary/src/main/java/com/cgfay/video/adapter/VideoFilterAdapter.java b/videolibrary/src/main/java/com/cgfay/video/adapter/VideoFilterAdapter.java index c6f0a802..2205b3bb 100644 --- a/videolibrary/src/main/java/com/cgfay/video/adapter/VideoFilterAdapter.java +++ b/videolibrary/src/main/java/com/cgfay/video/adapter/VideoFilterAdapter.java @@ -61,7 +61,7 @@ public void onBindViewHolder(@NonNull ImageHolder holder, final int position) { if (position == mSelected) { holder.filterPanel.setBackgroundResource(R.drawable.ic_video_filter_selected); } else { - holder.filterPanel.setBackgroundColor(mContext.getResources().getColor(R.color.transparent)); + holder.filterPanel.setBackgroundColor(mContext.getResources().getColor(com.cgfay.utilslibrary.R.color.transparent)); } holder.filterRoot.setOnClickListener(new View.OnClickListener() { @Override diff --git a/videolibrary/src/main/java/com/cgfay/video/fragment/VideoCutFragment.java b/videolibrary/src/main/java/com/cgfay/video/fragment/VideoCutFragment.java index ff64de0b..f685c8a5 100644 --- a/videolibrary/src/main/java/com/cgfay/video/fragment/VideoCutFragment.java +++ b/videolibrary/src/main/java/com/cgfay/video/fragment/VideoCutFragment.java @@ -154,9 +154,9 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { View layoutSpeed = mContentView.findViewById(R.id.layout_speed); ConstraintLayout.LayoutParams speedParams = (ConstraintLayout.LayoutParams) layoutSpeed.getLayoutParams(); if (DisplayUtils.isFullScreenDevice(mActivity)) { - speedParams.bottomMargin = getResources().getDimensionPixelSize(R.dimen.dp20); + speedParams.bottomMargin = getResources().getDimensionPixelSize(com.cgfay.utilslibrary.R.dimen.dp20); } else { - speedParams.bottomMargin = getResources().getDimensionPixelSize(R.dimen.dp100); + speedParams.bottomMargin = getResources().getDimensionPixelSize(com.cgfay.utilslibrary.R.dimen.dp100); } layoutSpeed.setLayoutParams(speedParams); @@ -167,9 +167,9 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { mVideoCutViewBar.setOnVideoCropViewBarListener(mOnVideoCropViewBarListener); ConstraintLayout.LayoutParams cutViewBarParams = (ConstraintLayout.LayoutParams) mVideoCutViewBar.getLayoutParams(); if (DisplayUtils.isFullScreenDevice(mActivity)) { - cutViewBarParams.bottomMargin = getResources().getDimensionPixelSize(R.dimen.dp70); + cutViewBarParams.bottomMargin = getResources().getDimensionPixelSize(com.cgfay.utilslibrary.R.dimen.dp70); } else { - cutViewBarParams.bottomMargin = getResources().getDimensionPixelSize(R.dimen.dp20); + cutViewBarParams.bottomMargin = getResources().getDimensionPixelSize(com.cgfay.utilslibrary.R.dimen.dp20); } mVideoCutViewBar.setLayoutParams(cutViewBarParams); From 215980191e08d52622f9ee41e5f6b1149e531865 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 14:05:02 +0800 Subject: [PATCH 09/13] Fix resource references in picker library --- .../java/com/cgfay/picker/adapter/AlbumDataAdapter.java | 5 ++++- .../java/com/cgfay/picker/adapter/MediaDataAdapter.java | 6 ++++-- .../java/com/cgfay/picker/fragment/MediaDataFragment.java | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pickerlibrary/src/main/java/com/cgfay/picker/adapter/AlbumDataAdapter.java b/pickerlibrary/src/main/java/com/cgfay/picker/adapter/AlbumDataAdapter.java index 6a5ba45f..c8a020c5 100644 --- a/pickerlibrary/src/main/java/com/cgfay/picker/adapter/AlbumDataAdapter.java +++ b/pickerlibrary/src/main/java/com/cgfay/picker/adapter/AlbumDataAdapter.java @@ -10,6 +10,7 @@ import com.cgfay.picker.MediaPickerManager; import com.cgfay.scan.R; + import com.cgfay.picker.model.AlbumData; import java.util.ArrayList; @@ -44,7 +45,9 @@ public void onBindViewHolder(@NonNull AlbumViewHolder holder, int position) { holder.mAlbumMediaCount.setText(String.valueOf(album.getCount())); MediaPickerManager.getInstance().getMediaLoader() .loadThumbnail(holder.itemView.getContext(), holder.mAlbumThumbnail, - album.getCoverUri(), R.color.black, R.color.black); + album.getCoverUri(), + com.cgfay.utilslibrary.R.color.black, + com.cgfay.utilslibrary.R.color.black); holder.itemView.setOnClickListener(v -> { if (mAlbumSelectedListener != null) { mAlbumSelectedListener.onAlbumSelected(album); diff --git a/pickerlibrary/src/main/java/com/cgfay/picker/adapter/MediaDataAdapter.java b/pickerlibrary/src/main/java/com/cgfay/picker/adapter/MediaDataAdapter.java index f7ac1699..b4c57f94 100644 --- a/pickerlibrary/src/main/java/com/cgfay/picker/adapter/MediaDataAdapter.java +++ b/pickerlibrary/src/main/java/com/cgfay/picker/adapter/MediaDataAdapter.java @@ -60,12 +60,14 @@ public void onBindViewHolder(@NonNull ThumbnailViewHolder holder, int position) MediaPickerManager.getInstance().getMediaLoader() .loadThumbnail(holder.itemView.getContext(), holder.mThumbnailView, mediaData.getContentUri(), mResize, - R.color.white, R.color.white); + com.cgfay.utilslibrary.R.color.white, + com.cgfay.utilslibrary.R.color.white); } else { MediaPickerManager.getInstance().getMediaLoader() .loadThumbnail(holder.itemView.getContext(), holder.mThumbnailView, mediaData.getContentUri(), - R.color.white, R.color.white); + com.cgfay.utilslibrary.R.color.white, + com.cgfay.utilslibrary.R.color.white); } if (mediaData.isVideo()) { diff --git a/pickerlibrary/src/main/java/com/cgfay/picker/fragment/MediaDataFragment.java b/pickerlibrary/src/main/java/com/cgfay/picker/fragment/MediaDataFragment.java index 6ec552e5..fec136eb 100644 --- a/pickerlibrary/src/main/java/com/cgfay/picker/fragment/MediaDataFragment.java +++ b/pickerlibrary/src/main/java/com/cgfay/picker/fragment/MediaDataFragment.java @@ -241,7 +241,9 @@ protected boolean isSlideToBottomLine(@NonNull RecyclerView recyclerView, int of * 指定加载图片的大小 */ private void setItemImageSize() { - int divSize = (int)(getResources().getDimension(R.dimen.dp4) * (mMediaPickerParam.getSpanCount() + 1)); + int divSize = (int)(getResources().getDimension( + com.cgfay.utilslibrary.R.dimen.dp4) * + (mMediaPickerParam.getSpanCount() + 1)); int imageSize = getResources().getDisplayMetrics().widthPixels - divSize; int resize = imageSize / mMediaPickerParam.getSpanCount(); mMediaDataAdapter.setThumbnailResize(resize); From cfb07ac78f682b9f9cd9291dd3c79028f3f88129 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 14:21:16 +0800 Subject: [PATCH 10/13] Fix lifecycle version --- versions.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.gradle b/versions.gradle index aabd5c14..40d5858a 100644 --- a/versions.gradle +++ b/versions.gradle @@ -13,7 +13,7 @@ ext { junitVersion = '4.13.2' androidXJunitVersion = '1.2.1' espressoVersion = '3.6.1' - lifecycleVersion = '2.9.2' + lifecycleVersion = '2.2.0' cameraXVersion = '1.4.2' rxJavaVersion = '2.2.21' rxAndroidVersion = '2.1.1' From c97a817a671d58330eb1b093c9517e1f8adbbb31 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 14:28:28 +0800 Subject: [PATCH 11/13] Update AGP and compileSdk --- build.gradle | 3 ++- gradlew | 0 versions.gradle | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 gradlew diff --git a/build.gradle b/build.gradle index ea4cd92c..ae5a8750 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,8 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:8.2.0' + // Updated to support compileSdk 35 + classpath 'com.android.tools.build:gradle:8.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/versions.gradle b/versions.gradle index 40d5858a..a48135ff 100644 --- a/versions.gradle +++ b/versions.gradle @@ -1,6 +1,7 @@ ext { - compileSdkVersion = 34 - buildToolsVersion = '34.0.0' + // Compile against the latest Android 14 SDK + compileSdkVersion = 35 + buildToolsVersion = '35.0.0' minSdkVersion = 21 targetSdkVersion = 30 From 4689460dbc62c7aadd8498995166c1ad874be0dd Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 15:08:24 +0800 Subject: [PATCH 12/13] Include transitive resources in R --- gradle.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gradle.properties b/gradle.properties index b36ec8d2..887bd629 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,8 @@ android.enableJetifier=true android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m android.injected.testOnly=false +# Include resources from dependent modules in generated R classes +android.nonTransitiveRClass=false # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects From 5cf5fa22ad181c018c17e98a9f06be6851df0dc2 Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jul 2025 15:20:44 +0800 Subject: [PATCH 13/13] Fix compile error by making resource IDs final --- gradle.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle.properties b/gradle.properties index 887bd629..76e3d095 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,6 +15,7 @@ org.gradle.jvmargs=-Xmx1536m android.injected.testOnly=false # Include resources from dependent modules in generated R classes android.nonTransitiveRClass=false +android.nonFinalResIds=false # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects