Skip to content

Commit

Permalink
Update to AGP 7.3 and flutter 3.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed May 31, 2023
1 parent 8138b97 commit 2a4f5d5
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 14 deletions.
4 changes: 3 additions & 1 deletion audio_service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## 0.18.10

* Added the namespace field to comply to new Android AGP needs.
* Add support for AGP 8 (@theskyblockman).
* Update AGP to 7.3.0.
* Update minimum flutter version to 3.0.

## 0.18.9

Expand Down
11 changes: 6 additions & 5 deletions audio_service/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

Expand All @@ -27,7 +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.audioservice'
}
compileSdkVersion 33

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -40,9 +44,6 @@ android {
lintOptions {
disable 'InvalidPackage'
}
if (project.android.hasProperty("namespace")) {
namespace 'com.ryanheise.audioservice'
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
3 changes: 2 additions & 1 deletion audio_service/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
namespace 'com.ryanheise.audioserviceexample'
compileSdkVersion 33

lintOptions {
disable 'InvalidPackage'
Expand Down
11 changes: 9 additions & 2 deletions audio_service/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

Expand All @@ -14,6 +14,13 @@ allprojects {
google()
mavenCentral()
}

gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
options.compilerArgs << "-Xlint:unchecked"
}
}
}

rootProject.buildDir = '../build'
Expand All @@ -24,6 +31,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
3 changes: 2 additions & 1 deletion audio_service/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ description: Demonstrates how to use the audio_service plugin.
publish_to: 'none'

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: ">=2.14.0 <4.0.0"
flutter: ">=3.0.0"

dependencies:
flutter:
Expand Down
4 changes: 2 additions & 2 deletions audio_service/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version: 0.18.10
homepage: https://github.com/ryanheise/audio_service/tree/master/audio_service

environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"
sdk: ">=2.14.0 <4.0.0"
flutter: ">=3.0.0"

dependencies:
# Use these deps for local development
Expand Down

0 comments on commit 2a4f5d5

Please sign in to comment.