-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add support for build tools 31.x+ #3024
Comments
Note that this may cause some confusion among contributors if they inadvertently update their build tools past 31.x & try to build the app using Bazel. @fsharpasharp as FYI. |
This has become much more urgent due to #3510. We might need to find a way to mitigate the problem until an actual fix can be used. bazelbuild/bazel#10240 is tracking the fix on the Bazel side of things for a long-term fix. |
Confirming that https://github.com/oppia/oppia-android/wiki/Bazel-Setup-Instructions-for-Windows#3-installing-the-android-sdk works as a mitigation to force the local SDK to have an older version (if people ever need to downgrade). Switching back over the other issue thread to determine how to make this work in CI. |
For folks looking to mitigate this, reference the instructions listed here with the following modifications:
|
Added mitigation instructions to https://github.com/oppia/oppia-android/wiki/Oppia-Bazel-Setup-Instructions#known-issues (it just explains the issue & points back to this thread). |
…tions to workaround #3024 (#3513) * Refactor common build env setup to local action. This attempts to move all common build environment setup bits to a common local action using GitHub composite actions per https://github.saobby.my.eu.orgmunity/t/path-to-action-in-the-same-repository-as-workflow/16952/2, https://github.blog/changelog/2020-08-07-github-actions-composite-run-steps/, and https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action. This does not include any actual changes to the CI environment yet other than temporarily disabling the other expensive checks as part of testing these changes. * Update local action to only use shell commands. * Set up JDK 9 manually for build tests. * Fix Java version checking. OpenJDK can use "9.0" as the version string instead of "1.9". * Fix Java exit from version check. * Fix incorrect check. * Add Bazel setup. * Fix syntax error & add Bazel version check. * Add SDK setup bits. * Avoid mv warning/error. * Add debug lines. * Attempt to fix pathing for new SDK. * Attempt to workaround unexpected failure from sdkmanager. * Add debug lines. * Try to run license bit in a subshell to avoid exit * Add codeowners, TODO, cleanup, and integrate. This integrates the new action with Bazel tests in addition to the build. While the tests work fine with the current build tools, we should be consistent in how the environment is set up for CI workflows. * Make local action name clearer. The new name specifically clarifies why this action isn't needed for the Bazel-only script runs (since they don't require the Android SDK bits).
bazelbuild/bazel#13738 means we can update our min Bazel version to 4.2.0 & probably drop our custom Android tools repository, but we'll need to update build-tools pin to 30.0.0. It's a start for this issue, but doesn't fully address the issue since Bazel still needs to fix the D8 compatibility issue. This might help with #3371 though. |
We're now using build tools 32.0.0, so this is technically completed: Line 2 in 0ef7a46
|
#3023 has some context, but it seems that we cannot support the newest Android build tools version due to it removing D8. Bazel is supposed to have a D8 compatibility layer embedded, but it doesn't seem to be working as expected.
That being said, we should move to R8 instead of using the D8 compatibility layer, however per #3023 this doesn't seem to work in our build because we rely on API desugaring (or rather, dependencies that we use do). I haven't yet found any Bazel issues tied to this, so this may require additional investigation & coordination with the Bazel team to find a root cause.
The text was updated successfully, but these errors were encountered: