Skip to content

Commit

Permalink
Remove support for Java 7.
Browse files Browse the repository at this point in the history
We're aiming to add proper nullable annotations to Dagger's runtime API types in the upcoming Dagger release. In order to do this we need to drop support for Java 7.

Given Java 7 itself was officially out of support after July 2022, dropping support for Java 7 in Dagger seem reasonable.

RELNOTES=Remove support for Java 7
PiperOrigin-RevId: 668231703
  • Loading branch information
bcorso authored and Dagger Team committed Aug 28, 2024
1 parent 5d61a6c commit 74dcec5
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 841 deletions.
2 changes: 1 addition & 1 deletion build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ DOCLINT_HTML_AND_SYNTAX = ["-Xdoclint:html,syntax"]
DOCLINT_REFERENCES = ["-Xdoclint:reference"]

JAVA_RELEASE_MIN = [
"-source 7 -target 7",
"-source 8 -target 8",
]

POM_VERSION = "${project.version}"
5 changes: 1 addition & 4 deletions javatests/dagger/internal/codegen/CompilerMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
// TODO(bcorso): Consider moving the java version into its own separate enum.
public enum CompilerMode {
DEFAULT_MODE,
DEFAULT_JAVA7_MODE("-source", "7", "-target", "7"),
FAST_INIT_MODE("-Adagger.fastInit=enabled"),
FAST_INIT_JAVA7_MODE("-Adagger.fastInit=enabled", "-source", "7", "-target", "7"),
;
FAST_INIT_MODE("-Adagger.fastInit=enabled");

/** Returns the compiler modes as a list of parameters for parameterized tests */
public static final ImmutableList<Object[]> TEST_PARAMETERS =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ public static Collection<Object[]> parameters() {
return ImmutableList.copyOf(
new Object[][] {
{CompilerMode.DEFAULT_MODE},
{CompilerMode.DEFAULT_JAVA7_MODE},
{CompilerMode.FAST_INIT_MODE},
// FastInit with Java7 is the mode that motivated this test, but do the other
// modes anyway for completeness.
{CompilerMode.FAST_INIT_JAVA7_MODE}
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ public static Collection<Object[]> parameters() {
return ImmutableList.copyOf(
new Object[][] {
{CompilerMode.DEFAULT_MODE},
{CompilerMode.DEFAULT_JAVA7_MODE},
{CompilerMode.FAST_INIT_MODE},
{CompilerMode.FAST_INIT_JAVA7_MODE}
});
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 74dcec5

Please sign in to comment.