From 33c0b681e343f4e406eb722a3e8f2b2dd2c4f462 Mon Sep 17 00:00:00 2001 From: jennifer-ha <82815655+jennifer-ha@users.noreply.github.com> Date: Fri, 22 Mar 2024 20:22:16 +0100 Subject: [PATCH 1/5] Update build.gradle Upgraded Android Gradle Plugin: Moved from AGP version 4.1.0 to 7.0.0. This upgrade allows us to take advantage of the latest features, performance improvements, and bug fixes introduced in recent AGP releases. Namespace Specification: Added the namespace declaration in the build.gradle file to comply with the new AGP requirements. This ensures our project adheres to the latest Android build standards. Repository Migration: Transitioned from jcenter() to mavenCentral() for fetching dependencies. This change is in response to the deprecation of JCenter as a repository, ensuring our project dependencies are fetched from a reliable and updated source. --- android/build.gradle | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4f31800..f7fff60 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,25 +4,30 @@ version '1.0-SNAPSHOT' buildscript { repositories { google() - jcenter() + // jcenter() is verouderd en zou idealiter vervangen moeten worden door mavenCentral() indien mogelijk + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + // Update de classpath naar een nieuwere versie van de Android Gradle Plugin + classpath 'com.android.tools.build:gradle:7.0.0' // Of een nog nieuwere versie indien compatibel } } rootProject.allprojects { repositories { google() - jcenter() + mavenCentral() } } apply plugin: 'com.android.library' android { - compileSdkVersion 33 + compileSdkVersion 33 // Zorg ervoor dat deze overeenkomt met de laatste beschikbare versie of jouw specifieke vereisten + + // Voeg de namespace toe zoals vereist door de nieuwere versies van de Android Gradle Plugin + namespace 'xyz.justsoft.video_thumbnail' defaultConfig { minSdkVersion 16 From 0463c965ee9e00179e0ccb67d4534c699c9a11ba Mon Sep 17 00:00:00 2001 From: jennifer-ha <82815655+jennifer-ha@users.noreply.github.com> Date: Fri, 22 Mar 2024 20:37:01 +0100 Subject: [PATCH 2/5] Update build.gradle Upgraded Android Gradle Plugin: Moved from AGP version 4.1.0 to 7.0.0. This upgrade allows us to take advantage of the latest features, performance improvements, and bug fixes introduced in recent AGP releases. Namespace Specification: Added the namespace declaration in the build.gradle file to comply with the new AGP requirements. This ensures our project adheres to the latest Android build standards. Repository Migration: Transitioned from jcenter() to mavenCentral() for fetching dependencies. This change is in response to the deprecation of JCenter as a repository, ensuring our project dependencies are fetched from a reliable and updated source. --- android/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index f7fff60..b233ca6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,13 +4,13 @@ version '1.0-SNAPSHOT' buildscript { repositories { google() - // jcenter() is verouderd en zou idealiter vervangen moeten worden door mavenCentral() indien mogelijk + // jcenter() is deprecated and should ideally be replaced by mavenCentral() if possible mavenCentral() } dependencies { - // Update de classpath naar een nieuwere versie van de Android Gradle Plugin - classpath 'com.android.tools.build:gradle:7.0.0' // Of een nog nieuwere versie indien compatibel + // Update the classpath to a newer version of the Android Gradle Plugin + classpath 'com.android.tools.build:gradle:7.0.0' // Or a newer version if compatible } } @@ -24,9 +24,9 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - compileSdkVersion 33 // Zorg ervoor dat deze overeenkomt met de laatste beschikbare versie of jouw specifieke vereisten + compileSdkVersion 34 // Ensure this matches the latest available version - // Voeg de namespace toe zoals vereist door de nieuwere versies van de Android Gradle Plugin + // Add the namespace as required by the newer versions of the Android Gradle Plugin namespace 'xyz.justsoft.video_thumbnail' defaultConfig { From 834d9b63a63d1f91843801428cfd56f052776436 Mon Sep 17 00:00:00 2001 From: jennifer-ha <82815655+jennifer-ha@users.noreply.github.com> Date: Fri, 22 Mar 2024 20:48:33 +0100 Subject: [PATCH 3/5] Update build.gradle add if (project.android.hasProperty("namespace")) { --- android/build.gradle | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b233ca6..8bd4e8b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,13 +4,11 @@ version '1.0-SNAPSHOT' buildscript { repositories { google() - // jcenter() is deprecated and should ideally be replaced by mavenCentral() if possible mavenCentral() } dependencies { - // Update the classpath to a newer version of the Android Gradle Plugin - classpath 'com.android.tools.build:gradle:7.0.0' // Or a newer version if compatible + classpath 'com.android.tools.build:gradle:7.0.0' } } @@ -26,8 +24,9 @@ apply plugin: 'com.android.library' android { compileSdkVersion 34 // Ensure this matches the latest available version - // Add the namespace as required by the newer versions of the Android Gradle Plugin - namespace 'xyz.justsoft.video_thumbnail' + if (project.android.hasProperty("namespace")) { + namespace "xyz.justsoft.video_thumbnail" + } defaultConfig { minSdkVersion 16 From 91c183974b860c3108f710457bb9898b4d4c2039 Mon Sep 17 00:00:00 2001 From: jennifer-ha <82815655+jennifer-ha@users.noreply.github.com> Date: Fri, 22 Mar 2024 20:54:59 +0100 Subject: [PATCH 4/5] Update video_thumbnail.dart required String thumbnailPath, --- lib/video_thumbnail.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/video_thumbnail.dart b/lib/video_thumbnail.dart index 78eb749..dc47bcd 100644 --- a/lib/video_thumbnail.dart +++ b/lib/video_thumbnail.dart @@ -27,7 +27,7 @@ class VideoThumbnail { static Future thumbnailFile( {required String video, Map? headers, - String? thumbnailPath, + required String thumbnailPath, ImageFormat imageFormat = ImageFormat.PNG, int maxHeight = 0, int maxWidth = 0, From 6a6052886e8f9d6cdb41b44ae59c29400c80a451 Mon Sep 17 00:00:00 2001 From: jennifer-ha <82815655+jennifer-ha@users.noreply.github.com> Date: Fri, 22 Mar 2024 20:56:42 +0100 Subject: [PATCH 5/5] Update build.gradle classpath 'com.android.tools.build:gradle:7.1.2' --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8bd4e8b..90fe06d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.0.0' + classpath 'com.android.tools.build:gradle:7.1.2' } }