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

Update all the android related projects to target API level 27 #17741

Conversation

SandroMachado
Copy link
Contributor

@SandroMachado SandroMachado commented Jan 25, 2018

Motivation

Google recently announced in a blog post called Improving app security and performance on Google Play for years to come that all the new apps submitted to the play store, after August 2018, will require to be targeting at least Android API level 26:

August 2018: New apps required to target API level 26 (Android 8.0) or higher.

November 2018: Updates to existing apps required to target API level 26 or higher.

2019 onwards: Each year the targetSdkVersion requirement will advance. Within one year following each Android dessert release, new apps and app updates will need to target the corresponding API level or higher.

This PR updates all the Android related projects (ReactAndroid, RNTester and the HelloWorld template) to target the API level 27.

I did not find any issue doing this upgrade but since RN was targeting version API level 22, the developers need to be aware that targeting any API level greater that 22 will introduce the run time permissions feature. Since this is a breaking change it should be described in the changelog.

This PR also closes #17287.

Test Plan

I tested the project and LGTM. I compiled and executed the RNTester and everything looks good.

screenshot_20180125-153317

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/react-native-website, and link to your PR here.)

Release Notes

[CLI] [FEATURE] [local-cli/generator/templates] - Generate the android app template targeting API level 27.
[ANDROID] [FEATURE] [BuildTools] - Updates the Android project to target API level 27.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. cla signed labels Jan 25, 2018
@pull-bot
Copy link

pull-bot commented Jan 25, 2018

Messages
📖

Suggested label: Android

Generated by 🚫 dangerJS

@SandroMachado SandroMachado force-pushed the support/bump-target-api-level-27 branch from ccb0ed6 to cfd776f Compare January 25, 2018 15:41
@hramos hramos added Core Team and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jan 29, 2018
@facebook-github-bot
Copy link
Contributor

@SandroMachado I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project.

@SandroMachado
Copy link
Contributor Author

@hramos can you please help me finding someone to review the PR?

@hramos
Copy link
Contributor

hramos commented Feb 27, 2018

@SandroMachado can you look at the release.gradle conflicts, and make sure the test-android test passes first?

@sdwilsh sdwilsh removed the cla signed label Mar 1, 2018
@hramos
Copy link
Contributor

hramos commented Mar 13, 2018

I've fixed the conflicts. Next we'd need to update the Circle tests to ensure they're using an image with the correct build tools and Android SDK versions installed.

People can still manually update their project to target API 27 so this is not considered as blocking people from mitigating the issue on their own projects.

@SandroMachado
Copy link
Contributor Author

@hramos thanks and sorry for the delay fixing the conflicts 👍

@react-native-bot react-native-bot added Android Ran Commands One of our bots successfully processed a command. labels Mar 14, 2018
@react-native-bot react-native-bot added Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. labels Mar 18, 2018
@hramos hramos added Type: Enhancement A new feature or enhancement of an existing feature. and removed 🌟Feature Request labels Mar 19, 2018
@facebook-github-bot
Copy link
Contributor

@SandroMachado I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project.

@SandroMachado
Copy link
Contributor Author

@hramos so the main objective is move to API level 26, since this PR is pointing to 27 it will not be merged, at least for now. Right? I can easily fix the conflicts but I want to understand if the PR will be merged.

@dulmandakh
Copy link
Contributor

dulmandakh commented Jul 2, 2018

@SandroMachado I have plan to bump SDK to 27, when ready. I and many developers experience issues when they use SDK 27, like aapt2. So we need some time to thoroughly test the SDK 27. That was my reason to choose SDK 26 over 27.

@SandroMachado
Copy link
Contributor Author

@dulmandakh understood, thanks for the clarification.

@dulmandakh
Copy link
Contributor

@SandroMachado you can close this PR if you are satisfied with the results/progress.

@dulmandakh
Copy link
Contributor

Help needed #20026

oblador pushed a commit to oblador/react-native-vector-icons that referenced this pull request Jul 20, 2018
* Using SDK Version variables from root project

Instead of assuming the `compileSdkVersion`, `targetSdkVersion`, etc, read it from the root project.
Default `compileSdkVersion` and `targetSdkVersion` to the latest versions.

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
And the React Native team is already working on this:
facebook/react-native#17741
facebook/react-native#18095

* Renaming variables for consistency

* Rename variables and use *Version for all settings
yeomann added a commit to yeomann/react-native-dev-menu that referenced this pull request Jul 24, 2018
Instead of assuming the `compileSdkVersion `, `targetSdkVersion`, etc, we can make it dynamic by reading it from the root project.


Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

