diff --git a/app/build.gradle b/app/build.gradle index 39d9adb..14e6e2a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,11 @@ +//plugins { +// id 'com.android.application' +// id 'org.jetbrains.kotlin.android' +//} + plugins { - id 'com.android.application' - id 'org.jetbrains.kotlin.android' + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) } android { @@ -61,8 +66,8 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 } } @@ -72,6 +77,18 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) //implementation 'com.zhy:autolayout:1.4.5'//源代码下载整合本项目到模块 第三方库自动布局 //implementation 'com.yolanda.nohttp:nohttp:1.0.5'//源代码下载整合本项目到模块 网络请求模块 + + implementation libs.androidx.core.ktx + implementation libs.androidx.appcompat + implementation libs.material + implementation libs.androidx.activity + implementation libs.androidx.constraintlayout + testImplementation libs.junit + androidTestImplementation libs.androidx.junit + androidTestImplementation libs.androidx.espresso.core + + + 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' @@ -91,10 +108,15 @@ dependencies { implementation 'androidx.multidex:multidex:2.0.1' - 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.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') @@ -131,7 +153,7 @@ dependencies { 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' - implementation 'androidx.activity:activity:1.8.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' //第三方工具类 implementation 'cn.hutool:hutool-all:5.8.5' @@ -163,9 +185,9 @@ dependencies { implementation "androidx.camera:camera-extensions:${camerax_version}" - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' +// 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/autolayout/build.gradle b/autolayout/build.gradle index 3a1151c..c77c962 100644 --- a/autolayout/build.gradle +++ b/autolayout/build.gradle @@ -11,5 +11,5 @@ android { } dependencies { - implementation 'androidx.appcompat:appcompat:1.7.0' + implementation libs.androidx.appcompat.v170 } \ No newline at end of file diff --git a/autolayout/src/main/java/com/zhy/autolayout/AutoLayoutActivity.java b/autolayout/src/main/java/com/zhy/autolayout/AutoLayoutActivity.java index 1138d9c..21143db 100644 --- a/autolayout/src/main/java/com/zhy/autolayout/AutoLayoutActivity.java +++ b/autolayout/src/main/java/com/zhy/autolayout/AutoLayoutActivity.java @@ -3,7 +3,7 @@ package com.zhy.autolayout; import android.content.Context; import android.util.AttributeSet; import android.view.View; -;import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; /** * Created by zhy on 15/11/19. diff --git a/build.gradle b/build.gradle index fcf0af7..26e85b2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. +//plugins { +// id 'com.android.application' version '8.6.0' apply false +// id 'org.jetbrains.kotlin.android' version '1.8.0' apply false +//} + plugins { - id 'com.android.application' version '8.6.0' apply false - id 'org.jetbrains.kotlin.android' version '1.8.0' apply false -} + alias(libs.plugins.android.application) apply false + alias(libs.plugins.kotlin.android) apply false +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1bbfa78..62b0cbc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,7 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -#android.nonTransitiveRClass=true +android.nonTransitiveRClass=true #android.defaults.buildfeatures.buildconfig=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..4ffe11f --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,38 @@ +[versions] +agp = "8.8.0" +androidxAppcompatVersion = "1.1.0" +annotationVersion = "1.8.2" +appcompatVersion = "1.7.0" +glide = "4.11.0" +kotlin = "1.9.24" +coreKtx = "1.10.1" +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" +squareupPicasso = "2.5.2" + +[libraries] +androidx-appcompat-v170 = { module = "androidx.appcompat:appcompat", version.ref = "appcompatVersion" } +androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } +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" } +com-squareup-picasso-picasso = { module = "com.squareup.picasso:picasso", version.ref = "squareupPicasso" } +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" } +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" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "agp" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a7a24a6..47ff547 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Oct 23 10:17:58 GMT+08:00 2023 +#Thu Jan 16 17:33:21 CST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/matisse/build.gradle b/matisse/build.gradle index 3b23f6f..b732aaf 100644 --- a/matisse/build.gradle +++ b/matisse/build.gradle @@ -12,20 +12,11 @@ android { } dependencies { - implementation "androidx.appcompat:appcompat:1.1.0" - implementation "androidx.annotation:annotation:1.1.0" - implementation "androidx.recyclerview:recyclerview:1.0.0" + implementation libs.appcompat.v110 + implementation libs.annotation + implementation libs.androidx.recyclerview + //noinspection UseTomlInstead implementation 'it.sephiroth.android.library.imagezoom:library:1.0.4' - compileOnly 'com.github.bumptech.glide:glide:4.9.0' - compileOnly 'com.squareup.picasso:picasso:2.5.2' -} - - -//publish { -// userOrg = 'zhihu' -// groupId = 'com.zhihu.android' -// artifactId = 'matisse' -// publishVersion = '0.5.3-beta3' -// desc = 'A well-designed local image selector for Android' -// website = 'https://www.zhihu.com/' -//} + 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 d39717d..6000299 100644 --- a/tkrefreshlayout/build.gradle +++ b/tkrefreshlayout/build.gradle @@ -11,6 +11,6 @@ android { } dependencies { - implementation 'com.android.support:support-v4:25.2.0' - implementation 'com.android.support:recyclerview-v7:25.2.0' + implementation 'com.android.support:support-v4:28.0.0' + implementation 'com.android.support:recyclerview-v7:28.0.0' } \ No newline at end of file diff --git a/videocompressor/build.gradle b/videocompressor/build.gradle index e2239f4..40c4ea1 100644 --- a/videocompressor/build.gradle +++ b/videocompressor/build.gradle @@ -12,10 +12,6 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') -// androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { -// exclude group: 'com.android.support', module: 'support-annotations' -// }) - //implementation 'com.android.support:appcompat-v7:26.+' implementation files('libs/isoparser-1.0.6.jar') implementation files('libs/aspectjrt-1.7.3.jar') }