Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loaded Android Gradle Plugin Conditionally #18

Merged
merged 1 commit into from
Aug 9, 2023
Merged

loaded Android Gradle Plugin Conditionally #18

merged 1 commit into from
Aug 9, 2023

Conversation

SaeedZhiany
Copy link
Contributor

This wraps the Android Gradle plugin dependency in the buildscripts section of android/build.gradle in a conditional:

if (project == rootProject) {
    // ... (dependency here)
}

The Android Gradle plugin is only required when opening the project stand-alone, not when it is included as a dependency. By doing this, the project opens correctly in Android Studio, and it can also be consumed as a native module dependency from an application project without affecting the app project (avoiding unnecessary downloads/conflicts/etc).

for more info, you can refer to this thread and especially this comment.

@wn-na
Copy link
Owner

wn-na commented Aug 9, 2023

Thanks for the great way to do it :)
It's nice to get rid of an unnecessary step.

I'll include this in the next 1.8.0 release. LGTM @SaeedZhiany

@wn-na wn-na merged commit 1048304 into wn-na:main Aug 9, 2023
@SaeedZhiany SaeedZhiany deleted the Load-APG-Conditionally branch August 10, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants