fix gradle setup#381
fix gradle setup#381dulmandakh wants to merge 1 commit intoFormidableLabs:masterfrom dulmandakh:fix-gradle-setup
Conversation
|
@kadikraman please review and merge |
|
Hi @dulmandakh - With the Android Gradle plugin removed, we're no longer able to open the |
|
Okay sorry - I didn't see you moved the Gradle files into the root directory. Since Gradle files are only Android related, wouldn't it be better to keep them contained in the I'm also still trying to understand what exactly the problem is with a nested Android Gradle plugin - It should not be used if it's not declared in the root of the project (i.e. included as a module by other projects). |
|
In the past, I had many conflicts by modules that trying to load different versions of Android Gradle Plugin, thus causing build failures. This PR tries to resolve the issue moving AGP outside of the module. I too want to contain everything Android in android folder, but I found this. I would be more than happy if you bring alternate solution to table. |
|
@dulmandakh - Yes, makes total sense. I actually found an alternate solution that results in the same outcome, without moving any Gradle related files into the root of a project. Essentially, it's just two lines, wrapping the Android Gradle plugin dependency in the With this, the dependency is only evaluated (and possibly downloaded) when the project is opened stand-alone (opening the When a library project is included as a dependency, then I opened a PR with the alternative approach here, which also includes a bit more description: #384 Please check 🙏 |
Description
This PR removes Android Gradle Plugin use in android folder or RN module, so that it won't create conflicts if version mismatches. Then creates a root gradle project, build.gradle.kts at root folder, so we can use it with Android Studio.
Also removed buildToolsVersion because it's been deprecated a long ago.
Steps to verify
Still can be used as RN module as before, but to develop you need to open not android folder but root folder with Android Studio.