Skip to content

Commit

Permalink
fix: Support AGP8 namespace (hyochan#467)
Browse files Browse the repository at this point in the history
First, thanks for the great package.

Now, Flutter supports `AGP8`, so I try to use it.

But, I got the following error.

```
Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
ain
```

And, I realize `flutter_inapp_purchase` doesn't support the `namespace`.

This PR is not perfect to support the `AGP8`, but it can fix the
`namespace` issue simply.

Reference
-
flutter/flutter#125181 (comment)
-
flutter/flutter#125621 (comment)
  • Loading branch information
joy.chen committed Jun 17, 2024
1 parent 8096468 commit e1df75f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
if (project.android.hasProperty('namespace')) {
namespace 'com.dooboolab.flutterinapppurchase'
}
compileSdkVersion 33

defaultConfig {
Expand Down

0 comments on commit e1df75f

Please sign in to comment.