Skip to content

feat: remove requirement for Android Support Repository local installation #3923

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

Merged

Conversation

rosen-vladimirov
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov commented Sep 21, 2018

In the past there was a requirement to have a local installation of the Android Support Repository in order to use libraries from there. However, since some time, the new versions are not downloaded locally and they must be used from the Google repository.
Currently this is not possible in NativeScript as {N} CLI always passes the Support Library version to gradle based on the local installation.
Remove the requirement for local installation and never pass the version to gradle. This way the apps will use the value specified in the build.gradle and they can overwrite it in app.gradle.
Update nativescript-doctor to latest version, which allows building project without local Androud Support Repository

PR Checklist

What is the current behavior?

You cannot use new versions of Android Support Library. Defining it in app.gradle still does not allow you to use newer version, as CLI overwrites the value. Also you cannot build NativeScript projects in case you do not have local version of the Android Support Repository.

What is the new behavior?

  1. You can specify your own version of the Android Support Library in your app.gradle. In case you do not specify it, a default value will be used (set in build.gradle).
  2. You can build projects without installing local version of Android Support Repository.

Fixes issue #3773

BREAKING CHANGES:
Existing applications that are using older runtime (not 5.0.0 one), but are built with CLI 5.0.0, may experience some changes - until now CLI was always passing parameter to gradle -PsupportVersion=26.0.0-alpha1. As CLI no longer passes this version, the default one from build.gradle will be used (for example 27.0.1). In case you want to use the old version in your application, add the following in your app.gradle:

project.ext.supportVersion = "26.0.0-alpha1"

@manoldonev
Copy link

We would need to set 26.0.0 as a threshold for allowed older support versions though. In order to clean up NativeScript/NativeScript#6129 (comment) (restore animator API usage) and limit the breaking changes in core modules we need android.support.v4.app.Fragment that supports both animations and animators and it seems this was introduced with 26.0.0: https://developer.android.com/sdk/support_api_diff/26.0.0/changes (older support library Fragments worked only with animations).

@rosen-vladimirov
Copy link
Contributor Author

run ci

…ation

In the past there was a requirement to have a local installation of the Android Support Repository in order to use libraries from there. However, since some time, the new versions are not downloaded locally and they must be used from the Google repository.
Currently this is not possible in NativeScript as {N} CLI always passes the Support Library version to gradle based on the local installation.
Remove the requirement for local installation and never pass the version to gradle. This way the apps will use the value specified in the `build.gradle` and they can overwrite it in `app.gradle`.
Update nativescript-doctor to latest version, which allows building project without local Androud Support Repository
@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/remove-android-support-library-requirement branch from bda15ed to 178abc2 Compare September 25, 2018 08:34
endarova added a commit to NativeScript/nativescript-cli-tests that referenced this pull request Sep 25, 2018
@rosen-vladimirov
Copy link
Contributor Author

run ci

@rosen-vladimirov rosen-vladimirov merged commit e3ae1df into master Sep 25, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/remove-android-support-library-requirement branch September 25, 2018 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants