Closed timokz closed 9 months ago
lgtm 👍🏻
Hey @timokz
Check in the android/build.gradle
file, I think it should be com.onesignal.flutter
and not com.onesignal.onesignalexample
Hi @timokz thank you for submitting this PR, we did approve a contributor's PR for this same issue.
Is the removal of the package name in the Android Manifest file necessary?
Hey @nan-li thanks for the maintenance! Now I can go back to using the original dependence.
Regarding the manifest files: It is recommended and also applied by the AGP upgrade assistant . My pr also includes the upgrade for the example project.
You can verify that by running the assistant in a project of yours or (not ideal) checking this screenshot in the official docs
Regarding the manifest files: It is recommended and also applied by the AGP upgrade assistant . My pr also includes the upgrade for the example project.
You can verify that by running the assistant in a project of yours or (not ideal) checking this screenshot in the official docs
Ahh ok, thank you @timokz , I understand!
I don't think we are ready to port our projects over to AGP 8, since it will certainly break some colleagues' setups.
We have released the namespace
support for the OneSignal Flutter SDK on both Release 3.5.2 and Release 5.1.0, so I will close this PR.
Thanks again for submitting this PR!
Description
One Line Summary
Enables building apps with agp =< 8.0
Details
Motivation
As this helpful PR already attempted, for apps using Gradle 8.0 or greater, moving the namespace declaration from the
AndroidManifest.xml
files is necessary. The other PR has a minor syntax error and doesnt delete the conflicting declaration in the xml files.Otherwise developers will be confronted with this error:
Or other, more obscure warnings thrown by the gradle wrapper.
Scope
None of the actual source is changed, the changes are contained to the android directory of the package and the example app.
Other
I've also updated the AndroidManifest.xml files to have their namespace declaration, e.g.
package="com.onesignal.onesignalexample"
in the<manifest>
tag removed, as the AGP upgrade agent would also refactor to be in line with the newer gradle versions.Manual testing
Tested building the example and my own app, using flutter sdks 3.16.5 and 3.13.0, respectively. All features in the example app work as intended. They also shouldn't be affected by my changes.
Affected code checklist
None apply, buildscripts are affected.
Checklist
Overview
Testing
Final pass
This change is