Skip to content

Commit 5ff52a7

Browse files
committed
Upgrade to AGP 8.1.0 and kotlin 1.8.20.
Use AGP Upgrade Assistant to upgrade all projects to AGP 8.1.0 and follow recommendations on deprecated attributes, including: - rename compileSdkVersion to compileSdk - remove buildToolsVersion as its now bundled with AGP
1 parent 2fc9a4c commit 5ff52a7

File tree

118 files changed

+251
-222
lines changed

Some content is hidden

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

118 files changed

+251
-222
lines changed

Diff for: integration/ServiceTestRuleSample/app/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 33
5-
buildToolsVersion rootProject.buildToolsVersion
4+
compileSdk 33
65
defaultConfig {
76
applicationId "com.example.android.testing.integrationtesting.ServiceTestRuleSample"
87
minSdkVersion 14
@@ -12,9 +11,6 @@ android {
1211

1312
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1413
}
15-
lintOptions {
16-
abortOnError false
17-
}
1814
productFlavors {
1915
}
2016
testOptions {
@@ -31,6 +27,10 @@ android {
3127
}
3228
}
3329
}
30+
namespace 'com.example.android.testing.ServiceTestRuleSample'
31+
lint {
32+
abortOnError false
33+
}
3434
}
3535

3636
dependencies {

Diff for: integration/ServiceTestRuleSample/app/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
-->
1717

1818

19-
<manifest package="com.example.android.testing.ServiceTestRuleSample"
20-
xmlns:android="http://schemas.android.com/apk/res/android">
19+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2120

2221
<application
2322
android:icon="@mipmap/ic_launcher"

Diff for: integration/ServiceTestRuleSample/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.agpVersion = "7.3.1"
4+
ext.agpVersion = '8.1.0'
55
repositories {
66
// Insert local test repo here
77
google()

Diff for: integration/ServiceTestRuleSample/gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19+
android.defaults.buildfeatures.buildconfig=true
20+
android.nonFinalResIds=false
21+
android.nonTransitiveRClass=false
1922
android.useAndroidX=true
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: runner/AndroidJunitRunnerSample/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ apply plugin: 'com.android.application'
22

33

44
android {
5-
compileSdkVersion 33
6-
buildToolsVersion rootProject.buildToolsVersion
5+
compileSdk 33
76
defaultConfig {
87
applicationId "com.example.android.testing.androidjunitrunnersample"
98
minSdkVersion 14
@@ -39,6 +38,7 @@ android {
3938

4039
useLibrary 'android.test.base'
4140
useLibrary 'android.test.mock'
41+
namespace 'com.example.android.testing.androidjunitrunnersample'
4242

4343
}
4444

Diff for: runner/AndroidJunitRunnerSample/app/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
limitations under the License.
1616
-->
1717

18-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
package="com.example.android.testing.androidjunitrunnersample" >
18+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2019

2120
<application
2221
android:icon="@drawable/ic_launcher"

Diff for: runner/AndroidJunitRunnerSample/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.agpVersion = "7.3.1"
4+
ext.agpVersion = '8.1.0'
55
repositories {
66
// Insert local test repo here
77
google()

Diff for: runner/AndroidJunitRunnerSample/gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19+
android.defaults.buildfeatures.buildconfig=true
20+
android.nonFinalResIds=false
21+
android.nonTransitiveRClass=false
1922
android.useAndroidX=true
2023
android.useAndroidX=true
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: runner/AndroidTestOrchestratorSample/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 33
5-
buildToolsVersion rootProject.buildToolsVersion
4+
compileSdk 33
65
defaultConfig {
76
applicationId "com.example.android.testing.androidtestorchestratorsample"
87
minSdkVersion 14
@@ -37,6 +36,7 @@ android {
3736
}
3837
}
3938
}
39+
namespace 'com.example.android.testing.androidtestorchestratorsample'
4040
}
4141

4242
dependencies {

Diff for: runner/AndroidTestOrchestratorSample/app/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
limitations under the License.
1616
-->
1717

18-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
package="com.example.android.testing.androidtestorchestratorsample" >
18+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2019

2120
<application
2221
android:icon="@drawable/ic_launcher"

Diff for: runner/AndroidTestOrchestratorSample/build.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.agpVersion = "7.3.1"
4+
ext.agpVersion = '8.1.0'
55
repositories {
66
// Insert local test repo here
77
google()
@@ -24,7 +24,6 @@ allprojects {
2424
}
2525

2626
ext {
27-
buildToolsVersion = "32.0.0"
2827
androidxAnnotationVersion = "1.5.0"
2928
guavaVersion = "31.1-android"
3029
coreVersion = "1.6.0-alpha01"

Diff for: runner/AndroidTestOrchestratorSample/gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19+
android.defaults.buildfeatures.buildconfig=true
20+
android.nonFinalResIds=false
21+
android.nonTransitiveRClass=false
1922
android.useAndroidX=true
2023
android.useAndroidX=true
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: runner/AndroidTestOrchestratorWithTestCoverageSample/app/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 31
5-
buildToolsVersion rootProject.buildToolsVersion
4+
compileSdk 33
65
defaultConfig {
76
applicationId "com.example.android.testing.androidtestorchestratorsample"
87
minSdkVersion 14
9-
targetSdkVersion 31
8+
targetSdkVersion 33
109
versionCode 1
1110
versionName "1.0"
1211

@@ -22,6 +21,7 @@ android {
2221
testOptions {
2322
execution 'ANDROIDX_TEST_ORCHESTRATOR'
2423
}
24+
namespace 'com.example.android.testing.androidtestorchestratorsample'
2525
}
2626

2727
dependencies {

Diff for: runner/AndroidTestOrchestratorWithTestCoverageSample/app/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
limitations under the License.
1616
-->
1717

18-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
package="com.example.android.testing.androidtestorchestratorsample" >
18+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2019

2120
<application
2221
android:icon="@drawable/ic_launcher"

Diff for: runner/AndroidTestOrchestratorWithTestCoverageSample/build.gradle

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.agpVersion = "7.3.0-beta01"
4+
ext.agpVersion = '8.1.0'
55
repositories {
66
// Insert local test repo here
77
google()
@@ -24,15 +24,14 @@ allprojects {
2424
}
2525

2626
ext {
27-
buildToolsVersion = "31.0.0"
2827
androidxAnnotationVersion = "1.2.0"
2928
guavaVersion = "30.1.1-android"
30-
coreVersion = "1.4.1-alpha03"
31-
extJUnitVersion = "1.1.4-alpha03"
32-
runnerVersion = "1.4.1-alpha03"
33-
rulesVersion = "1.4.1-alpha03"
34-
testServicesVersion = "1.4.1-alpha03"
35-
orchestratorVersion = "1.4.1-alpha03"
36-
espressoVersion = "3.5.0-alpha03"
29+
coreVersion = "1.6.0-alpha01"
30+
extJUnitVersion = "1.2.0-alpha01"
31+
runnerVersion = "1.6.0-alpha03"
32+
rulesVersion = "1.6.0-alpha01"
33+
testServicesVersion = "1.5.0-alpha01"
34+
orchestratorVersion = "1.5.0-alpha01"
35+
espressoVersion = "3.6.0-alpha01"
3736
truthVersion = "1.1.3"
3837
}

Diff for: runner/AndroidTestOrchestratorWithTestCoverageSample/gradle.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
1919
android.useAndroidX=true
20-
android.enableAdditionalTestOutput=false
20+
android.enableAdditionalTestOutput=false
21+
android.defaults.buildfeatures.buildconfig=true
22+
android.nonTransitiveRClass=false
23+
android.nonFinalResIds=false
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Wed Jun 01 11:09:45 PDT 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
44
distributionPath=wrapper/dists
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

Diff for: ui/espresso/AccessibilitySample/app/build.gradle

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 33
5-
buildToolsVersion rootProject.buildToolsVersion
4+
compileSdk 33
65
defaultConfig {
76
applicationId "com.example.android.testing.espresso.AccessibilitySample"
87
minSdkVersion 14
@@ -14,9 +13,6 @@ android {
1413

1514
multiDexEnabled true
1615
}
17-
lintOptions {
18-
abortOnError false
19-
}
2016
productFlavors {
2117
}
2218
testOptions {
@@ -40,6 +36,11 @@ android {
4036
sourceCompatibility JavaVersion.VERSION_1_8
4137
targetCompatibility JavaVersion.VERSION_1_8
4238
}
39+
namespace 'com.example.android.testing.espresso.AccessibilitySample'
40+
testNamespace 'com.example.android.testing.espresso.AccessibilitySample.test'
41+
lint {
42+
abortOnError false
43+
}
4344
}
4445

4546

Diff for: ui/espresso/AccessibilitySample/app/src/androidTest/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
-->
1717
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:tools="http://schemas.android.com/tools"
19-
package="com.example.android.testing.espresso.AccessibilitySample.test"
20-
android:versionCode="1"
19+
android:versionCode="1"
2120
android:versionName="1.0">
2221

2322
<instrumentation android:targetPackage="com.example.android.testing.espresso.AccessibilitySample"

Diff for: ui/espresso/AccessibilitySample/app/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
~ limitations under the License.
1616
-->
1717

18-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
package="com.example.android.testing.espresso.AccessibilitySample" >
18+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2019

2120
<application
2221
android:icon="@drawable/ic_launcher"

Diff for: ui/espresso/AccessibilitySample/build.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
buildscript {
44
ext.kotlinVersion = "1.7.10"
5-
ext.agpVersion = "7.3.1"
5+
ext.agpVersion = '8.1.0'
66
repositories {
77
// Insert local test repo here
88
google()
@@ -26,7 +26,6 @@ allprojects {
2626
}
2727

2828
ext {
29-
buildToolsVersion = "32.0.0"
3029
androidxAnnotationVersion = "1.5.0"
3130
robolectricVersion = "4.9"
3231
extTruthVersion = "1.6.0-alpha01"

Diff for: ui/espresso/AccessibilitySample/gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19+
android.defaults.buildfeatures.buildconfig=true
20+
android.nonFinalResIds=false
21+
android.nonTransitiveRClass=false
1922
android.useAndroidX=true
2023

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: ui/espresso/BasicSample/app/build.gradle

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ apply plugin: 'com.android.application'
22

33
apply plugin: 'kotlin-android'
44

5-
apply plugin: 'kotlin-android-extensions'
6-
75
android {
8-
compileSdkVersion 33
9-
buildToolsVersion rootProject.buildToolsVersion
6+
compileSdk 33
107
defaultConfig {
118
applicationId "com.example.android.testing.espresso.BasicSample"
129
minSdkVersion 14
@@ -16,9 +13,6 @@ android {
1613

1714
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1815
}
19-
lintOptions {
20-
abortOnError false
21-
}
2216
productFlavors {
2317
}
2418
testOptions {
@@ -39,6 +33,11 @@ android {
3933
}
4034
}
4135
}
36+
namespace 'com.example.android.testing.espresso.BasicSample'
37+
testNamespace 'com.example.android.testing.espresso.BasicSample.test'
38+
lint {
39+
abortOnError false
40+
}
4241
}
4342

4443
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {

Diff for: ui/espresso/BasicSample/app/src/androidTest/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
-->
1717
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:tools="http://schemas.android.com/tools"
19-
package="com.example.android.testing.espresso.BasicSample.test"
20-
android:versionCode="1"
19+
android:versionCode="1"
2120
android:versionName="1.0">
2221

2322
<instrumentation android:targetPackage="com.example.android.testing.espresso.BasicSample"

0 commit comments

Comments
 (0)