Skip to content

Commit

Permalink
[packages] fix another gradle 8 warnings (#22609)
Browse files Browse the repository at this point in the history
# Why

there are other gradle 8 build warnings:

```
> Task :expo:processReleaseManifest
package="expo.core" found in source AndroidManifest.xml: /home/runner/work/expo/expo/packages/expo/android/src/main/AndroidManifest.xml.
Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace
This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.
```

# How

migrate `package` in **AndroidManifest.xml** to `namespace` in **build.gradle**

# Test Plan

ci passed
  • Loading branch information
Kudo committed May 24, 2023
1 parent fd0f6df commit 3a04781
Show file tree
Hide file tree
Showing 218 changed files with 243 additions and 234 deletions.
4 changes: 2 additions & 2 deletions packages/expo-application/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

### 📚 3rd party library updates

- Updated `robolectric` to `4.10` and `junit` to `4.13.2`. ([#22395](https://github.com/expo/expo/pull/22395) by [@josephyanks](https://github.com/josephyanks))
- Updated `robolectric` to `4.10` and `junit` to `4.13.2`. ([#22395](https://github.com/expo/expo/pull/22395) by [@josephyanks](https://github.com/josephyanks))

### 🛠 Breaking changes

### 🎉 New features

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-application/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.application"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<manifest package="expo.modules.application"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
2 changes: 1 addition & 1 deletion packages/expo-av/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-av/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.av"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
4 changes: 1 addition & 3 deletions packages/expo-av/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

<manifest package="expo.modules.av">
<manifest>

</manifest>

2 changes: 1 addition & 1 deletion packages/expo-background-fetch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-background-fetch/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.backgroundfetch"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest package="expo.modules.backgroundfetch" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
</manifest>
2 changes: 1 addition & 1 deletion packages/expo-barcode-scanner/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-barcode-scanner/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.barcodescanner"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest package="expo.modules.barcodescanner" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.CAMERA" />
</manifest>
4 changes: 2 additions & 2 deletions packages/expo-battery/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

### 📚 3rd party library updates

- Updated `robolectric` to `4.10` and `junit` to `4.13.2`. ([#22395](https://github.com/expo/expo/pull/22395) by [@josephyanks](https://github.com/josephyanks))
- Updated `robolectric` to `4.10` and `junit` to `4.13.2`. ([#22395](https://github.com/expo/expo/pull/22395) by [@josephyanks](https://github.com/josephyanks))

### 🛠 Breaking changes

### 🎉 New features

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-battery/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.battery"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-battery/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<manifest package="expo.modules.battery">
<manifest>
</manifest>
2 changes: 1 addition & 1 deletion packages/expo-blur/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
### 🐛 Bug fixes

- [iOS] Fixed Detox tests hanging when `BlurView` is present ([#22439](https://github.com/expo/expo/pull/22439) by [@behenate](https://github.com/behenate))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-blur/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.blur"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-blur/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<manifest package="expo.modules.blur">
<manifest>
</manifest>
2 changes: 1 addition & 1 deletion packages/expo-branch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-branch/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.branch"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-branch/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<manifest package="expo.modules.branch">
<manifest>
</manifest>
2 changes: 1 addition & 1 deletion packages/expo-brightness/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-brightness/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.brightness"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<manifest package="expo.modules.brightness">
<manifest>
</manifest>
2 changes: 1 addition & 1 deletion packages/expo-calendar/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-calendar/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.calendar"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
4 changes: 1 addition & 3 deletions packages/expo-calendar/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="expo.modules.calendar">

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<queries>
<intent>
<!-- Required for opening event in calendar if targeting API 30 -->
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-camera/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-camera/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.camera"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-camera/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest package="expo.modules.camera" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.CAMERA" />
</manifest>
2 changes: 1 addition & 1 deletion packages/expo-cellular/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-cellular/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.cellular"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<manifest package="expo.modules.cellular">
<manifest>
</manifest>
4 changes: 2 additions & 2 deletions packages/expo-clipboard/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

### 📚 3rd party library updates

- Updated `robolectric` to `4.10`. ([#22395](https://github.com/expo/expo/pull/22395) by [@josephyanks](https://github.com/josephyanks))
- Updated `robolectric` to `4.10`. ([#22395](https://github.com/expo/expo/pull/22395) by [@josephyanks](https://github.com/josephyanks))

### 🛠 Breaking changes

### 🎉 New features

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-clipboard/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.clipboard"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
3 changes: 1 addition & 2 deletions packages/expo-clipboard/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest package="expo.modules.clipboard"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<provider
android:name=".ClipboardFileProvider"
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-constants/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-constants/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.constants"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
4 changes: 1 addition & 3 deletions packages/expo-constants/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

<manifest package="expo.modules.constants">
<manifest>

</manifest>

2 changes: 1 addition & 1 deletion packages/expo-contacts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-contacts/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.contacts"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="expo.modules.contacts">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<queries>
<intent>
<action android:name="android.intent.action.SEND" />
Expand Down
4 changes: 2 additions & 2 deletions packages/expo-crypto/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### 📚 3rd party library updates

- Updated `robolectric` to `4.10` and `junit` to `4.13.2`. ([#22395](https://github.com/expo/expo/pull/22395) by [@josephyanks](https://github.com/josephyanks))
- Updated `robolectric` to `4.10` and `junit` to `4.13.2`. ([#22395](https://github.com/expo/expo/pull/22395) by [@josephyanks](https://github.com/josephyanks))

### 🛠 Breaking changes

Expand All @@ -13,7 +13,7 @@
### 🐛 Bug fixes

- Return lower case UUID on iOS. ([#22509](https://github.com/expo/expo/pull/22509) by [@LinusU](https://github.com/LinusU))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-crypto/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ android {
jvmTarget = JavaVersion.VERSION_11.majorVersion
}

namespace "expo.modules.crypto"
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
4 changes: 1 addition & 3 deletions packages/expo-crypto/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

<manifest package="expo.modules.crypto">
<manifest>

</manifest>

2 changes: 1 addition & 1 deletion packages/expo-dev-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### 🐛 Bug fixes

- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537) by [@kudo](https://github.com/kudo))
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))

### 💡 Others

Expand Down
1 change: 1 addition & 0 deletions packages/expo-dev-client/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ buildscript {

android {
compileSdkVersion safeExtGet("compileSdkVersion", 33)
namespace "expo.modules.devclient"
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="expo.modules.devclient">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<activity
Expand Down

0 comments on commit 3a04781

Please sign in to comment.