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 #5079: Gradle Build Failed - Task :utility:kaptGenerateStubsDebugKotlin FAILED #5162

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

theMr17
Copy link
Collaborator

@theMr17 theMr17 commented Sep 29, 2023

Explanation

Fixes #5079

The error message indicates that there's a compatibility issue with the Java version being used for the project. The Unsupported class file major version 59 suggests that the code in the model.jar (project :model) file is compiled with a Java version higher than the one being used by the project.

This PR explicitly set the source and target compatibility to Java 8 for the project. This ensures that the project uses Java 8, which is compatible with class files compiled with major version 59 (Java 15).

By making this change, we ensure that the project's Java version aligns with the Java version used to compile the model.jar file, thus resolving the compatibility issue and allowing the build process to proceed without errors.

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

@the-mr17, could you please add an explanation to the PR description as to why the solution fixes the error? What does the error message mean and what do the new lines of code do?

Copy link
Collaborator

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Thanks @the-mr17, this LGTM.

@adhiamboperes adhiamboperes merged commit 41f74fc into oppia:develop Sep 29, 2023
25 checks passed
@theMr17
Copy link
Collaborator Author

theMr17 commented Sep 30, 2023

Hi @adhiamboperes, just out of curiosity, can you please tell me why this test is failing and how shall I handle this in future PRs?

image

@adhiamboperes
Copy link
Collaborator

Hi @adhiamboperes, just out of curiosity, can you please tell me why this test is failing and how shall I handle this in future PRs?

image

Sometimes the CI times out because the jobs are large, or some other internal issue.

@adhiamboperes adhiamboperes added the Hacktoberfest This is a suggested Hacktoberfest issue. label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest This is a suggested Hacktoberfest issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Gradle Build Failed - Task :utility:kaptGenerateStubsDebugKotlin FAILED
2 participants