diff --git a/android/build.gradle b/android/build.gradle
index d7c01a2..ecdfe00 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -5,29 +5,30 @@ def args = ["-Xlint:deprecation","-Xlint:unchecked","-Werror"]
buildscript {
repositories {
google()
- jcenter()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.5.0'
+ classpath 'com.android.tools.build:gradle:8.2.1'
}
}
rootProject.allprojects {
repositories {
google()
- jcenter()
+ mavenCentral()
}
}
-project.getTasks().withType(JavaCompile){
+project.getTasks().withType(JavaCompile).configureEach {
options.compilerArgs.addAll(args)
}
apply plugin: 'com.android.library'
android {
- compileSdkVersion 29
+ namespace = "com.lazyarts.vikram.cached_video_player"
+ compileSdk 35
defaultConfig {
minSdkVersion 16
@@ -38,8 +39,9 @@ android {
}
android {
compileOptions {
- sourceCompatibility 1.8
- targetCompatibility 1.8
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+
}
}
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index bb34529..c4e6c98 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,3 +1 @@
-
-
+
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index 478a838..3794882 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -1,69 +1,62 @@
+plugins {
+ id "com.android.application"
+ id "kotlin-android"
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+ id "dev.flutter.flutter-gradle-plugin"
+}
+
def localProperties = new Properties()
-def localPropertiesFile = rootProject.file('local.properties')
+def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
+ localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader)
}
}
-def flutterRoot = localProperties.getProperty('flutter.sdk')
-if (flutterRoot == null) {
- throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
-}
-
-def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
- flutterVersionCode = '1'
+ flutterVersionCode = "1"
}
-def flutterVersionName = localProperties.getProperty('flutter.versionName')
+def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
- flutterVersionName = '1.0'
+ flutterVersionName = "1.0"
}
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
-
android {
- compileSdkVersion flutter.compileSdkVersion
+ namespace = "com.example.example"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = flutter.ndkVersion
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
- jvmTarget = '1.8'
- }
-
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
+ jvmTarget = JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.example.example"
- minSdkVersion flutter.minSdkVersion
- targetSdkVersion flutter.targetSdkVersion
- versionCode flutterVersionCode.toInteger()
- versionName flutterVersionName
+ applicationId = "com.example.example"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+ minSdk = flutter.minSdkVersion
+ targetSdk = flutter.targetSdkVersion
+ versionCode = flutterVersionCode.toInteger()
+ versionName = flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
- signingConfig signingConfigs.debug
+ signingConfig = signingConfigs.debug
}
}
- namespace 'com.example.example'
}
flutter {
- source '../..'
-}
-
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ source = "../.."
}
diff --git a/example/android/build.gradle b/example/android/build.gradle
index 2e6467a..d2ffbff 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -1,16 +1,3 @@
-buildscript {
- ext.kotlin_version = '1.6.21'
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:7.4.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- }
-}
-
allprojects {
repositories {
google()
@@ -18,14 +5,14 @@ allprojects {
}
}
-rootProject.buildDir = '../build'
+rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
- project.evaluationDependsOn(':app')
+ project.evaluationDependsOn(":app")
}
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
delete rootProject.buildDir
}
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
index 6b66533..7bb2df6 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
diff --git a/example/android/settings.gradle b/example/android/settings.gradle
index 44e62bc..b6863b1 100644
--- a/example/android/settings.gradle
+++ b/example/android/settings.gradle
@@ -1,11 +1,25 @@
-include ':app'
+pluginManagement {
+ def flutterSdkPath = {
+ def properties = new Properties()
+ file("local.properties").withInputStream { properties.load(it) }
+ def flutterSdkPath = properties.getProperty("flutter.sdk")
+ assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+ return flutterSdkPath
+ }()
-def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
-def properties = new Properties()
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
-assert localPropertiesFile.exists()
-localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
-def flutterSdkPath = properties.getProperty("flutter.sdk")
-assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
-apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
+plugins {
+ id "dev.flutter.flutter-plugin-loader" version "1.0.0"
+ id "com.android.application" version "8.2.1" apply false
+ id "org.jetbrains.kotlin.android" version "1.9.22" apply false
+}
+
+include ":app"
diff --git a/pigeons/messages.dart b/pigeons/messages.dart
index 50d0085..40ac3fd 100644
--- a/pigeons/messages.dart
+++ b/pigeons/messages.dart
@@ -2,44 +2,44 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// @dart = 2.9
+// @dart = 2.12
import 'package:pigeon/pigeon_lib.dart';
class TextureMessage {
- int textureId;
+ int? textureId;
}
class LoopingMessage {
- int textureId;
- bool isLooping;
+ int? textureId;
+ bool? isLooping;
}
class VolumeMessage {
- int textureId;
- double volume;
+ int? textureId;
+ double? volume;
}
class PlaybackSpeedMessage {
- int textureId;
- double speed;
+ int? textureId;
+ double? speed;
}
class PositionMessage {
- int textureId;
- int position;
+ int? textureId;
+ int? position;
}
class CreateMessage {
- String asset;
- String uri;
- String packageName;
- String formatHint;
- Map httpHeaders;
+ String? asset;
+ String? uri;
+ String? packageName;
+ String? formatHint;
+ Map? httpHeaders;
}
class MixWithOthersMessage {
- bool mixWithOthers;
+ bool? mixWithOthers;
}
@HostApi(dartHostTestHandler: 'TestHostVideoPlayerApi')
diff --git a/pubspec.yaml b/pubspec.yaml
index a7b4056..67cadfc 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -15,8 +15,8 @@ flutter:
default_package: video_player_web
dependencies:
- meta: ^1.7.0
- video_player_platform_interface: ^6.0.1
+ meta: ^1.10.0
+ video_player_platform_interface: ^6.2.3
# The design on https://flutter.dev/go/federated-plugins was to leave
# this constraint as "any". We cannot do it right now as it fails pub publish
@@ -24,7 +24,7 @@ dependencies:
# the constraints on the interface pins it.
# TODO(amirh): Revisit this (either update this part in the design or the pub tool).
# https://github.com/flutter/flutter/issues/46264
- video_player_web: ^2.0.10
+ video_player_web: ^2.3.3
flutter:
sdk: flutter
@@ -34,9 +34,9 @@ dependencies:
dev_dependencies:
lints: ^1.0.1
pedantic: ^1.11.1
- pigeon: ^3.1.0
+ pigeon: ^22.7.2
environment:
- sdk: ">=2.14.0 <3.0.0"
+ sdk: ">=2.14.0 <5.0.0"
flutter: ">=2.10.0"