This release is the final step of copying all our methods from Truth8 to Truth. If you have not already migrated your usages from Truth8 to Truth, you may see build errors:
OptionalSubjectTest.java:39: error: reference to assertThat is ambiguous
assertThat(Optional.of("foo")).isPresent();
^
both method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Optional<?>) in Truth8 and method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Optional<?>) in Truth match
In most cases, you can migrate your whole project mechanically: git grep -l Truth8 | xargs perl -pi -e 's/\bTruth8\b/Truth/g;'. (You can make that change before upgrading to Truth 1.4.2 or as part of the same commit.)
If you instead need to migrate your project incrementally (for example, because it is very large), you may want to upgrade your version of Truth incrementally, too, following our instructions for 1.3.0 and 1.4.0.
For help
Please feel welcome to open an issue to report problems or request help.
Changelog
Removed temporary type parameters from Truth.assertThat(Stream) and Truth.assertThat(Optional). This can create build errors, which you can fix by replacing all your references to Truth8 with references to Truth. (45782bd0e)
1.4.1
This release deprecates Truth8.
All its methods have become available on the main Truth class. In most cases, you can migrate your whole project mechanically: git grep -l Truth8 | xargs perl -pi -e 's/\bTruth8\b/Truth/g;'
While we do not plan to delete Truth8, we recommend migrating off it, at least if you static import assertThat: If you do not migrate, such static imports will become ambiguous in Truth 1.4.2, breaking your build.
1.4.0
In this release, our assertions on Java 8 types continue to move from the Truth8 class to the main Truth class. This change should not break compatibility for any supported JDK or Android version, even users who test under old versions of Android without API desugaring. Additionally, we will never break binary compatibility, though some users will have to make changes to their source code in order for it to compile against newer versions.
This release is likely to lead to more build failures than 1.3.0 did. However, those failures should be straightforward to fix.
Example build failure
Foo.java:152: error: reference to assertThat is ambiguous
assertThat(repo.findFileWithName("foo")).isNull();
^
both method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Path) in Truth8 and method assertThat(@org.checkerframework.checker.nullness.qual.Nullable Path) in Truth match
Simplest upgrade strategy (if you can update all your code atomically in the same commit as the Truth upgrade)
In the same commit:
Upgrade Truth to 1.4.0.
Replace import static com.google.common.truth.Truth8.assertThat; with import static com.google.common.truth.Truth.assertThat;.
... (truncated)
Commits
0ca7ef0 Set version number for truth-parent to 1.4.2.
e3b4354 Enable a few more Guava Primitives tests for J2KT
ae78f4a Bump actions/setup-java from 4.0.0 to 4.1.0
996a844 Remove more copies of a workaround for an ancient Android bug.
a43223e Suppress TruthSelfEquals violations in Truth.
559d636 Suppress NullableOptional, as we already do in, e.g., `Truth.assertThat(Opt...
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the minor-and-patch-version-updates group in /app with 2 updates: com.google.truth:truth and org.mockito:mockito-core.
Updates
com.google.truth:truth
from 1.3.0 to 1.4.2Release notes
Sourced from com.google.truth:truth's releases.
... (truncated)
Commits
0ca7ef0
Set version number for truth-parent to 1.4.2.e3b4354
Enable a few more Guava Primitives tests for J2KTae78f4a
Bump actions/setup-java from 4.0.0 to 4.1.0996a844
Remove more copies of a workaround for an ancient Android bug.a43223e
SuppressTruthSelfEquals
violations in Truth.559d636
SuppressNullableOptional
, as we already do in, e.g., `Truth.assertThat(Opt...3efe353
Automated Code Change5efd53f
ChangeassertThat(array)
to allow arrays of non-nullable elementsbbd8d12
Bump com.google.errorprone:error_prone_annotations from 2.24.1 to 2.25.0c243961
Remove@J2ktIncompatible
fromStringSubject#matches
Updates
org.mockito:mockito-core
from 5.10.0 to 5.11.0Release notes
Sourced from org.mockito:mockito-core's releases.
Commits
ea6ff8c
Add native method to MissingMethodInvocationException (#3283)8431ae2
Bump com.google.googlejavaformat:google-java-format (#3277)a10d43c
Bump versions.bytebuddy from 1.14.11 to 1.14.12 (#3272)699799d
Bump gradle/wrapper-validation-action from 2.1.0 to 2.1.1 (#3268)861ca99
Bump org.shipkit:shipkit-auto-version from 2.0.3 to 2.0.4 (#3267)043c0f0
Bump gradle/wrapper-validation-action from 2.0.1 to 2.1.0 (#3266)fa31e11
Bump gradle/wrapper-validation-action from 2.0.0 to 2.0.1 (#3264)efa8d2a
Bump org.junit.platform:junit-platform-launcher from 1.10.1 to 1.10.2 (#3265)66d18cc
Bump org.assertj:assertj-core from 3.25.2 to 3.25.3 (#3261)e76f14a
Bump versions.junitJupiter from 5.10.1 to 5.10.2 (#3260)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show