Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -38,8 +39,9 @@ android {
}
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11

}
}

Expand Down
4 changes: 1 addition & 3 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lazyarts.vikram.cached_video_player">
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>
63 changes: 28 additions & 35 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -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 = "../.."
}
19 changes: 3 additions & 16 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
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()
mavenCentral()
}
}

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
}
3 changes: 1 addition & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
30 changes: 22 additions & 8 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -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"
32 changes: 16 additions & 16 deletions pigeons/messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> httpHeaders;
String? asset;
String? uri;
String? packageName;
String? formatHint;
Map<String, String>? httpHeaders;
}

class MixWithOthersMessage {
bool mixWithOthers;
bool? mixWithOthers;
}

@HostApi(dartHostTestHandler: 'TestHostVideoPlayerApi')
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ 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
# validation, so we set a ^ constraint. The exact value doesn't matter since
# 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
Expand All @@ -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"