Skip to content

Build plugins with the same gradle versions as the runtime #3719

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
rosen-vladimirov opened this issue Jul 3, 2018 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@rosen-vladimirov
Copy link
Contributor

When CLI builds .aar for a plugin, it uses hardcoded gradle versions. Instead, we should use the same version that is used for building the project. The version there is part of the tns-android package.
We can take it by reading the package.json of the tns-android from registry.npmjs.org and apply the versions before building the plugin. The required versions will be added in the tns-android package.json with this PR. Once it is published and before building a plugin, CLI can request data from registry.npmjs.org and get it based on the version. In case CLI works outside of a project, i.e. just building a plugin, we can default to the latest version of the runtime and get data from it.
We also need to fallback in case there's no such entries to versions 4.4 and 3.1.2
Once we have the versions, we can replace them in the build.gradle and gradle-wrapper.properties that CLI uses to build the plugin.

This way, when we have to update the gradle versions in Android runtime, we'll receive them directly in CLI.

@Natalia-Hristova
Copy link

This is implemented and will be released in next official version of nativescript and tns-android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants