Skip to content

Commit 4e2cc50

Browse files
authored
[camera_android] Set buildconfig to true for compatibility with AGP 8.0+ (#4951)
Fixes flutter/flutter#134818 See #4535 for an example of when this was done for a different plugin.
1 parent bd67bee commit 4e2cc50

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

packages/camera/camera_android/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.10.8+10
2+
3+
* Sets android.defaults.buildfeatures.buildconfig to true for compatibility with AGP 8.0+.
4+
15
## 0.10.8+9
26

37
* Removes usage of `_ambiguate` method in example.

packages/camera/camera_android/android/build.gradle

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.0.2'
12+
classpath 'com.android.tools.build:gradle:8.1.1'
1313
}
1414
}
1515

@@ -27,6 +27,9 @@ project.getTasks().withType(JavaCompile){
2727
apply plugin: 'com.android.library'
2828

2929
android {
30+
buildFeatures {
31+
buildConfig true
32+
}
3033
// Conditional for compatibility with AGP <4.2.
3134
if (project.android.hasProperty("namespace")) {
3235
namespace 'io.flutter.plugins.camera'

packages/camera/camera_android/example/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

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

packages/camera/camera_android/example/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip

packages/camera/camera_android/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Android implementation of the camera plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
55

6-
version: 0.10.8+9
6+
version: 0.10.8+10
77

88
environment:
99
sdk: ">=2.19.0 <4.0.0"

0 commit comments

Comments
 (0)