Skip to content

Commit e455133

Browse files
[shared_preferences] Fix Android Java version issue (#3712)
Sets the compile version to 1.8, which is required by some features added in the switch to Pigeon. This is a standard part of the current Android plugin template, but this plugin predates that template change. Fixes flutter/flutter#124839
1 parent b09b74e commit e455133

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

packages/shared_preferences/shared_preferences_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.1.2
2+
3+
* Sets the required Java compile version to 1.8 for new features used in 2.1.1.
4+
15
## 2.1.1
26

37
* Updates minimum Flutter version to 3.0.

packages/shared_preferences/shared_preferences_android/android/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ apply plugin: 'com.android.library'
3232
android {
3333
compileSdkVersion 33
3434

35+
compileOptions {
36+
sourceCompatibility JavaVersion.VERSION_1_8
37+
targetCompatibility JavaVersion.VERSION_1_8
38+
}
39+
3540
defaultConfig {
3641
minSdkVersion 16
3742
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

packages/shared_preferences/shared_preferences_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: shared_preferences_android
22
description: Android implementation of the shared_preferences plugin
33
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_android
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
5-
version: 2.1.1
5+
version: 2.1.2
66

77
environment:
88
sdk: ">=2.17.0 <4.0.0"

0 commit comments

Comments
 (0)