Skip to content

Commit 124e330

Browse files
authored
[various] update agp and gradle for all examples in packages (#3822)
flutter/flutter#122213 Update gradle and AGP for all examples in packages ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style]. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing.
1 parent c71747d commit 124e330

File tree

133 files changed

+460
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+460
-214
lines changed

packages/animations/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ subprojects {
2626
project.evaluationDependsOn(':app')
2727
}
2828

29-
task clean(type: Delete) {
29+
tasks.register("clean", Delete) {
3030
delete rootProject.buildDir
3131
}

packages/animations/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-7.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ android {
2828
namespace 'io.flutter.plugins.cameraexample'
2929
compileSdkVersion flutter.compileSdkVersion
3030

31-
lintOptions {
32-
disable 'InvalidPackage'
33-
}
3431

3532
defaultConfig {
3633
applicationId "io.flutter.plugins.cameraexample"
@@ -51,6 +48,9 @@ android {
5148
matchingFallbacks = ['debug', 'release']
5249
}
5350
}
51+
lint {
52+
disable 'InvalidPackage'
53+
}
5454
}
5555

5656
flutter {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

packages/camera/camera/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:7.0.1'
8+
classpath 'com.android.tools.build:gradle:7.4.2'
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
}

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

Lines changed: 1 addition & 1 deletion
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.0.2-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip

packages/camera/camera_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.10.8
2+
3+
* Updates gradle, AGP and fixes some lint errors.
4+
15
## 0.10.7
26

37
* Adds support for NV21 as a new streaming format in Android which includes correct handling of

packages/camera/camera_android/android/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ android {
4848
targetCompatibility JavaVersion.VERSION_1_8
4949
}
5050

51+
lint {
52+
baseline = file("lint-baseline.xml")
53+
}
5154

5255
testOptions {
5356
unitTests.includeAndroidResources = true
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<issues format="6" by="lint 7.4.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.2)" variant="all" version="7.4.2">
3+
4+
<issue
5+
id="OldTargetApi"
6+
message="Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details."
7+
errorLine1=" targetSdkVersion 31"
8+
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
9+
<location
10+
file="build.gradle"
11+
line="34"
12+
column="9"/>
13+
</issue>
14+
15+
<issue
16+
id="ObsoleteSdkInt"
17+
message="Unnecessary; SDK_INT is always >= 21"
18+
errorLine1=" @TargetApi(Build.VERSION_CODES.LOLLIPOP)"
19+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
20+
<location
21+
file="src/main/java/io/flutter/plugins/camera/CameraDeviceWrapper.java"
22+
line="27"
23+
column="3"/>
24+
</issue>
25+
26+
</issues>

packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/Camera.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,15 @@ public void onOpened(@NonNull CameraDevice device) {
321321
cameraDevice = new DefaultCameraDeviceWrapper(device);
322322
try {
323323
startPreview();
324-
if (!recordingVideo) // only send initialization if we werent already recording and switching cameras
325-
dartMessenger.sendCameraInitializedEvent(
324+
if (!recordingVideo) { // only send initialization if we werent already recording and switching cameras
325+
dartMessenger.sendCameraInitializedEvent(
326326
resolutionFeature.getPreviewSize().getWidth(),
327327
resolutionFeature.getPreviewSize().getHeight(),
328328
cameraFeatures.getExposureLock().getValue(),
329329
cameraFeatures.getAutoFocus().getValue(),
330330
cameraFeatures.getExposurePoint().checkIsSupported(),
331331
cameraFeatures.getFocusPoint().checkIsSupported());
332-
332+
}
333333
} catch (Exception e) {
334334
if (BuildConfig.DEBUG) {
335335
Log.i(TAG, "open | onOpened error: " + e.getMessage());

0 commit comments

Comments
 (0)