Therefore I wrote target values of 26 instead of 23

And the React Native team is already working on this:
facebook/react-native#18095
facebook/react-native#17741
yeomann added a commit to yeomann/react-native-fast-image that referenced this pull request Jul 24, 2018
just added a function which does acts like a ternary with fallback option. Hence, less cluttered "def" variables  
additionally, changes the SDK values from 23 to 26 as per new changes from react-native and Android

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

And the React Native team is already working on this:
facebook/react-native#18095
facebook/react-native#17741
yeomann added a commit to yeomann/react-native-svg that referenced this pull request Jul 24, 2018
Instead of assuming the `compileSdkVersion `, `targetSdkVersion`, etc, we can make it dynamic by reading it from the root project.


Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

Therefore I wrote target values of 26 instead of 23

And the React Native team is already working on this:
facebook/react-native#18095
facebook/react-native#17741
yeomann added a commit to yeomann/rn-fetch-blob that referenced this pull request Jul 24, 2018
just added a function which acts like a ternary with fallback option. Hence, less cluttered "def" variables  
additionally, changed the SDK values from 23 to 26 as per new changes from react-native and Android

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

And the React Native team is already working on this:
facebook/react-native#18095
facebook/react-native#17741

PS: I am aware of this PR joltup#128 but first its still targeting old SDK values i.e 23 as fallback and secondly I am not sure of the use of `project` to get the value instead of proper way i.e `rootProject.ext` to get the property value.
yeomann added a commit to yeomann/react-native-maps that referenced this pull request Jul 26, 2018
just a little improved version rather then many explicit def for each value. hence, less cluttering. also made the react-native package to get the dynamic versions as well

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

I was going to write 26 but Since we are already using latest Gradle, Therefore I wrote target values of 27 instead of 25.

And the React Native team is already working on this:
facebook/react-native#18095
facebook/react-native#17741
@dulmandakh
Copy link
Contributor

closing this PR because SDK 27 is landed in master.

@dulmandakh dulmandakh closed this Aug 24, 2018
@hramos
Copy link
Contributor

hramos commented Sep 18, 2018

Re-opening because the SDK 27 upgrade is being reverted.

@hramos hramos reopened this Sep 18, 2018
@SandroMachado
Copy link
Contributor Author

@hramos can you please give more details. Why is it being reverted?

@hramos
Copy link
Contributor

hramos commented Sep 18, 2018

I left some comments in the commit themselves. The revert already landed, but I have a fix that should let us get back on 27. It's waiting for review and should land soon if no blockers show up.

@SandroMachado
Copy link
Contributor Author

@hramos understood! Thanks for the clarification. 👍

Commit

@hramos
Copy link
Contributor

hramos commented Sep 24, 2018

This is fixed now.

@hramos hramos closed this Sep 24, 2018
djay05554 added a commit to djay05554/react-native-video that referenced this pull request Dec 23, 2019
Instead of assuming the `compileSdkVersion`, `targetSdkVersion`, etc, read it from the root project.
Default `compileSdkVersion` and `targetSdkVersion` to the latest versions.

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
And the React Native team is already working on this:
facebook/react-native#17741
facebook/react-native#18095
jake4376 added a commit to jake4376/react-native-video that referenced this pull request Jan 18, 2020
Instead of assuming the `compileSdkVersion`, `targetSdkVersion`, etc, read it from the root project.
Default `compileSdkVersion` and `targetSdkVersion` to the latest versions.

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
And the React Native team is already working on this:
facebook/react-native#17741
facebook/react-native#18095
rosslavni pushed a commit to rosslavni/react-native-video that referenced this pull request Aug 11, 2022
Instead of assuming the `compileSdkVersion`, `targetSdkVersion`, etc, read it from the root project.
Default `compileSdkVersion` and `targetSdkVersion` to the latest versions.

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
And the React Native team is already working on this:
facebook/react-native#17741
facebook/react-native#18095
alicayan008 pushed a commit to alicayan008/ReactNative-fast-image that referenced this pull request Jul 4, 2023
Instead of assuming the `compileSdkVersion`, `targetSdkVersion`, etc, read it from the root project.
Default `compileSdkVersion` and `targetSdkVersion` to the latest versions.

Android Target API Level 26 will be required in August 2018.
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
And the React Native team is already working on this:
facebook/react-native#17741
facebook/react-native#18095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android Target API Level 26 required in August 2018