Skip to content

Commit 16a0659

Browse files
authored
Merge pull request #842 from vaishnavi-2301/master
package upgrades
2 parents a4b0233 + 3946787 commit 16a0659

File tree

8 files changed

+54
-44
lines changed

8 files changed

+54
-44
lines changed

example/android/app/build.gradle

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
7+
18
def localProperties = new Properties()
29
def localPropertiesFile = rootProject.file('local.properties')
310
if (localPropertiesFile.exists()) {
@@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) {
613
}
714
}
815

9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
1416
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1517
if (flutterVersionCode == null) {
1618
flutterVersionCode = '1'
@@ -21,24 +23,33 @@ if (flutterVersionName == null) {
2123
flutterVersionName = '1.0'
2224
}
2325

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26+
def keystoreProperties = new Properties()
27+
def keystorePropertiesFile = rootProject.file('key.properties')
28+
if (keystorePropertiesFile.exists()) {
29+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
30+
}
2731

2832
android {
2933
namespace "com.example.example"
34+
compileSdk 34
35+
36+
compileOptions {
37+
sourceCompatibility JavaVersion.VERSION_17
38+
targetCompatibility JavaVersion.VERSION_17
39+
}
3040

31-
compileSdkVersion 33
41+
kotlinOptions {
42+
jvmTarget = '17'
43+
}
3244

3345
sourceSets {
3446
main.java.srcDirs += 'src/main/kotlin'
3547
}
3648

3749
defaultConfig {
38-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
39-
applicationId "com.example.example"
40-
minSdkVersion 21
41-
targetSdkVersion 33
50+
applicationId "com.example.example"
51+
minSdk 21
52+
targetSdk 34
4253
versionCode flutterVersionCode.toInteger()
4354
versionName flutterVersionName
4455
}
@@ -57,5 +68,4 @@ flutter {
5768
}
5869

5970
dependencies {
60-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
6171
}

example/android/build.gradle

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
buildscript {
2-
ext.kotlin_version = '1.7.22'
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.4.2'
10-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11-
}
12-
}
13-
141
allprojects {
152
repositories {
163
google()
@@ -26,4 +13,4 @@ subprojects {
2613

2714
tasks.register("clean", Delete) {
2815
delete rootProject.buildDir
29-
}
16+
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip

example/android/settings.gradle

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file('local.properties').withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty('flutter.sdk')
6+
assert flutterSdkPath != null, 'flutter.sdk not set in local.properties'
7+
return flutterSdkPath
8+
}()
29

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
10+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
511

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12+
repositories {
13+
google()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}
17+
}
818

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
19+
plugins {
20+
id 'dev.flutter.flutter-plugin-loader' version '1.0.0'
21+
id 'com.android.application' version '8.3.1' apply false
22+
id 'org.jetbrains.kotlin.android' version '1.8.22' apply false
23+
}
24+
include ':app'

example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ dependencies:
1313
flutter:
1414
sdk: flutter
1515

16-
video_player: any
16+
video_player: ^2.9.1
1717
dev_dependencies:
1818
flutter_test:
1919
sdk: flutter
20-
flutter_lints: ^3.0.2
20+
flutter_lints: ^4.0.0
2121

2222
# For information on the generic Dart part of this file, see the
2323
# following page: https://www.dartlang.org/tools/pub/pubspec

lib/src/material/material_controls.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ class _MaterialControlsState extends State<MaterialControls>
612612
playedColor: Theme.of(context).colorScheme.secondary,
613613
handleColor: Theme.of(context).colorScheme.secondary,
614614
bufferedColor:
615-
Theme.of(context).colorScheme.background.withOpacity(0.5),
615+
Theme.of(context).colorScheme.surface.withOpacity(0.5),
616616
backgroundColor: Theme.of(context).disabledColor.withOpacity(.5),
617617
),
618618
),

lib/src/material/material_desktop_controls.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ class _MaterialDesktopControlsState extends State<MaterialDesktopControls>
589589
playedColor: Theme.of(context).colorScheme.secondary,
590590
handleColor: Theme.of(context).colorScheme.secondary,
591591
bufferedColor:
592-
Theme.of(context).colorScheme.background.withOpacity(0.5),
592+
Theme.of(context).colorScheme.surface.withOpacity(0.5),
593593
backgroundColor: Theme.of(context).disabledColor.withOpacity(.5),
594594
),
595595
),

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ dependencies:
1212
flutter:
1313
sdk: flutter
1414
provider: ^6.1.2
15-
video_player: ^2.8.3
16-
wakelock_plus: ^1.2.2
15+
video_player: ^2.9.1
16+
wakelock_plus: ^1.2.5
1717

1818
dev_dependencies:
1919
flutter_test:
2020
sdk: flutter
21-
flutter_lints: ^3.0.2
21+
flutter_lints: ^4.0.0
2222

2323
flutter:
2424
uses-material-design: true

0 commit comments

Comments
 (0)