Skip to content

Commit 3fcee4a

Browse files
committed
Upgrade AGP to v7.1.2
1 parent fc6cbbc commit 3fcee4a

File tree

19 files changed

+227
-205
lines changed

19 files changed

+227
-205
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android_project_common.gradle

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,7 @@ allprojects {
99
configurations.all {
1010
resolutionStrategy {
1111
eachDependency { details ->
12-
if (details.requested.group == 'com.android.support') {
13-
if (details.requested.name == 'multidex'
14-
|| details.requested.name == 'multidex-instrumentation') {
15-
details.useVersion versions.multidexLib
16-
} else {
17-
details.useVersion versions.supportLib
18-
}
19-
} else if (details.requested.group == 'androidx.arch.core') {
12+
if (details.requested.group == 'androidx.arch.core') {
2013
details.useVersion versions.archCore
2114
} else if (details.requested.group == 'androidx.lifecycle') {
2215
details.useVersion versions.lifecycle
@@ -38,25 +31,25 @@ ext {
3831
'compileSdk' : 31,
3932

4033
// Android official support
41-
'kotlin' : '1.5.31',
34+
'kotlin' : '1.6.10',
4235
'kotlinCoroutine' : "1.5.2",
4336
'multidexLib' : "2.0.1",
4437
'androidxCore' : '1.7.0',
45-
'fragment' : '1.3.6',
46-
'preference' : "1.1.1",
38+
'fragment' : '1.4.1',
39+
'preference' : "1.2.0",
4740
'palette' : "1.0.0",
4841
'recyclerView' : "1.2.1",
49-
'constraintLayout' : "2.1.1",
42+
'constraintLayout' : "2.1.3",
5043
'vectorDrawable' : "1.1.0",
5144
'lintLib' : '30.0.2',
5245
'archCore' : "2.1.0",
53-
'lifecycle' : "2.4.0",
54-
'room' : '2.3.0',
55-
'sqlite' : "2.1.0",
56-
'navigation' : "2.3.5",
57-
'paging' : "3.0.1",
58-
'work' : "2.7.0",
59-
'media2' : "1.2.0",
46+
'lifecycle' : "2.4.1",
47+
'room' : '2.4.1',
48+
'sqlite' : "2.2.0",
49+
'navigation' : "2.4.1",
50+
'paging' : "3.1.0",
51+
'work' : "2.7.1",
52+
'media2' : "1.2.1",
6053

6154
// test
6255
'testCore' : "1.4.0",
@@ -118,12 +111,12 @@ ext {
118111
'coreKtx' : "androidx.core:core-ktx:${versions.androidxCore}",
119112
'fragment' : "androidx.fragment:fragment:${versions.fragment}",
120113
'fragmentKtx' : "androidx.fragment:fragment-ktx:${versions.fragment}",
121-
'localBroadcast' : "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0",
122-
'collection' : "androidx.collection:collection:1.1.0",
123-
'collectionKtx' : "androidx.collection:collection-ktx:1.1.0",
114+
'localBroadcast' : "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0",
115+
'collection' : "androidx.collection:collection:1.2.0",
116+
'collectionKtx' : "androidx.collection:collection-ktx:1.2.0",
124117
// UI
125-
'appcompat' : "androidx.appcompat:appcompat:1.3.1",
126-
'material' : "com.google.android.material:material:1.4.0",
118+
'appcompat' : "androidx.appcompat:appcompat:1.4.1",
119+
'material' : "com.google.android.material:material:1.5.0",
127120
'preference' : "androidx.preference:preference:${versions.preference}",
128121
'preferenceKtx' : "androidx.preference:preference-ktx:${versions.preference}",
129122
'constraintLayout' : "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}",
@@ -134,7 +127,7 @@ ext {
134127
'recyclerview' : "androidx.recyclerview:recyclerview:${versions.recyclerView}",
135128
'recyclerviewSelection' : "androidx.recyclerview:recyclerview:${versions.recyclerView}",
136129
'percent' : "androidx.percentlayout:percentlayout:1.0.0",
137-
'coordinatorLayout' : "androidx.coordinatorlayout:coordinatorlayout:1.1.0",
130+
'coordinatorLayout' : "androidx.coordinatorlayout:coordinatorlayout:1.2.0",
138131
'drawerLayout' : "androidx.drawerlayout:drawerlayout:1.1.1",
139132
'swipeRefreshLayout' : "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0",
140133
'viewPager' : "androidx.viewpager:viewpager:1.0.0",
@@ -147,7 +140,7 @@ ext {
147140
'multidex' : "androidx.multidex:multidex:${versions.multidexLib}",
148141
'mediaSession' : "androidx.media2:media2-session:${versions.media2}",
149142
'mediaExoPlayer' : "androidx.media2:media2-exoplayer:${versions.media2}",
150-
'mediarouter' : "androidx.mediarouter:mediarouter:1.2.5",
143+
'mediarouter' : "androidx.mediarouter:mediarouter:1.2.6",
151144
'exifinterface' : "androidx.exifinterface:exifinterface:1.3.3",
152145
'wear' : "androidx.wear:wear:1.0.0",
153146
// legacy

archLib/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ android {
77
defaultConfig {
88
minSdkVersion versions.minSdk
99
}
10-
11-
lintOptions {
12-
}
1310
}
1411

1512
dependencies {

archLintRules/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ test {
2626
showStandardStreams = true
2727
}
2828
}
29+
30+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
31+
kotlinOptions {
32+
jvmTarget = "11"
33+
}
34+
}

archLintRulesTestDemo/build.gradle

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,37 @@ android {
2323
}
2424
}
2525

26-
lintOptions {
27-
abortOnError false
28-
29-
// comment the following line when debug lint rules
30-
disable 'MyBaseActivity', 'MyBroadcastHelper', 'MyIntentHelper', 'MyToastHelper'
31-
32-
disable 'GoogleAppIndexingWarning'
33-
disable 'AllowBackup'
26+
lint {
27+
// It's too slow to run lint checks. So disable it.
28+
checkDependencies false
29+
checkReleaseBuilds false
30+
checkOnly 'AllowBackup'
31+
ignoreWarnings true
3432
}
3533
}
3634

3735
dependencies {
3836
implementation project(':archLib')
3937

4038
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}"
41-
implementation "androidx.appcompat:appcompat:1.3.1"
39+
implementation "androidx.appcompat:appcompat:1.4.1"
4240
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.kotlinCoroutine}"
4341

4442
// The following dependencies are just for checking new versions of library
4543
implementation "androidx.core:core-ktx:${versions.androidxCore}"
4644
implementation "androidx.fragment:fragment-ktx:${versions.fragment}"
47-
implementation "com.google.android.material:material:1.4.0"
45+
implementation "com.google.android.material:material:1.5.0"
4846
implementation "androidx.multidex:multidex:${versions.multidexLib}"
4947
implementation "androidx.annotation:annotation:1.3.0"
50-
implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0"
51-
implementation "androidx.collection:collection-ktx:1.1.0"
48+
implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0"
49+
implementation "androidx.collection:collection-ktx:1.2.0"
5250
implementation "androidx.preference:preference-ktx:${versions.preference}"
5351
implementation "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}"
5452
implementation "androidx.cardview:cardview:1.0.0"
5553
implementation "androidx.gridlayout:gridlayout:1.0.0"
5654
implementation "androidx.palette:palette-ktx:${versions.palette}"
5755
implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}"
58-
implementation "androidx.coordinatorlayout:coordinatorlayout:1.1.0"
56+
implementation "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
5957
implementation "androidx.drawerlayout:drawerlayout:1.1.1"
6058
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
6159
implementation "androidx.viewpager2:viewpager2:1.0.0"
@@ -66,7 +64,7 @@ dependencies {
6664
implementation "androidx.browser:browser:1.4.0"
6765
implementation "androidx.transition:transition:1.4.1"
6866
implementation "androidx.media2:media2-session:${versions.media2}"
69-
implementation "androidx.mediarouter:mediarouter:1.2.5"
67+
implementation "androidx.mediarouter:mediarouter:1.2.6"
7068
implementation "androidx.exifinterface:exifinterface:1.3.3"
7169

7270
implementation "androidx.arch.core:core-common:${versions.archCore}"

baseLib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010
minSdkVersion versions.minSdk
1111
}
1212

13-
lintOptions {
13+
lint {
1414
disable 'PrivateApi'
1515
}
1616
}

baseLib/src/androidTest/AndroidManifest.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="me.ycdev.android.lib.common.test">
44

5-
<uses-sdk
6-
android:minSdkVersion="9"
7-
android:targetSdkVersion="9" />
8-
95
<permission
106
android:name="${applicationId}.permission.DYNAMIC_BROADCAST"
117
android:protectionLevel="signature" />

baseLib/src/main/java/me/ycdev/android/lib/common/packets/PacketsWorker.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ abstract class PacketsWorker(
4242
fun onDataParsed(data: ByteArray)
4343
}
4444

45-
@VisibleForTesting
45+
@VisibleForTesting(otherwise = VisibleForTesting.PROTECTED)
4646
internal enum class ParserState {
4747
HEADER_MAGIC,
4848
VERSION,

build.gradle

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,15 @@ buildscript {
55
}
66
apply from: "${androidProjectCommon}"
77

8-
repositories {
9-
google()
10-
mavenCentral()
11-
}
12-
138
dependencies {
14-
classpath 'com.android.tools.build:gradle:7.0.3'
9+
classpath 'com.android.tools.build:gradle:7.1.2'
1510
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
1611
}
1712
}
1813

1914
plugins {
2015
id("com.diffplug.spotless") version "5.16.0"
2116
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
22-
id("org.jetbrains.dokka") version "1.5.30"
23-
}
24-
25-
allprojects {
26-
repositories {
27-
google()
28-
mavenCentral()
29-
}
3017
}
3118

3219
ext {
@@ -39,7 +26,7 @@ ext {
3926
'projectScmDevConnection': 'ssh://[email protected]/yongce/AndroidLib.git',
4027
'projectInceptionYear': '2013',
4128
'groupId': 'io.github.yongce',
42-
'version': '2.0.0',
29+
'version': '2.0.1',
4330
'developerId': 'yongce',
4431
'developerName': 'Yongce Tu',
4532
'developerEmail': '[email protected]',

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ android.enableJetifier=true
33

44
org.gradle.jvmargs=-Xmx4096M
55

6+
android.disableAutomaticComponentCreation=true

gradle/wrapper/gradle-wrapper.jar

333 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip

0 commit comments

Comments
 (0)