Skip to content

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

Closed
@rosen-vladimirov

Description

@rosen-vladimirov

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions