From a484f941d6362fb83f8ecfc3fbc51491ec57a408 Mon Sep 17 00:00:00 2001 From: Joseph Crowell Date: Fri, 26 May 2023 12:48:00 +1000 Subject: [PATCH 1/5] update build.gradle for AGP 8 compatibility --- just_audio/android/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/just_audio/android/build.gradle b/just_audio/android/build.gradle index 280fdacfe..0415d0c1f 100644 --- a/just_audio/android/build.gradle +++ b/just_audio/android/build.gradle @@ -28,6 +28,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion 31 + namespace 'com.ryanheise.audio_session' defaultConfig { minSdkVersion 16 From abdf6b7f1c254bb12efdad74622204ba32e94427 Mon Sep 17 00:00:00 2001 From: Joseph Crowell Date: Fri, 26 May 2023 12:50:29 +1000 Subject: [PATCH 2/5] Update build.gradle --- just_audio/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/just_audio/android/build.gradle b/just_audio/android/build.gradle index 0415d0c1f..730019eec 100644 --- a/just_audio/android/build.gradle +++ b/just_audio/android/build.gradle @@ -28,7 +28,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion 31 - namespace 'com.ryanheise.audio_session' + namespace 'com.ryanheise.just_audio' defaultConfig { minSdkVersion 16 From e6a76c129b5fd745515742f75c37f45c1a9167a6 Mon Sep 17 00:00:00 2001 From: Joseph Crowell Date: Fri, 26 May 2023 12:58:25 +1000 Subject: [PATCH 3/5] Update build.gradle gradle and exoplayer versions --- just_audio/android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/just_audio/android/build.gradle b/just_audio/android/build.gradle index 730019eec..b774bb984 100644 --- a/just_audio/android/build.gradle +++ b/just_audio/android/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:8.0.2' } } @@ -46,7 +46,7 @@ android { } dependencies { - def exoplayer_version = "2.18.1" + def exoplayer_version = "2.18.7" implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version" implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer_version" implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayer_version" From d6ca9865ebffcb9a03ee445e6918e7837b713b42 Mon Sep 17 00:00:00 2001 From: Joseph Crowell Date: Mon, 29 May 2023 09:18:01 +1000 Subject: [PATCH 4/5] make namespace conditional per Flutter's approach here https://github.com/flutter/flutter/issues/125621#issuecomment-1525995461 for compatibility with older AGP versions --- just_audio/android/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/just_audio/android/build.gradle b/just_audio/android/build.gradle index b774bb984..1512db8d0 100644 --- a/just_audio/android/build.gradle +++ b/just_audio/android/build.gradle @@ -28,7 +28,9 @@ apply plugin: 'com.android.library' android { compileSdkVersion 31 - namespace 'com.ryanheise.just_audio' + if (project.android.hasProperty("namespace")) { + namespace 'com.ryanheise.just_audio' + } defaultConfig { minSdkVersion 16 From af44d46e34be170e96fbf956b46adfc8db22f573 Mon Sep 17 00:00:00 2001 From: Ryan Heise Date: Wed, 31 May 2023 12:16:38 +1000 Subject: [PATCH 5/5] Update to AGP 7.30. --- just_audio/CHANGELOG.md | 5 +++++ just_audio/android/build.gradle | 5 +++-- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- just_audio/example/android/app/build.gradle | 3 ++- just_audio/example/android/build.gradle | 9 ++++++++- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- just_audio/pubspec.yaml | 2 +- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/just_audio/CHANGELOG.md b/just_audio/CHANGELOG.md index f1a69f1ca..735220e18 100644 --- a/just_audio/CHANGELOG.md +++ b/just_audio/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.9.34 + +* Support AGP 8 (@josephcrowell). +* Update AGP to 7.3.0. + ## 0.9.33 * Update minimum flutter version to 3.0. diff --git a/just_audio/android/build.gradle b/just_audio/android/build.gradle index 1512db8d0..2194fc675 100644 --- a/just_audio/android/build.gradle +++ b/just_audio/android/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.0.2' + classpath 'com.android.tools.build:gradle:7.3.0' } } @@ -27,10 +27,11 @@ project.getTasks().withType(JavaCompile) { apply plugin: 'com.android.library' android { - compileSdkVersion 31 + // Conditional for compatibility with AGP <4.2. if (project.android.hasProperty("namespace")) { namespace 'com.ryanheise.just_audio' } + compileSdkVersion 33 defaultConfig { minSdkVersion 16 diff --git a/just_audio/android/gradle/wrapper/gradle-wrapper.properties b/just_audio/android/gradle/wrapper/gradle-wrapper.properties index 3c9d0852b..3c472b99c 100644 --- a/just_audio/android/gradle/wrapper/gradle-wrapper.properties +++ b/just_audio/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/just_audio/example/android/app/build.gradle b/just_audio/example/android/app/build.gradle index b59d20728..b786c27cd 100644 --- a/just_audio/example/android/app/build.gradle +++ b/just_audio/example/android/app/build.gradle @@ -25,7 +25,8 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 31 + namespace 'com.ryanheise.just_audio_example' + compileSdkVersion 33 lintOptions { disable 'InvalidPackage' diff --git a/just_audio/example/android/build.gradle b/just_audio/example/android/build.gradle index 06f2b41dc..53a69d400 100644 --- a/just_audio/example/android/build.gradle +++ b/just_audio/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.3.0' } } @@ -14,6 +14,13 @@ allprojects { google() mavenCentral() } + + gradle.projectsEvaluated{ + tasks.withType(JavaCompile) { + options.compilerArgs << "-Xlint:deprecation" + options.compilerArgs << "-Xlint:unchecked" + } + } } rootProject.buildDir = '../build' diff --git a/just_audio/example/android/gradle/wrapper/gradle-wrapper.properties b/just_audio/example/android/gradle/wrapper/gradle-wrapper.properties index 14e30f741..3c472b99c 100644 --- a/just_audio/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/just_audio/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/just_audio/pubspec.yaml b/just_audio/pubspec.yaml index 2c4d4fc55..bbab38ff3 100644 --- a/just_audio/pubspec.yaml +++ b/just_audio/pubspec.yaml @@ -1,6 +1,6 @@ name: just_audio description: A feature-rich audio player for Flutter. Loop, clip and concatenate any sound from any source (asset/file/URL/stream) in a variety of audio formats with gapless playback. -version: 0.9.33 +version: 0.9.34 repository: https://github.com/ryanheise/just_audio/tree/minor/just_audio issue_tracker: https://github.com/ryanheise/just_audio/issues topics: