Skip to content

Commit a8d492c

Browse files
hunterstichdsn5ft
authored andcommitted
[Build] Moved back to Java 8 source and target compatibility
PiperOrigin-RevId: 739934297
1 parent 1ee9a86 commit a8d492c

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ subprojects {
127127
// This disables the builds tools automatic vector -> PNG generation
128128
defaultConfig.generatedDensities = []
129129

130-
compileOptions.sourceCompatibility JavaVersion.VERSION_17
131-
compileOptions.targetCompatibility JavaVersion.VERSION_17
130+
compileOptions.sourceCompatibility JavaVersion.VERSION_1_8
131+
compileOptions.targetCompatibility JavaVersion.VERSION_1_8
132132

133133
aaptOptions.additionalParameters "--no-version-vectors"
134134

catalog/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ android {
143143
}
144144

145145
compileOptions {
146-
sourceCompatibility JavaVersion.VERSION_17
147-
targetCompatibility JavaVersion.VERSION_17
146+
sourceCompatibility JavaVersion.VERSION_1_8
147+
targetCompatibility JavaVersion.VERSION_1_8
148148
}
149149
androidResources {
150150
additionalParameters '--no-version-vectors'

lib/java/com/google/android/material/floatingactionbutton/FloatingActionButtonImpl.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ void setMinTouchTargetSize(int minTouchTargetSize) {
215215
}
216216

217217
void setRippleColor(@Nullable ColorStateList rippleColor) {
218-
if (rippleDrawable instanceof RippleDrawable rippleDrawable) {
219-
rippleDrawable.setColor(RippleUtils.sanitizeRippleDrawableColor(rippleColor));
218+
if (rippleDrawable instanceof RippleDrawable) {
219+
((RippleDrawable) rippleDrawable).setColor(
220+
RippleUtils.sanitizeRippleDrawableColor(rippleColor));
220221
} else if (rippleDrawable != null) {
221222
rippleDrawable.setTintList(RippleUtils.sanitizeRippleDrawableColor(rippleColor));
222223
}
@@ -299,8 +300,8 @@ final void setShapeAppearance(@NonNull ShapeAppearanceModel shapeAppearance) {
299300
shapeDrawable.setShapeAppearanceModel(shapeAppearance);
300301
}
301302

302-
if (rippleDrawable instanceof Shapeable shapeable) {
303-
shapeable.setShapeAppearanceModel(shapeAppearance);
303+
if (rippleDrawable instanceof Shapeable) {
304+
((Shapeable) rippleDrawable).setShapeAppearanceModel(shapeAppearance);
304305
}
305306

306307
if (borderDrawable != null) {

tests/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
}
3535

3636
compileOptions {
37-
sourceCompatibility JavaVersion.VERSION_17
38-
targetCompatibility JavaVersion.VERSION_17
37+
sourceCompatibility JavaVersion.VERSION_1_8
38+
targetCompatibility JavaVersion.VERSION_1_8
3939
}
4040
}

0 commit comments

Comments
 (0)