Skip to content

Commit 7e84e4c

Browse files
added namespace for AGP8 compatibility (#43)
* added namespace for AGP8 compatibility * updated example, changelog * Update google_api_availability_android/CHANGELOG.md Co-authored-by: Maurits van Beusekom <[email protected]> --------- Co-authored-by: Maurits van Beusekom <[email protected]>
1 parent 7a01d7e commit 7e84e4c

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

google_api_availability/example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ apply plugin: 'com.android.application'
2525
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
28+
namespace 'com.baseflow.googleapiavailabilityexample'
2829
compileSdkVersion flutter.compileSdkVersion
2930

3031
compileOptions {

google_api_availability/example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
xmlns:tools="http://schemas.android.com/tools"
3-
package="com.baseflow.googleapiavailabilityexample">
4-
2+
xmlns:tools="http://schemas.android.com/tools">
53
<uses-permission android:name="android.permission.INTERNET" />
64

75
<application

google_api_availability/example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:4.1.0'
8+
classpath 'com.android.tools.build:gradle:7.3.0'
99
}
1010
}
1111

@@ -24,6 +24,6 @@ subprojects {
2424
project.evaluationDependsOn(':app')
2525
}
2626

27-
task clean(type: Delete) {
27+
tasks.register("clean", Delete) {
2828
delete rootProject.buildDir
2929
}

google_api_availability/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

google_api_availability_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.1
2+
3+
* Adds support for the namespace property to support Android Gradle Plugin (AGP) 8.
4+
15
## 1.0.0+1
26

37
* Declares `dartPluginClass` in pubspec declaration.

google_api_availability_android/android/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ rootProject.allprojects {
2222
apply plugin: 'com.android.library'
2323

2424
android {
25+
// Conditional for compatibility with AGP <4.2.
26+
if (project.android.hasProperty("namespace")) {
27+
namespace 'com.baseflow.googleapiavailability'
28+
}
29+
2530
compileSdkVersion 31
2631

2732
compileOptions {

google_api_availability_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: An Android implementation for the google_api_availability plugin.
33
repository: https://github.com/baseflow/flutter-google-api-availability/tree/main/google_api_availability_android
44
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
55
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
6-
version: 1.0.0+1
6+
version: 1.0.1
77

88
flutter:
99
plugin:

0 commit comments

Comments
 (0)