-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Jetifier fails on bcprov-jdk15on-1.68.jar / Robolectric 4.6-alpha-2 #6521
Comments
I will check whether lower version but with CVE fixed commit has the same problem. |
This is a pretty bad bug in jetifier I believe. I think to fix this issue you can add to your gradle.properties:
or perhaps
|
I kinda fixed it by upgrading the gradle plugin to latest. may be it will work for u |
ok I think we can call it a bug in jetifier and close |
There are also revived efforts to bump the ASM version in Jetifier (https://issuetracker.google.com/issues/159151549). |
- jetifier still needed because of old material dialogs version, pending kotlin migration - jetifier cannot handle JDK15 bytecode because of some other internal dependency with bcprov - bcprov does not need jetifier processing though, so skipping it is okay robolectric/robolectric#6521 (comment)
* Bump lint_version from 27.2.1 to 27.2.2 Bumps `lint_version` from 27.2.1 to 27.2.2. Updates `lint-api` from 27.2.1 to 27.2.2 Updates `lint` from 27.2.1 to 27.2.2 Updates `lint-tests` from 27.2.1 to 27.2.2 --- updated-dependencies: - dependency-name: com.android.tools.lint:lint-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint-tests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump robolectric from 4.5.1 to 4.6.1 Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.5.1 to 4.6.1. - [Release notes](https://github.com/robolectric/robolectric/releases) - [Commits](robolectric/robolectric@robolectric-4.5.1...robolectric-4.6.1) --- updated-dependencies: - dependency-name: org.robolectric:robolectric dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Ignore bcprov during jetifier runs - jetifier still needed because of old material dialogs version, pending kotlin migration - jetifier cannot handle JDK15 bytecode because of some other internal dependency with bcprov - bcprov does not need jetifier processing though, so skipping it is okay robolectric/robolectric#6521 (comment) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mike Hardy <github@mikehardy.net>
The tests now pass without @DoNotInstrument I had to tweak the jetification settings due to a bug in the jetifier shipped with the Android Gradle Plugin. More details: robolectric/robolectric#6521 (comment) PiperOrigin-RevId: 382757006
* Bump lint_version from 27.2.1 to 27.2.2 Bumps `lint_version` from 27.2.1 to 27.2.2. Updates `lint-api` from 27.2.1 to 27.2.2 Updates `lint` from 27.2.1 to 27.2.2 Updates `lint-tests` from 27.2.1 to 27.2.2 --- updated-dependencies: - dependency-name: com.android.tools.lint:lint-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint-tests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump robolectric from 4.5.1 to 4.6.1 Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.5.1 to 4.6.1. - [Release notes](https://github.com/robolectric/robolectric/releases) - [Commits](robolectric/robolectric@robolectric-4.5.1...robolectric-4.6.1) --- updated-dependencies: - dependency-name: org.robolectric:robolectric dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Ignore bcprov during jetifier runs - jetifier still needed because of old material dialogs version, pending kotlin migration - jetifier cannot handle JDK15 bytecode because of some other internal dependency with bcprov - bcprov does not need jetifier processing though, so skipping it is okay robolectric/robolectric#6521 (comment) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mike Hardy <github@mikehardy.net>
* Bump lint_version from 27.2.1 to 27.2.2 Bumps `lint_version` from 27.2.1 to 27.2.2. Updates `lint-api` from 27.2.1 to 27.2.2 Updates `lint` from 27.2.1 to 27.2.2 Updates `lint-tests` from 27.2.1 to 27.2.2 --- updated-dependencies: - dependency-name: com.android.tools.lint:lint-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint-tests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump robolectric from 4.5.1 to 4.6.1 (#9208) * Bump lint_version from 27.2.1 to 27.2.2 Bumps `lint_version` from 27.2.1 to 27.2.2. Updates `lint-api` from 27.2.1 to 27.2.2 Updates `lint` from 27.2.1 to 27.2.2 Updates `lint-tests` from 27.2.1 to 27.2.2 --- updated-dependencies: - dependency-name: com.android.tools.lint:lint-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint-tests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Bump robolectric from 4.5.1 to 4.6.1 Bumps [robolectric](https://github.com/robolectric/robolectric) from 4.5.1 to 4.6.1. - [Release notes](https://github.com/robolectric/robolectric/releases) - [Commits](robolectric/robolectric@robolectric-4.5.1...robolectric-4.6.1) --- updated-dependencies: - dependency-name: org.robolectric:robolectric dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Ignore bcprov during jetifier runs - jetifier still needed because of old material dialogs version, pending kotlin migration - jetifier cannot handle JDK15 bytecode because of some other internal dependency with bcprov - bcprov does not need jetifier processing though, so skipping it is okay robolectric/robolectric#6521 (comment) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mike Hardy <github@mikehardy.net> * build(deps): bump jsoup from 1.13.1 to 1.14.1 Bumps [jsoup](https://github.com/jhy/jsoup) from 1.13.1 to 1.14.1. - [Release notes](https://github.com/jhy/jsoup/releases) - [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES) - [Commits](jhy/jsoup@jsoup-1.13.1...jsoup-1.14.1) --- updated-dependencies: - dependency-name: org.jsoup:jsoup dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump kotlin_version from 1.5.20 to 1.5.21 Bumps `kotlin_version` from 1.5.20 to 1.5.21. Updates `kotlin-gradle-plugin` from 1.5.20 to 1.5.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-stdlib` from 1.5.20 to 1.5.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `kotlin-stdlib-jdk7` from 1.5.20 to 1.5.21 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This error is still occurring in robolectric 4.6.1. What is the fix? |
@IgorGanapolsky #6521 (comment) Add |
This worked for me. Thanks |
Blacklisting it worked: |
If you are using AGP 7.0+, you can use |
I believe that jetifier is basically deprecated now, so I would recommend android.enableJetifier=false, unless you absolutely need it. |
Agree. Looks like AGP 7.0+ can process bcprov with jetifier enabled from PR KlubJagiellonski/pola-android#189. |
…le major version 59.Changed Robolectric to 4.7.3, link: robolectric/robolectric#6521
Refactored some variables for improved readability.Updated gradle to fix issue with Roboelectric and Jetifier. See link below robolectric/robolectric#6521
Refactored some variables for improved readability.Updated gradle to fix issue with Roboelectric and Jetifier. See link below robolectric/robolectric#6521
worked |
i have face same issue. first you open your build.properties and then add this "android.jetifier.blacklist=bcprov-jdk15on" "android.enableJetifier=true" |
Description
When building an Android project with a testImplementation dependency on Robolectric 4.6-alpha-2, the build fails with
Note that Bouncycastle was bumped to 1.68 in alpha-2. The error is likely due to Bouncycastle jars being multi-release and Bouncycastle 1.68 including classes targeting Java 15 (and probably Jetifier being unaware of multi-release jars).
As a workaround, It's possible to manually exclude bcprov-jdk15on from jetifying, but I think this still counts as a regression.
Steps to Reproduce
Set up a boilerplate Android project with Robolectric 4.6-alpha-2 and try to build it using JDK 11 or lower.
Robolectric & Android Version
Robolectic 4.6-alpha-2, AGP 7.0-beta3, Java 11 used in the project below
Link to a public git repo demonstrating the problem:
See https://github.com/ogolberg/robolectric-integration-tests/runs/2711507099?check_suite_focus=true
The text was updated successfully, but these errors were encountered: