Skip to content

Commit 2b80dbc

Browse files
committed
Upgrade AGP to v7.0.2
1 parent 842647a commit 2b80dbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+139
-144
lines changed

.idea/compiler.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

-12
This file was deleted.

android_module_common.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* File: 'android_module_common.gradle'
33
* Location: https://raw.githubusercontent.com/yongce/AndroidLib/master/android_module_common.gradle
4-
* Version: 2020.03.26
4+
* Version: 2021.10.1
55
* All android projects can copy and include this file.
66
*/
77

android_project_common.gradle

+51-47
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* File: 'android_project_common.gradle'
33
* Location: https://raw.githubusercontent.com/yongce/AndroidLib/master/android_project_common.gradle
4-
* Version: 2020.07.19
4+
* Version: 2021.10.1
55
* All android projects can copy and include this file.
66
*/
77

@@ -22,6 +22,8 @@ allprojects {
2222
details.useVersion versions.lifecycle
2323
} else if (details.requested.group == 'androidx.room') {
2424
details.useVersion versions.room
25+
} else if (details.requested.group == 'org.jetbrains.kotlin') {
26+
details.useVersion versions.kotlin
2527
}
2628
}
2729
}
@@ -33,84 +35,85 @@ ext {
3335

3436
versions = [
3537
// compile
36-
'compileSdk' : 30,
38+
'compileSdk' : 31,
3739

3840
// Android official support
39-
'kotlin' : '1.3.72',
40-
'kotlinCoroutine' : "1.3.7",
41+
'kotlin' : '1.5.31',
42+
'kotlinCoroutine' : "1.4.1",
4143
'multidexLib' : "2.0.1",
42-
'androidxCore' : '1.3.0',
43-
'fragment' : '1.2.4',
44-
'preference' : "1.1.0",
44+
'androidxCore' : '1.3.2',
45+
'fragment' : '1.3.2',
46+
'preference' : "1.1.1",
4547
'palette' : "1.0.0",
46-
'recyclerView' : "1.1.0",
47-
'constraintLayout' : "1.1.3",
48+
'recyclerView' : "1.2.0",
49+
'constraintLayout' : "2.0.4",
4850
'vectorDrawable' : "1.1.0",
49-
'lintLib' : '27.0.0',
51+
'lintLib' : '30.0.2',
5052
'archCore' : "2.1.0",
51-
'lifecycle' : "2.2.0",
52-
'room' : '2.2.5',
53+
'lifecycle' : "2.3.1",
54+
'room' : '2.2.6',
5355
'sqlite' : "2.1.0",
54-
'navigation' : "2.2.1",
55-
'paging' : "2.1.1",
56-
'work' : "2.3.3",
57-
'media2' : "1.0.3",
56+
'navigation' : "2.3.5",
57+
'paging' : "2.1.2",
58+
'work' : "2.5.0",
59+
'media2' : "1.1.2",
5860

5961
// test
60-
'testCore' : "1.2.0",
61-
'espresso' : "3.2.0",
62+
'testCore' : "1.3.0",
63+
'espresso' : "3.3.0",
6264
'uiautomator' : "2.2.0",
6365
'truth' : '1.0.1',
6466
'hamcrest' : '2.2',
65-
'mockito' : "2.19.0",
67+
'mockito' : "3.5.11",
6668
'powermock' : '1.6.6',
67-
'robolectric' : '4.3.1',
68-
'mockk' : "1.9.3",
69+
'robolectric' : '4.5.1',
70+
'mockk' : "1.10.0",
6971

7072
// google
7173
'gms' : '18.0.0',
7274
'wearableSupport' : "2.3.0",
7375

7476
// infrastructure
75-
'butterknife' : "10.2.1",
76-
'timber' : "4.7.1",
77+
'butterknife' : "10.2.3",
78+
'timber' : "5.0.1",
7779
'guava' : "29.0-android",
7880

7981
// debug
80-
'leakcanary' : "1.6.3",
82+
'leakcanary' : "2.5",
8183
'stetho' : '1.5.1',
82-
'ktlint' : "0.36.0",
84+
'ktlint' : "0.41.0",
8385

8486
// serializing
8587
'gson' : '2.8.6',
8688
'protobuf' : "3.1.0",
8789

8890
// network & image
89-
'okhttp' : '4.7.2',
91+
'okhttp' : '4.9.0',
9092
'retrofit' : '2.9.0',
9193
'glide' : '4.11.0',
92-
'glideTrans' : "4.0.0",
94+
'glideTrans' : "4.3.0",
9395

9496
// rx
95-
'rxjava' : "2.2.6",
97+
'rxjava' : "2.2.12",
9698
'rxandroid' : "2.1.1",
9799

98100
// ycdev
99-
'androidLib' : "1.8.1",
101+
'androidLib' : "2.0.0",
100102

101103
// others
102104
'zxing' : '3.4.0',
103105
]
104106
deps = [
105107
// Android official support
106108
'kotlin': [
107-
'stdlib' : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}",
109+
'stdlib' : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}",
110+
'reflect' : "org.jetbrains.kotlin:kotlin-reflect:${versions.kotlin}",
108111
'coroutinesCore' : "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlinCoroutine}",
109112
'coroutinesAndroid' : "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.kotlinCoroutine}"
110113
],
111114
'androidx': [
112115
// core
113-
'annotation' : "androidx.annotation:annotation:1.1.0",
116+
'annotation' : "androidx.annotation:annotation:1.2.0",
114117
'core' : "androidx.core:core:${versions.androidxCore}",
115118
'coreKtx' : "androidx.core:core-ktx:${versions.androidxCore}",
116119
'fragment' : "androidx.fragment:fragment:${versions.fragment}",
@@ -119,8 +122,8 @@ ext {
119122
'collection' : "androidx.collection:collection:1.1.0",
120123
'collectionKtx' : "androidx.collection:collection-ktx:1.1.0",
121124
// UI
122-
'appcompat' : "androidx.appcompat:appcompat:1.1.0",
123-
'material' : "com.google.android.material:material:1.1.0",
125+
'appcompat' : "androidx.appcompat:appcompat:1.2.0",
126+
'material' : "com.google.android.material:material:1.3.0",
124127
'preference' : "androidx.preference:preference:${versions.preference}",
125128
'preferenceKtx' : "androidx.preference:preference-ktx:${versions.preference}",
126129
'constraintLayout' : "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}",
@@ -132,20 +135,20 @@ ext {
132135
'recyclerviewSelection' : "androidx.recyclerview:recyclerview:${versions.recyclerView}",
133136
'percent' : "androidx.percentlayout:percentlayout:1.0.0",
134137
'coordinatorLayout' : "androidx.coordinatorlayout:coordinatorlayout:1.1.0",
135-
'drawerLayout' : "androidx.drawerlayout:drawerlayout:1.0.0",
136-
'swipeRefreshLayout' : "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0",
138+
'drawerLayout' : "androidx.drawerlayout:drawerlayout:1.1.1",
139+
'swipeRefreshLayout' : "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0",
137140
'viewPager' : "androidx.viewpager:viewpager:1.0.0",
138141
'viewPager2' : "androidx.viewpager2:viewpager2:1.0.0",
139142
'vectorDrawable' : "androidx.vectordrawable:vectordrawable:${versions.vectorDrawable}",
140143
'animatedVectorDrawable' : "androidx.vectordrawable:vectordrawable-animated:${versions.vectorDrawable}",
141-
'browser' : "androidx.browser:browser:1.0.0",
142-
'transition' : "androidx.transition:transition:1.3.1",
144+
'browser' : "androidx.browser:browser:1.3.0",
145+
'transition' : "androidx.transition:transition:1.4.0",
143146
// others
144147
'multidex' : "androidx.multidex:multidex:${versions.multidexLib}",
145148
'mediaSession' : "androidx.media2:media2-session:${versions.media2}",
146149
'mediaExoPlayer' : "androidx.media2:media2-exoplayer:${versions.media2}",
147-
'mediarouter' : "androidx.mediarouter:mediarouter:1.1.0",
148-
'exifinterface' : "androidx.exifinterface:exifinterface:1.0.0",
150+
'mediarouter' : "androidx.mediarouter:mediarouter:1.2.2",
151+
'exifinterface' : "androidx.exifinterface:exifinterface:1.3.2",
149152
'wear' : "androidx.wear:wear:1.0.0",
150153
// legacy
151154
'coreUtils' : "androidx.legacy:legacy-support-core-utils:1.0.0",
@@ -217,9 +220,9 @@ ext {
217220
'monitor' : "androidx.test:monitor:${versions.testCore}",
218221
'orchestrator' : "androidx.test:orchestrator:${versions.testCore}",
219222
// ext
220-
'junit' : "androidx.test.ext:junit:1.1.1",
221-
'junitKtx' : "androidx.test.ext:junit-ktx:1.1.1",
222-
'truthAndroidX' : 'androidx.test.ext:truth:1.2.0',
223+
'junit' : "androidx.test.ext:junit:1.1.2",
224+
'junitKtx' : "androidx.test.ext:junit-ktx:1.1.2",
225+
'truthAndroidX' : "androidx.test.ext:truth:1.3.0",
223226
'truth' : "com.google.truth:truth:${versions.truth}",
224227
'truthJava8' : "com.google.truth.extensions:truth-java8-extension:${versions.truth}",
225228
// espresso
@@ -273,7 +276,8 @@ ext {
273276
'glideTrans' : "jp.wasabeef:glide-transformations:${versions.glideTrans}",
274277

275278
// UI
276-
'flexbox' : "com.google.android:flexbox:2.0.1",
279+
'flexbox' : "com.google.android.flexbox:flexbox:3.0.0",
280+
'lottie' : "com.airbnb.android:lottie:3.4.4",
277281

278282
// rx
279283
'rx': [
@@ -283,10 +287,10 @@ ext {
283287

284288
// ycdev
285289
'ycdev': [
286-
'androidBase' : "me.ycdev.android:common-base:${versions.androidLib}",
287-
'androidArch' : "me.ycdev.android:common-arch:${versions.androidLib}",
288-
'androidUi' : "me.ycdev.android:common-ui:${versions.androidLib}",
289-
'androidTest' : "me.ycdev.android:common-test:${versions.androidLib}"
290+
'androidBase' : "io.github.yongce:android-common-base:${versions.androidLib}",
291+
'androidArch' : "io.github.yongce:android-common-arch:${versions.androidLib}",
292+
'androidUi' : "io.github.yongce:android-common-ui:${versions.androidLib}",
293+
'androidTest' : "io.github.yongce:android-common-test:${versions.androidLib}"
290294
],
291295

292296
// others

app/build.gradle

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
43
apply from: "${androidModuleCommon}"
54
apply from: '../build_common.gradle'
65

76
android {
87
defaultConfig {
98
applicationId "me.ycdev.android.devtools"
109
minSdkVersion versions.minSdk
11-
targetSdkVersion 30
10+
targetSdkVersion 31
1211

1312
versionName getAppVersionNameBase() // + build type suffix
1413
versionCode getAppVersionCodeBase() * 10000 + calculatedVersionCode
@@ -63,7 +62,6 @@ dependencies {
6362
implementation deps.androidx.constraintLayout
6463
implementation deps.androidx.recyclerview
6564
implementation deps.lifecycle.runtimeKtx
66-
implementation deps.lifecycle.extensions
6765
implementation deps.lifecycle.viewModelKtx
6866
implementation deps.lifecycle.liveDataKtx
6967
implementation deps.gson

app/src/main/AndroidManifest.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
<uses-permission android:name="android.permission.BLUETOOTH" />
77
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
8+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
89
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
910
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
1011
<uses-permission android:name="android.permission.INTERNET" />
@@ -49,7 +50,8 @@
4950
<activity
5051
android:name=".LauncherActivity"
5152
android:label="@string/app_name"
52-
android:theme="@style/AppTheme.NoActionBar">
53+
android:theme="@style/AppTheme.NoActionBar"
54+
android:exported="true">
5355
<intent-filter>
5456
<action android:name="android.intent.action.MAIN" />
5557

app/src/main/java/me/ycdev/android/devtools/LauncherActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import androidx.drawerlayout.widget.DrawerLayout
1212
import com.google.android.material.navigation.NavigationView
1313
import com.google.android.material.navigation.NavigationView.OnNavigationItemSelectedListener
1414
import com.google.android.material.snackbar.Snackbar
15-
import java.util.ArrayList
1615
import me.ycdev.android.devtools.apps.installed.InstalledAppsActivity
1716
import me.ycdev.android.devtools.apps.running.RunningAppsActivity
1817
import me.ycdev.android.devtools.contacts.ContactsActivity
@@ -23,6 +22,7 @@ import me.ycdev.android.devtools.sampler.AppsSamplerActivity
2322
import me.ycdev.android.devtools.security.SecurityScannerActivity
2423
import me.ycdev.android.lib.commonui.activity.GridEntriesActivity
2524
import timber.log.Timber
25+
import java.util.ArrayList
2626

2727
open class LauncherActivity : GridEntriesActivity(), OnNavigationItemSelectedListener {
2828
private lateinit var drawer: DrawerLayout

app/src/main/java/me/ycdev/android/devtools/apps/installed/InstalledAppsAdapter.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import android.view.View
77
import android.view.ViewGroup
88
import androidx.core.content.ContextCompat
99
import androidx.recyclerview.widget.RecyclerView
10-
import java.util.Collections
11-
import java.util.Comparator
1210
import me.ycdev.android.devtools.R
1311
import me.ycdev.android.devtools.apps.installed.InstalledAppsAdapter.ViewHolder
1412
import me.ycdev.android.devtools.databinding.InstalledAppsItemBinding
1513
import me.ycdev.android.lib.common.apps.AppInfo
1614
import timber.log.Timber
15+
import java.util.Collections
16+
import java.util.Comparator
1717

1818
internal class InstalledAppsAdapter(cxt: Context) : RecyclerView.Adapter<ViewHolder>() {
1919
private lateinit var defaultTextColor: ColorStateList

app/src/main/java/me/ycdev/android/devtools/apps/running/RunningAppInfo.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package me.ycdev.android.devtools.apps.running
22

3+
import me.ycdev.android.lib.common.apps.AppInfo
34
import java.text.Collator
45
import java.util.ArrayList
56
import java.util.Comparator
6-
import me.ycdev.android.lib.common.apps.AppInfo
77

88
data class RunningAppInfo(val pkgName: String) {
99
data class ProcInfo(val pid: Int) {

app/src/main/java/me/ycdev/android/devtools/apps/running/RunningAppsViewModel.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import androidx.lifecycle.AndroidViewModel
99
import androidx.lifecycle.LiveData
1010
import androidx.lifecycle.MutableLiveData
1111
import androidx.lifecycle.viewModelScope
12-
import java.util.ArrayList
13-
import java.util.Collections
14-
import java.util.HashMap
1512
import kotlinx.coroutines.Dispatchers
1613
import kotlinx.coroutines.delay
1714
import kotlinx.coroutines.isActive
@@ -20,6 +17,9 @@ import kotlinx.coroutines.withContext
2017
import me.ycdev.android.devtools.apps.running.RunningAppInfo.AppNameComparator
2118
import me.ycdev.android.devtools.apps.running.RunningAppInfo.ProcInfo
2219
import timber.log.Timber
20+
import java.util.ArrayList
21+
import java.util.Collections
22+
import java.util.HashMap
2323

2424
class RunningAppsViewModel(val app: Application) : AndroidViewModel(app) {
2525
private var _apps: MutableLiveData<List<RunningAppInfo>> = MutableLiveData()

app/src/main/java/me/ycdev/android/devtools/apps/selector/AppsSelectorActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import androidx.lifecycle.Observer
99
import androidx.lifecycle.ViewModelProvider
1010
import androidx.recyclerview.widget.DividerItemDecoration
1111
import androidx.recyclerview.widget.LinearLayoutManager
12-
import java.util.ArrayList
1312
import me.ycdev.android.arch.activity.AppCompatBaseActivity
1413
import me.ycdev.android.devtools.R
1514
import me.ycdev.android.devtools.apps.selector.AppsSelectorAdapter.SelectedAppsChangeListener
1615
import me.ycdev.android.devtools.databinding.ActAppsSelectorBinding
1716
import me.ycdev.android.lib.common.apps.AppInfo.AppNameComparator
1817
import me.ycdev.android.lib.common.wrapper.IntentHelper
1918
import timber.log.Timber
19+
import java.util.ArrayList
2020

2121
class AppsSelectorActivity : AppCompatBaseActivity(), SelectedAppsChangeListener, OnClickListener {
2222
private lateinit var binding: ActAppsSelectorBinding

0 commit comments

Comments
 (0)