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

fix(android): make sdk versions configurable #2152

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Jul 25, 2024

Description

compileSdkVersion, minSdkVersion, targetSdkVersion can be configured in gradle.properties:

react.compileSdkVersion=34
react.minSdkVersion=23
react.targetSdkVersion=33

Platforms affected

  • Android
  • iOS
  • macOS
  • visionOS
  • Windows

Test plan

  1. In gradle.properties, try adding react.minSdkVersion=24 and build the Android app (this should succeed)
  2. In gradle.properties, try adding react.minSdkVersion=99 and build the Android app (this should fail)

`compileSdkVersion`, `minSdkVersion`, `targetSdkVersion` can be
configured in `gradle.properties`:

```
react.compileSdkVersion=34
react.minSdkVersion=23
react.targetSdkVersion=33
```
@tido64 tido64 requested a review from Saadnajmi July 25, 2024 14:32
@tido64 tido64 requested a review from JasonVMo as a code owner July 25, 2024 14:32
@github-actions github-actions bot added the platform: Android This affects Android label Jul 25, 2024
Comment on lines +4 to +6
compileSdkVersion = rootProject.findProperty("react.compileSdkVersion") ?: 34
minSdkVersion = rootProject.findProperty("react.minSdkVersion") ?: 23
targetSdkVersion = rootProject.findProperty("react.targetSdkVersion") ?: 33
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Save the defaults as constants? Unless you can't.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kinda is the file that is supposed to have all the defaults 😄

@tido64 tido64 merged commit 795104b into trunk Jul 29, 2024
30 checks passed
@tido64 tido64 deleted the tido/android/configurable-sdk branch July 29, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Android This affects Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants