Skip to content

Commit 1970f75

Browse files
committed
Build: Move package from android manifest to build files
This is an AGP version '8.0' breaking change that requires 'namespace' in module-level build scripts, see build failure below: ------------------------------------------------------------------------ FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > Could not create an instance of type com.android.build.api.variant.impl.ApplicationVariantImpl. > Namespace not specified. Please specify a namespace in the module's build.gradle file like so: android { namespace 'com.example.namespace' } If the package attribute is specified in the source AndroidManifest.xml, it can be migrated automatically to the namespace value in the build.gradle file using the AGP Upgrade Assistant; please refer to https://developer.android.com/studio/ build/agp-upgrade-assistant for more information. ------------------------------------------------------------------------ Explanation: "You must set the namespace in the module-level 'build.gradle.kts' file, rather than the manifest file." For more info see: https://developer.android.com/build/releases/ gradle-plugin#namespace-dsl
1 parent 9097386 commit 1970f75

File tree

14 files changed

+21
-18
lines changed

14 files changed

+21
-18
lines changed

app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ plugins {
44
}
55

66
android {
7+
namespace "org.wordpress.aztec.demo"
8+
79
compileSdkVersion rootProject.compileSdkVersion
810

911
defaultConfig {

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<manifest
2-
xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.wordpress.aztec.demo">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<!-- Required for downloading images -->
65
<uses-permission android:name="android.permission.INTERNET" />

aztec/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {

aztec/src/main/AndroidManifest.xml

Lines changed: 0 additions & 3 deletions
This file was deleted.

glide-loader/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec.glideloader"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {

glide-loader/src/main/AndroidManifest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<manifest
2-
xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.wordpress.aztec.glideloader">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

media-placeholders/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec.placeholders"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {

media-placeholders/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.wordpress.aztec.placeholders">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

picasso-loader/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec.picassoloader"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {

picasso-loader/src/main/AndroidManifest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<manifest
2-
xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.wordpress.aztec.picassoloader">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

0 commit comments

Comments
 (0)