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

Update to 1.12.7 bumps minSdkVersion to 26 on Android #893

Closed
3 tasks done
AlvaroBrey opened this issue Aug 24, 2022 · 4 comments · Fixed by #901
Closed
3 tasks done

Update to 1.12.7 bumps minSdkVersion to 26 on Android #893

AlvaroBrey opened this issue Aug 24, 2022 · 4 comments · Fixed by #901

Comments

@AlvaroBrey
Copy link

AlvaroBrey commented Aug 24, 2022

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected Behavior

Upgrade to 1.12.7 from 1.12.5 in a project with minSdk 23, everything keeps working. I would expect no breaking changes due to this being a patch release.

Current Behavior

Test build fails due to incompatible minSdk. See stacktrace.

Steps to Reproduce

  1. Create an Android project with minSdk = 23
  2. Use mockK 1.12.7

Context

  • MockK version: 1.12.7
  • OS: Linux
  • Kotlin version: 1.6.21
  • JDK version: 11.0.13
  • JUnit version: 4.13.2
  • Type of test: unit test OR android instrumented test: both

Stack trace

* What went wrong:
Execution failed for task ':app:processGenericDebugAndroidTestManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 23 cannot be smaller than version 26 declared in library [io.mockk:mockk-android:1.12.7] /home/user/.gradle/caches/transforms-3/0debc4558cb38f69fc40c4cac52d713c/transformed/jetified-mockk-android-1.12.7/AndroidManifest.xml as the library might be using APIs not available in 23
        Suggestion: use a compatible library with a minSdk of at most 23,
                or increase this project's minSdk version to at least 26,
                or use tools:overrideLibrary="io.mockk" to force usage (may lead to runtime failures)
@SimonMarquis
Copy link
Contributor

The update was done here: 269a599

@aSemy
Copy link
Contributor

aSemy commented Aug 24, 2022

I've had a quick stab #901, can you check?

If the GHA tests pass, can you try out the fix locally? Check out the branch from #901, deploy to Maven Local ./gradlew publishToMavenLocal, bump your MockK versions, and give it a go

@AlvaroBrey
Copy link
Author

I've had a quick stab #901, can you check?

If the GHA tests pass, can you try out the fix locally? Check out the branch from #901, deploy to Maven Local ./gradlew publishToMavenLocal, bump your MockK versions, and give it a go

I've verified that your PR fixes the situation for my setup 👍 .
However keep in mind that before 269a599, the minSdk was 21, not 23; so 1.12.7 will still be breaking for those on sdk 21 and 22.

@aSemy
Copy link
Contributor

aSemy commented Aug 25, 2022

@AlvaroBrey Thanks for noticing that it was 21, not 23!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants