added android build/gradle namespace to support AGP >= 7
Hi @kenjdavidson, I just raised a PR to add support for React Native that requires AGP >= 7? Thanks
I've been away from this for a while, is this going to be a breaking change to the current version?
IE. should this be up-versioned to 0.74.x or whatever the react native version is that this was introduced?
Yeah, sorry for the late reply. Google Play was forcing everyone to use SDK 34 by late August, and SDK 34 requires AGP 8. And AGP 8 requires everything to have namespace in the build grade file.
On Mon, 8 Jul 2024 at 20.09 Ken Davidson @.***> wrote:
Merged #327 https://github.com/kenjdavidson/react-native-bluetooth-classic/pull/327 into main.
— Reply to this email directly, view it on GitHub https://github.com/kenjdavidson/react-native-bluetooth-classic/pull/327#event-13423722196, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2QVL7QSREI5RFOBXLPYG3ZLKFPLAVCNFSM6AAAAABKITP7WWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGQZDGNZSGIYTSNQ . You are receiving this because you authored the thread.Message ID: <kenjdavidson/react-native-bluetooth-classic/pull/327/issue_event/13423722196 @github.com>
Merged and released it. Thanks for the contribution.
Ken.
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Ardika Rifqi @.> Sent: Monday, July 8, 2024 7:09:07 PM To: kenjdavidson/react-native-bluetooth-classic @.> Cc: Ken Davidson @.>; State change @.> Subject: Re: [kenjdavidson/react-native-bluetooth-classic] added android build/gradle namespace to support AGP >= 7 (PR #327)
Yeah, sorry for the late reply. Google Play was forcing everyone to use SDK 34 by late August, and SDK 34 requires AGP 8. And AGP 8 requires everything to have namespace in the build grade file.
On Mon, 8 Jul 2024 at 20.09 Ken Davidson @.***> wrote:
Merged #327 https://github.com/kenjdavidson/react-native-bluetooth-classic/pull/327 into main.
— Reply to this email directly, view it on GitHub https://github.com/kenjdavidson/react-native-bluetooth-classic/pull/327#event-13423722196, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2QVL7QSREI5RFOBXLPYG3ZLKFPLAVCNFSM6AAAAABKITP7WWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGQZDGNZSGIYTSNQ . You are receiving this because you authored the thread.Message ID: <kenjdavidson/react-native-bluetooth-classic/pull/327/issue_event/13423722196 @github.com>
— Reply to this email directly, view it on GitHubhttps://github.com/kenjdavidson/react-native-bluetooth-classic/pull/327#issuecomment-2215498157, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABPMJL5OFBWC2C3VHNPNFBDZLMLZHAVCNFSM6AAAAABKITP7WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJVGQ4TQMJVG4. You are receiving this because you modified the open/close state.Message ID: @.***>
Hi,
@kenjdavidson @mardikarifqi
I think this have the wrong namespace. For me this changes what namespace for BuildConfig to kjd.reactnative.android instead of kjd.reactnative.bluetooth so then the imports fails. Just a FYI I have a fairly unclean project with some mismatched dependencies and stuff so I can't be sure if this is a general issue. But removing the change in this PR solved the issue for me.
Best regards Lars
Ugh.. You removed it completely, or you changed it to the kjd.reactnative.bluetooth version?
As I focused on getting the project to build I simply removed it. I can do a quick test to see if my problem is resolved by changing to kjd.reactnative.bluetooth on Monday. If I have the time I will try pushing the project to SDK 34 and see if I can recreate the problem @mardikarifqi encountered and see if it is also solved with kjd.reactnative.bluetooth.
Sorry for not being more helpful, no pressure from my side on fixing it. I just wanted to report what I saw, for me I for now is using an older version of the library.
No worries, I appreciate whatever information you can provide. This may be something that just gets reverted and lets individual project maintainers fix what needs to happen on their own if there is no consistency. Not the greatest, but better than breaking a whole bunch of projects.
Apologies to anyone breaking because of this.
Finally I knew this would be painful but it was worse then expected.
But anyway I tested with namespace kjd.reactnative.bluetooth with AGP 7.2.2 (original in my project) and I could build and run the project.
Then I tested with upgrading the project to AGP 8.2.1 got the missing namespace error and added the code from this PR manually with kjd.reactnative.bluetooth and got it to build. The app doesn't start due to issues in rendering functions but that is very likely due to incompatibilities between the project code and the upgrade dependencies. Sadly I can not put more time into this now as I will not update the project to AGP 8 at this moment.
So it looks like just changing the namespace is the correct solution but no promises.
At this point I've reverted the changes to get peoples automation working. I don't have much time to spend on this, and I don't do a lot of Mobile development anymore, so I'm going to need to trust in you guys as the primary users to determine the best course of action.
Ahh I understand. Sadly you should not trust in me. This is my first react-native project and the project was developed by other developers so I'm learning by deep diving :smile:. All I can add other then the above is that while going thru a lot of other dependencies in the project quite a few of them added the same or similar logic as this pull request. So it looks reasonable in that way.
That'll happen. Well if you figure out how to get it working with the content of the PR within the project, then I'd be happy to re-apply it, if it looks like it's consistent across other libraries, and the issue seems like it's specific to your project, then I agree, we should put it back.