Migrate from AndroidManifest to build.gradle for namespace
AGP has deprecated use of packageName in AndroidManifest and
instead wants everyone to use `android { namespace = "foo" }`
in build.gradle files.
Test: ./gradlew tasks -> still passes
Change-Id: I4fa03cacc7214011f3797c36dcb76c2984c7bf52
diff --git a/benchmark/benchmark-common/build.gradle b/benchmark/benchmark-common/build.gradle
index 5fbee5b..d298309 100644
--- a/benchmark/benchmark-common/build.gradle
+++ b/benchmark/benchmark-common/build.gradle
@@ -36,6 +36,7 @@
"androidx/traceprocessor/testdata"
)
}
+ namespace "androidx.benchmark"
}
wire {
diff --git a/benchmark/benchmark-common/src/androidTest/AndroidManifest.xml b/benchmark/benchmark-common/src/androidTest/AndroidManifest.xml
index bcc3cf4..ad651b2 100644
--- a/benchmark/benchmark-common/src/androidTest/AndroidManifest.xml
+++ b/benchmark/benchmark-common/src/androidTest/AndroidManifest.xml
@@ -15,8 +15,7 @@
limitations under the License.
-->
<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.benchmark.test">
+ xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:name="androidx.benchmark.ArgumentInjectingApplication"/>
diff --git a/benchmark/benchmark-common/src/main/AndroidManifest.xml b/benchmark/benchmark-common/src/main/AndroidManifest.xml
index 4f7502e..816bb5d 100644
--- a/benchmark/benchmark-common/src/main/AndroidManifest.xml
+++ b/benchmark/benchmark-common/src/main/AndroidManifest.xml
@@ -14,8 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<manifest package="androidx.benchmark"
- xmlns:android="http://schemas.android.com/apk/res/android">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is needed to write benchmark report data to an external directory during instrumented
tests to allow the accompanying androidx.benchmark gradle plugin to pull the reports onto host
diff --git a/benchmark/benchmark-junit4/build.gradle b/benchmark/benchmark-junit4/build.gradle
index 81f1e29..3ee2141 100644
--- a/benchmark/benchmark-junit4/build.gradle
+++ b/benchmark/benchmark-junit4/build.gradle
@@ -26,6 +26,7 @@
defaultConfig {
testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner"
}
+ namespace "androidx.benchmark.junit4"
}
dependencies {
diff --git a/benchmark/benchmark-junit4/src/androidTest/AndroidManifest.xml b/benchmark/benchmark-junit4/src/androidTest/AndroidManifest.xml
index 7398a5f..ec0893fc 100644
--- a/benchmark/benchmark-junit4/src/androidTest/AndroidManifest.xml
+++ b/benchmark/benchmark-junit4/src/androidTest/AndroidManifest.xml
@@ -15,8 +15,7 @@
limitations under the License.
-->
<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.benchmark.junit4.test">
+ xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:name="androidx.benchmark.junit4.ArgumentInjectingApplication">
diff --git a/benchmark/benchmark-junit4/src/main/AndroidManifest.xml b/benchmark/benchmark-junit4/src/main/AndroidManifest.xml
index ee4f8b9..cf0d807 100644
--- a/benchmark/benchmark-junit4/src/main/AndroidManifest.xml
+++ b/benchmark/benchmark-junit4/src/main/AndroidManifest.xml
@@ -14,4 +14,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<manifest package="androidx.benchmark.junit4"/>
+<manifest />
diff --git a/benchmark/benchmark-macro-junit4/build.gradle b/benchmark/benchmark-macro-junit4/build.gradle
index 94a62dc..7e462d5 100644
--- a/benchmark/benchmark-macro-junit4/build.gradle
+++ b/benchmark/benchmark-macro-junit4/build.gradle
@@ -28,6 +28,7 @@
minSdkVersion 23
multiDexEnabled true
}
+ namespace "androidx.benchmark.macro.junit4"
}
dependencies {
diff --git a/benchmark/benchmark-macro-junit4/src/main/AndroidManifest.xml b/benchmark/benchmark-macro-junit4/src/main/AndroidManifest.xml
index ed2a844..5b41847 100644
--- a/benchmark/benchmark-macro-junit4/src/main/AndroidManifest.xml
+++ b/benchmark/benchmark-macro-junit4/src/main/AndroidManifest.xml
@@ -14,4 +14,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<manifest package="androidx.benchmark.macro.junit4" />
+<manifest />
diff --git a/benchmark/benchmark-macro/build.gradle b/benchmark/benchmark-macro/build.gradle
index 88684d1..38c72be 100644
--- a/benchmark/benchmark-macro/build.gradle
+++ b/benchmark/benchmark-macro/build.gradle
@@ -38,6 +38,7 @@
"androidx/traceprocessor/testdata"
)
}
+ namespace "androidx.benchmark.macro"
}
dependencies {
diff --git a/benchmark/benchmark-macro/src/androidTest/AndroidManifest.xml b/benchmark/benchmark-macro/src/androidTest/AndroidManifest.xml
index acd7e21..68145ab 100644
--- a/benchmark/benchmark-macro/src/androidTest/AndroidManifest.xml
+++ b/benchmark/benchmark-macro/src/androidTest/AndroidManifest.xml
@@ -14,8 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.benchmark.macro.test">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!--
The Macro Benchmark Sample needs to launch activities in
`androidx.benchmark.integration.macrobenchmark.target` APK.
diff --git a/benchmark/benchmark-macro/src/main/AndroidManifest.xml b/benchmark/benchmark-macro/src/main/AndroidManifest.xml
index bf2756d..e71c620 100644
--- a/benchmark/benchmark-macro/src/main/AndroidManifest.xml
+++ b/benchmark/benchmark-macro/src/main/AndroidManifest.xml
@@ -15,7 +15,6 @@
~ limitations under the License.
-->
<manifest xmlns:tools="http://schemas.android.com/tools"
- package="androidx.benchmark.macro"
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- QUERY_ALL_PACKAGES is used to enable macrobenchmarks to read package information from
diff --git a/benchmark/benchmark/build.gradle b/benchmark/benchmark/build.gradle
index a69a0a3..000ccb7 100644
--- a/benchmark/benchmark/build.gradle
+++ b/benchmark/benchmark/build.gradle
@@ -30,3 +30,7 @@
androidTestImplementation(libs.junit)
androidTestImplementation(libs.kotlinStdlib)
}
+
+android {
+ namespace "androidx.benchmark.benchmark"
+}
diff --git a/benchmark/benchmark/src/androidTest/AndroidManifest.xml b/benchmark/benchmark/src/androidTest/AndroidManifest.xml
index 573a5bd..097b102 100644
--- a/benchmark/benchmark/src/androidTest/AndroidManifest.xml
+++ b/benchmark/benchmark/src/androidTest/AndroidManifest.xml
@@ -15,8 +15,7 @@
~ limitations under the License.
-->
<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.benchmark.benchmark.test">
+ xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<!-- enable profiling by shell for non-intrusive profiling tools -->
<profileable android:shell="true"/>
diff --git a/benchmark/benchmark/src/main/AndroidManifest.xml b/benchmark/benchmark/src/main/AndroidManifest.xml
index f290972..37aba03 100644
--- a/benchmark/benchmark/src/main/AndroidManifest.xml
+++ b/benchmark/benchmark/src/main/AndroidManifest.xml
@@ -14,5 +14,4 @@
~ limitations under the License.
-->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.benchmark.benchmark"/>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
diff --git a/benchmark/integration-tests/dry-run-benchmark/build.gradle b/benchmark/integration-tests/dry-run-benchmark/build.gradle
index 37da74aa..3326e14 100644
--- a/benchmark/integration-tests/dry-run-benchmark/build.gradle
+++ b/benchmark/integration-tests/dry-run-benchmark/build.gradle
@@ -28,3 +28,7 @@
androidTestImplementation(libs.junit)
androidTestImplementation(libs.kotlinStdlib)
}
+
+android {
+ namespace "androidx.benchmark.integration.dryrun.benchmark"
+}
diff --git a/benchmark/integration-tests/dry-run-benchmark/src/androidTest/AndroidManifest.xml b/benchmark/integration-tests/dry-run-benchmark/src/androidTest/AndroidManifest.xml
index bfb5851..6abf22c 100644
--- a/benchmark/integration-tests/dry-run-benchmark/src/androidTest/AndroidManifest.xml
+++ b/benchmark/integration-tests/dry-run-benchmark/src/androidTest/AndroidManifest.xml
@@ -16,8 +16,7 @@
-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- package="androidx.benchmark.integration.dryrun.benchmark.test">
+ xmlns:tools="http://schemas.android.com/tools">
<!-- NOTE: set debuggable=true below to verify that's not an error in dryRun mode -->
<application
android:name="androidx.benchmark.integration.dryrun.benchmark.ArgumentInjectingApplication"
diff --git a/benchmark/integration-tests/dry-run-benchmark/src/main/AndroidManifest.xml b/benchmark/integration-tests/dry-run-benchmark/src/main/AndroidManifest.xml
index 22daa1a..aeca043 100644
--- a/benchmark/integration-tests/dry-run-benchmark/src/main/AndroidManifest.xml
+++ b/benchmark/integration-tests/dry-run-benchmark/src/main/AndroidManifest.xml
@@ -14,5 +14,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.benchmark.integration.dryrun.benchmark"/>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
diff --git a/benchmark/integration-tests/macrobenchmark-target/build.gradle b/benchmark/integration-tests/macrobenchmark-target/build.gradle
index 20dd547..eeca3ad 100644
--- a/benchmark/integration-tests/macrobenchmark-target/build.gradle
+++ b/benchmark/integration-tests/macrobenchmark-target/build.gradle
@@ -28,6 +28,7 @@
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt")
}
}
+ namespace "androidx.benchmark.integration.macrobenchmark.target"
}
dependencies {
diff --git a/benchmark/integration-tests/macrobenchmark-target/src/main/AndroidManifest.xml b/benchmark/integration-tests/macrobenchmark-target/src/main/AndroidManifest.xml
index b742f04..da19fa4 100644
--- a/benchmark/integration-tests/macrobenchmark-target/src/main/AndroidManifest.xml
+++ b/benchmark/integration-tests/macrobenchmark-target/src/main/AndroidManifest.xml
@@ -15,8 +15,7 @@
-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- package="androidx.benchmark.integration.macrobenchmark.target">
+ xmlns:tools="http://schemas.android.com/tools">
<application
android:label="Jetpack Benchmark Macrobenchmark Target"
diff --git a/benchmark/integration-tests/macrobenchmark/build.gradle b/benchmark/integration-tests/macrobenchmark/build.gradle
index bf5d2a1..0aee23f 100644
--- a/benchmark/integration-tests/macrobenchmark/build.gradle
+++ b/benchmark/integration-tests/macrobenchmark/build.gradle
@@ -26,6 +26,7 @@
defaultConfig {
minSdkVersion 23
}
+ namespace "androidx.benchmark.integration.macrobenchmark"
}
dependencies {
diff --git a/benchmark/integration-tests/macrobenchmark/src/androidTest/AndroidManifest.xml b/benchmark/integration-tests/macrobenchmark/src/androidTest/AndroidManifest.xml
index d0f8ec9..5b41847 100644
--- a/benchmark/integration-tests/macrobenchmark/src/androidTest/AndroidManifest.xml
+++ b/benchmark/integration-tests/macrobenchmark/src/androidTest/AndroidManifest.xml
@@ -14,4 +14,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<manifest package="androidx.benchmark.integration.macrobenchmark.test"/>
+<manifest />
diff --git a/benchmark/integration-tests/macrobenchmark/src/main/AndroidManifest.xml b/benchmark/integration-tests/macrobenchmark/src/main/AndroidManifest.xml
index f2de133..ed173d5 100644
--- a/benchmark/integration-tests/macrobenchmark/src/main/AndroidManifest.xml
+++ b/benchmark/integration-tests/macrobenchmark/src/main/AndroidManifest.xml
@@ -13,4 +13,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<manifest package="androidx.benchmark.integration.macrobenchmark" />
+<manifest />
diff --git a/benchmark/integration-tests/startup-benchmark/build.gradle b/benchmark/integration-tests/startup-benchmark/build.gradle
index 37da74aa..52e6b41 100644
--- a/benchmark/integration-tests/startup-benchmark/build.gradle
+++ b/benchmark/integration-tests/startup-benchmark/build.gradle
@@ -28,3 +28,7 @@
androidTestImplementation(libs.junit)
androidTestImplementation(libs.kotlinStdlib)
}
+
+android {
+ namespace "androidx.benchmark.integration.startup.benchmark"
+}
diff --git a/benchmark/integration-tests/startup-benchmark/src/androidTest/AndroidManifest.xml b/benchmark/integration-tests/startup-benchmark/src/androidTest/AndroidManifest.xml
index ffa7768..a88799f 100644
--- a/benchmark/integration-tests/startup-benchmark/src/androidTest/AndroidManifest.xml
+++ b/benchmark/integration-tests/startup-benchmark/src/androidTest/AndroidManifest.xml
@@ -15,8 +15,7 @@
limitations under the License.
-->
<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.benchmark.integration.startup.benchmark.test">
+ xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:name="androidx.benchmark.integration.startup.benchmark.ArgumentInjectingApplication">
<!-- enable profiling by shell for non-intrusive profiling tools -->
diff --git a/benchmark/integration-tests/startup-benchmark/src/main/AndroidManifest.xml b/benchmark/integration-tests/startup-benchmark/src/main/AndroidManifest.xml
index 9ca25c1..aeca043 100644
--- a/benchmark/integration-tests/startup-benchmark/src/main/AndroidManifest.xml
+++ b/benchmark/integration-tests/startup-benchmark/src/main/AndroidManifest.xml
@@ -14,5 +14,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.benchmark.integration.startup.benchmark"/>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
diff --git a/benchmark/integration-tests/test-module-sample/build.gradle b/benchmark/integration-tests/test-module-sample/build.gradle
index f828b34..5351938 100644
--- a/benchmark/integration-tests/test-module-sample/build.gradle
+++ b/benchmark/integration-tests/test-module-sample/build.gradle
@@ -34,6 +34,7 @@
defaultConfig {
minSdkVersion 28
}
+ namespace "androidx.benchmark.integration.testmodulesample"
}
// note: below is optional, mimicing eventual benchmark module setup
diff --git a/benchmark/integration-tests/test-module-sample/src/main/AndroidManifest.xml b/benchmark/integration-tests/test-module-sample/src/main/AndroidManifest.xml
index 7cf14c3..37fa920 100644
--- a/benchmark/integration-tests/test-module-sample/src/main/AndroidManifest.xml
+++ b/benchmark/integration-tests/test-module-sample/src/main/AndroidManifest.xml
@@ -14,8 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<manifest package="androidx.benchmark.integration.testmodulesample"
- xmlns:android="http://schemas.android.com/apk/res/android">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<queries>
<!--
Enables querying application info with packageManager.getApplicationInfo, to verify