Add support of '--min-api' d8 argument - #1000
Conversation
Summary - Extender code coverage reportSummary
Coveragecom/defold/extender - 29.5%
com/defold/extender/builders - 0%
com/defold/extender/cache - 33.3%
com/defold/extender/cache/info - 100%
com/defold/extender/log - 14.2%
com/defold/extender/metrics - 38.8%
com/defold/extender/process - 52.7%
com/defold/extender/remote - 95.6%
com/defold/extender/services - 44.1%
com/defold/extender/services/cocoapods - 51.9%
com/defold/extender/services/data - 80.7%
com/defold/extender/tracing - 21.8%
com/defold/extender/utils - 0%
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47327a7c6f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| // Reaches the command line as the argument of d8 --min-api, so it must be a bare number. | ||
| Object minAndroidSdkVersion = appContext.get(ExtenderBuildState.APPMANIFEST_MIN_ANDROID_SDK_VERSION_KEYWORD); | ||
| if (minAndroidSdkVersion != null && !(minAndroidSdkVersion instanceof Integer)) { |
There was a problem hiding this comment.
Reject negative integer API levels
For an unquoted YAML value such as minAndroidSdkVersion: -1, SnakeYAML produces an Integer, so this condition skips validation entirely; getAppManifestContextInteger() then preserves -1 and buildClassesDex() renders it as d8 --min-api -1, causing the Android dex build to fail. The equivalent quoted value is rejected, so validate integer instances against a positive API-level range as well.
Useful? React with 👍 / 👎.
| static final String APPMANIFEST_DEBUG_SOURCE_PATH = "debugSourcePath"; | ||
| static final String APPMANIFEST_MIN_ANDROID_SDK_VERSION_KEYWORD = "minAndroidSdkVersion"; | ||
|
|
||
| static final int DEFAULT_MIN_ANDROID_SDK_VERSION = 21; |
There was a problem hiding this comment.
Don't we pass it from somewhere in configs? I thought we have it somewhere specified based on toolchain
There was a problem hiding this comment.
We pass ndk min version and right now there are no unified approach to manage ndk and sdk minimum version. I think it should be fixed as part of #726
Pass
--min-apiargument tod8. Should fix defold/extension-admob#66Related changes: defold/defold#12834