Skip to content

Support external buildscript configurations #1279

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

Closed
vtrifonov opened this issue Feb 13, 2019 · 0 comments
Closed

Support external buildscript configurations #1279

vtrifonov opened this issue Feb 13, 2019 · 0 comments
Assignees
Labels
needs docs Documentation is needed before closing
Milestone

Comments

@vtrifonov
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When using a plugin like this one there are some buildscript configurations which need to be added in the application build.gradle file. Unfortunately this cannot be achieved through the app.gradle file nor through plugin's include.gradle files. They are being applied too late and the changes in the buildscript are not taken into account.

Describe the solution you'd like
To make an external buildscript work it should be applied by the following way:

buildscript {
    apply from: "path/to/buildscript.gradle", to: buildscript
}

So to enable this functionality we need to introduce new gradle files named buildscript.gradle. Those files can be placed either in App_Resources/Android folder in a nativescript application or in the platforms/android of a plugin. If such files exist they will be applied to the buildscript of the application's build.gradle.

Describe alternatives you've considered
The alternative solution considered was to create after prepare hook which adds the needed buildscript configurations to the application's build.gradle file once the app is prepared, but this seems more error prone.

Additional context
Here's an example buildscript.gradle file for adding the needed dependencies for the plugin above:

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'embrace-io:embrace-swazzler:3.1.6'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs docs Documentation is needed before closing
Projects
None yet
Development

No branches or pull requests

2 participants