File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ apply from : '../common.gradle'
99
1010// Android 代码规范文档:https://github.com/getActivity/AndroidCodeStandard
1111android {
12+ namespace ' com.hjq.demo'
13+
14+ buildFeatures {
15+ // 是否生成 BuildConfig 类
16+ buildConfig true
17+ }
1218
1319 // 资源目录存放指引:https://developer.android.google.cn/guide/topics/resources/providing-resources
1420 defaultConfig {
Original file line number Diff line number Diff line change 11// AndroidProject 版本:v15.0
22plugins {
3- id ' com.android.application' version ' 7.4.2' apply false
4- id ' org.jetbrains.kotlin.android' version ' 1.8.22' apply false
3+ id ' com.android.application' version ' 8.13.2' apply false
4+ id ' com.android.library' version ' 8.13.2' apply false
5+ id ' org.jetbrains.kotlin.android' version ' 2.2.21' apply false
56 // AOP 插件:https://github.com/FlyJingFish/AndroidAOP
67 id ' io.github.flyjingfish.androidaop' version ' 2.7.4' apply false
78 // 多 buildType 图标插件:https://github.com/usefulness/easylauncher-gradle-plugin
Original file line number Diff line number Diff line change @@ -36,11 +36,10 @@ android {
3636 }
3737
3838 // 代码警告配置
39- lintOptions {
40- // 禁用文本硬编码警告
41- disable ' HardcodedText'
42- // 禁用图片描述警告
43- disable ' ContentDescription'
39+ lint {
40+ // HardcodedText:禁用文本硬编码警告
41+ // ContentDescription:禁用图片描述警告
42+ disable ' HardcodedText' , ' ContentDescription'
4443 }
4544
4645 // 读取 local.properties 文件配置
@@ -62,15 +61,7 @@ android {
6261 }
6362}
6463
65- afterEvaluate {
66- // 前提条件是这个 Module 工程必须是 Library 类型,并且排除名为 umeng 的 Module 工程
67- if (android. defaultConfig. applicationId == null && " umeng" != getName()) {
68- // 排除 BuildConfig.class
69- generateReleaseBuildConfig. enabled = false
70- generatePreviewBuildConfig. enabled = false
71- generateDebugBuildConfig. enabled = false
72- }
73- }
64+
7465
7566dependencies {
7667 // 依赖 libs 目录下所有的 jar 和 aar 包
Original file line number Diff line number Diff line change 1212# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1313# org.gradle.parallel = true
1414
15- # 为 Studio 分配默认的内存大小
15+ # Default memory allocation for Gradle JVM
1616org.gradle.jvmargs = -Xmx3072m
1717
18- # 表示使用 AndroidX
18+ # Enable AndroidX
1919android.useAndroidX = true
20- # 表示将第三方库迁移到 AndroidX
20+ # Enable Jetifier to migrate third-party libraries to AndroidX
2121android.enableJetifier = true
2222
23- android.aapt2Version = 8.6.1-11315950
24- android.suppressUnsupportedCompileSdk = 35
23+ # Use transitive R class for backward compatibility with old code
24+ android.nonTransitiveRClass = false
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ zipStoreBase=GRADLE_USER_HOME
22zipStorePath =wrapper/dists
33distributionBase =GRADLE_USER_HOME
44distributionPath =wrapper/dists
5- distributionUrl =https\://services.gradle.org/distributions/gradle-7.6.6 -all.zip
5+ distributionUrl =https\://services.gradle.org/distributions/gradle-9.2.0 -all.zip
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ plugins {
44apply from : ' ../../common.gradle'
55
66android {
7+ namespace ' com.hjq.base'
78
89 defaultConfig {
910 // 模块混淆配置
Original file line number Diff line number Diff line change 11plugins {
22 id ' com.android.library'
33}
4- apply from : ' ../../common.gradle'
4+ apply from : ' ../../common.gradle'
5+
6+ android {
7+ namespace ' com.hjq.copy'
8+ }
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ plugins {
44apply from : ' ../../common.gradle'
55
66android {
7+ namespace ' com.hjq.umeng'
8+
9+ buildFeatures {
10+ // 是否生成 BuildConfig 类
11+ buildConfig true
12+ }
713
814 defaultConfig {
915 // 模块混淆配置
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ plugins {
33}
44apply from : ' ../../common.gradle'
55
6+ android {
7+ namespace ' com.hjq.widget'
8+ }
9+
610dependencies {
711 // 基础库(不包任何第三方框架)
812 implementation project(' :library:base' )
Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ pluginManagement {
1616 mavenCentral()
1717 // Google 仓库:https://maven.google.com/web/index.html
1818 google()
19- // noinspection JcenterRepositoryObsolete
20- jcenter()
2119 }
2220}
2321dependencyResolutionManagement {
@@ -36,8 +34,6 @@ dependencyResolutionManagement {
3634 mavenCentral()
3735 // Google 仓库:https://maven.google.com/web/index.html
3836 google()
39- // noinspection JcenterRepositoryObsolete
40- jcenter()
4137 }
4238}
4339
You can’t perform that action at this time.
0 commit comments