Skip to content

Commit f0530d7

Browse files
committed
migrated to latest flutter/dart version
1 parent a364788 commit f0530d7

File tree

32 files changed

+243
-213
lines changed

32 files changed

+243
-213
lines changed

flutter_vlc_player/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 8.0.0
2+
* **Breaking Change**: bumped minimum Flutter SDK requirement to 3.22.0 and Dart SDK requirement to 3.4.0. The minimum supported Android version is now 5.0 (API level 21)
3+
* [Android] updated libvlc
4+
* [Android] set Java compatibility to 11 instead of 8
5+
* [ios] updated MobileVLCKit
6+
* updated exmaple
7+
18
## 7.4.2
29
* fixed getVolume #486
310
Credits to pinpong (https://github.com/pinpong)

flutter_vlc_player/android/build.gradle

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,69 @@ group 'software.solid.fluttervlcplayer'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5+
ext.kotlin_version = "1.8.22"
56
repositories {
67
google()
78
mavenCentral()
89
}
910

1011
dependencies {
11-
classpath 'com.android.tools.build:gradle:7.4.2'
12+
classpath("com.android.tools.build:gradle:8.7.0")
13+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
1214
}
1315
}
1416

15-
rootProject.allprojects {
17+
allprojects {
1618
repositories {
1719
google()
1820
mavenCentral()
1921
}
2022
}
2123

22-
apply plugin: 'com.android.library'
24+
apply plugin: "com.android.library"
25+
apply plugin: "kotlin-android"
2326

2427
android {
25-
namespace 'software.solid.fluttervlcplayer'
28+
namespace = "software.solid.fluttervlcplayer"
2629

27-
compileSdk 33
30+
compileSdk = 35
31+
32+
compileOptions {
33+
sourceCompatibility = JavaVersion.VERSION_11
34+
targetCompatibility = JavaVersion.VERSION_11
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = JavaVersion.VERSION_11
39+
}
40+
41+
sourceSets {
42+
main.java.srcDirs += "src/main/kotlin"
43+
test.java.srcDirs += "src/test/kotlin"
44+
}
2845

2946
defaultConfig {
30-
minSdkVersion 19
31-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47+
minSdk = 21
3248
}
33-
lintOptions {
34-
disable 'InvalidPackage'
49+
50+
dependencies {
51+
testImplementation("org.jetbrains.kotlin:kotlin-test")
52+
testImplementation("org.mockito:mockito-core:5.0.0")
53+
implementation 'org.videolan.android:libvlc-all:3.6.0-eap14'
54+
implementation 'androidx.appcompat:appcompat:1.7.0'
55+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
56+
implementation 'androidx.annotation:annotation:1.9.1'
3557
}
36-
compileOptions {
37-
sourceCompatibility JavaVersion.VERSION_1_8
38-
targetCompatibility JavaVersion.VERSION_1_8
58+
59+
testOptions {
60+
unitTests.all {
61+
useJUnitPlatform()
62+
63+
testLogging {
64+
events "passed", "skipped", "failed", "standardOut", "standardError"
65+
outputs.upToDateWhen {false}
66+
showStandardStreams = true
67+
}
68+
}
3969
}
4070
}
41-
42-
dependencies {
43-
implementation fileTree(include: ['*.jar'], dir: 'libs')
44-
implementation 'org.videolan.android:libvlc-all:3.6.0-eap12'
45-
implementation 'androidx.appcompat:appcompat:1.2.0'
46-
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
47-
implementation 'androidx.annotation:annotation:1.2.0'
48-
}

flutter_vlc_player/android/gradle.properties

Lines changed: 0 additions & 3 deletions
This file was deleted.

flutter_vlc_player/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

flutter_vlc_player/android/src/main/java/software/solid/fluttervlcplayer/FlutterVlcPlayerPlugin.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,6 @@ public class FlutterVlcPlayerPlugin implements FlutterPlugin, ActivityAware {
2020
public FlutterVlcPlayerPlugin() {
2121
}
2222

23-
@SuppressWarnings("deprecation")
24-
public static void registerWith(io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
25-
if (flutterVlcPlayerFactory == null) {
26-
flutterVlcPlayerFactory =
27-
new FlutterVlcPlayerFactory(
28-
registrar.messenger(),
29-
registrar.textures(),
30-
registrar::lookupKeyForAsset,
31-
registrar::lookupKeyForAsset
32-
);
33-
registrar
34-
.platformViewRegistry()
35-
.registerViewFactory(
36-
VIEW_TYPE,
37-
flutterVlcPlayerFactory
38-
);
39-
}
40-
registrar.addViewDestroyListener(view -> {
41-
stopListening();
42-
return false;
43-
});
44-
//
45-
startListening();
46-
}
47-
4823
@Override
4924
public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
5025
flutterPluginBinding = binding;

flutter_vlc_player/example/android/app/build.gradle

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id("dev.flutter.flutter-gradle-plugin")
6+
}
7+
8+
android {
9+
namespace = "software.solid.example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = "27.0.12077973"
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_11.toString()
20+
}
21+
22+
defaultConfig {
23+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24+
applicationId = "software.solid.example"
25+
// You can update the following values to match your application needs.
26+
// For more information, see: https://flutter.dev/to/review-gradle-config.
27+
minSdk = flutter.minSdkVersion
28+
targetSdk = flutter.targetSdkVersion
29+
versionCode = flutter.versionCode
30+
versionName = flutter.versionName
31+
}
32+
33+
buildTypes {
34+
release {
35+
// TODO: Add your own signing config for the release build.
36+
// Signing with the debug keys for now, so `flutter run --release` works.
37+
signingConfig = signingConfigs.getByName("debug")
38+
}
39+
}
40+
}
41+
42+
flutter {
43+
source = "../.."
44+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,52 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22

3-
<!-- The INTERNET permission is required for development. Specifically,
4-
flutter needs it to communicate with the running application
5-
to allow setting breakpoints, to provide hot reload, etc.
6-
-->
73
<uses-permission android:name="android.permission.INTERNET"/>
84
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
95
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
106

11-
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
12-
calls FlutterMain.startInitialization(this); in its onCreate method.
13-
In most cases you can leave this as-is, but you if you want to provide
14-
additional functionality it is fine to subclass or reimplement
15-
FlutterApplication and put your custom class here. -->
167
<application
178
android:label="Flutter Vlc Player"
9+
android:name="${applicationName}"
1810
android:icon="@mipmap/ic_launcher"
1911
android:requestLegacyExternalStorage="true"
2012
android:usesCleartextTraffic="true">
2113
<activity
2214
android:name=".MainActivity"
15+
android:exported="true"
2316
android:launchMode="singleTop"
17+
android:taskAffinity=""
2418
android:theme="@style/LaunchTheme"
25-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode|smallestScreenSize"
19+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
2620
android:hardwareAccelerated="true"
27-
android:resizeableActivity="true"
28-
android:windowSoftInputMode="adjustResize"
29-
android:exported="true">
30-
<!-- This keeps the window background of the activity showing
31-
until Flutter renders its first frame. It can be removed if
32-
there is no splash screen (such as the default splash screen
33-
defined in @style/LaunchTheme). -->
34-
21+
android:windowSoftInputMode="adjustResize">
22+
<!-- Specifies an Android theme to apply to this Activity as soon as
23+
the Android process has started. This theme is visible to the user
24+
while the Flutter UI initializes. After that, this theme continues
25+
to determine the Window background behind the Flutter UI. -->
26+
<meta-data
27+
android:name="io.flutter.embedding.android.NormalTheme"
28+
android:resource="@style/NormalTheme"
29+
/>
3530
<intent-filter>
3631
<action android:name="android.intent.action.MAIN"/>
3732
<category android:name="android.intent.category.LAUNCHER"/>
3833
</intent-filter>
3934
</activity>
35+
<!-- Don't delete the meta-data below.
36+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
4037
<meta-data
4138
android:name="flutterEmbedding"
4239
android:value="2" />
43-
44-
<meta-data
45-
android:name="android.allow_multiple_resumed_activities"
46-
android:value="true" />
4740
</application>
41+
<!-- Required to query activities that can process text, see:
42+
https://developer.android.com/training/package-visibility and
43+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
44+
45+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
46+
<queries>
47+
<intent>
48+
<action android:name="android.intent.action.PROCESS_TEXT"/>
49+
<data android:mimeType="text/plain"/>
50+
</intent>
51+
</queries>
4852
</manifest>

flutter_vlc_player/example/android/app/src/main/java/software/solid/fluttervlcplayerexample/MainActivity.java

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)