Skip to content

Commit bc0a1e8

Browse files
authored
feat: Updated template of all plugins and example app to Flutter 3.29 standard (#760)
1 parent 6562f63 commit bc0a1e8

File tree

189 files changed

+1677
-816
lines changed

Some content is hidden

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

189 files changed

+1677
-816
lines changed

CHANGELOG.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,132 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 2025-03-19
7+
8+
### Changes
9+
10+
---
11+
12+
Packages with changes:
13+
14+
- [`google_ml_kit` - `v0.20.0`](#google_ml_kit---v0200)
15+
- [`google_mlkit_barcode_scanning` - `v0.14.0`](#google_mlkit_barcode_scanning---v0140)
16+
- [`google_mlkit_commons` - `v0.11.0`](#google_mlkit_commons---v0110)
17+
- [`google_mlkit_digital_ink_recognition` - `v0.14.0`](#google_mlkit_digital_ink_recognition---v0140)
18+
- [`google_mlkit_document_scanner` - `v0.4.0`](#google_mlkit_document_scanner---v040)
19+
- [`google_mlkit_entity_extraction` - `v0.15.0`](#google_mlkit_entity_extraction---v0150)
20+
- [`google_mlkit_face_detection` - `v0.13.0`](#google_mlkit_face_detection---v0130)
21+
- [`google_mlkit_face_mesh_detection` - `v0.4.0`](#google_mlkit_face_mesh_detection---v040)
22+
- [`google_mlkit_image_labeling` - `v0.14.0`](#google_mlkit_image_labeling---v0140)
23+
- [`google_mlkit_language_id` - `v0.13.0`](#google_mlkit_language_id---v0130)
24+
- [`google_mlkit_object_detection` - `v0.15.0`](#google_mlkit_object_detection---v0150)
25+
- [`google_mlkit_pose_detection` - `v0.14.0`](#google_mlkit_pose_detection---v0140)
26+
- [`google_mlkit_selfie_segmentation` - `v0.10.0`](#google_mlkit_selfie_segmentation---v0100)
27+
- [`google_mlkit_smart_reply` - `v0.13.0`](#google_mlkit_smart_reply---v0130)
28+
- [`google_mlkit_subject_segmentation` - `v0.0.2`](#google_mlkit_subject_segmentation---v002)
29+
- [`google_mlkit_text_recognition` - `v0.15.0`](#google_mlkit_text_recognition---v0150)
30+
- [`google_mlkit_translation` - `v0.13.0`](#google_mlkit_translation---v0130)
31+
32+
---
33+
34+
#### `google_ml_kit` - `v0.20.0`
35+
36+
* Increase android sdk compile version to 35
37+
* Updates Java compatibility version to 11
38+
39+
#### `google_mlkit_barcode_scanning` - `v0.14.0`
40+
41+
* Increase android sdk compile version to 35
42+
* Updates Java compatibility version to 11
43+
* Update dependencies.
44+
45+
#### `google_mlkit_commons` - `v0.11.0`
46+
47+
* Increase android sdk compile version to 35
48+
* Updates Java compatibility version to 11
49+
50+
#### `google_mlkit_digital_ink_recognition` - `v0.14.0`
51+
52+
* Increase android sdk compile version to 35
53+
* Updates Java compatibility version to 11
54+
* Update dependencies.
55+
56+
#### `google_mlkit_document_scanner` - `v0.4.0`
57+
58+
* Increase android sdk compile version to 35
59+
* Updates Java compatibility version to 11
60+
61+
#### `google_mlkit_entity_extraction` - `v0.15.0`
62+
63+
* Increase android sdk compile version to 35
64+
* Updates Java compatibility version to 11
65+
* Update dependencies.
66+
67+
#### `google_mlkit_face_detection` - `v0.13.0`
68+
69+
* Increase android sdk compile version to 35
70+
* Updates Java compatibility version to 11
71+
* Update dependencies.
72+
73+
#### `google_mlkit_face_mesh_detection` - `v0.4.0`
74+
75+
* Increase android sdk compile version to 35
76+
* Updates Java compatibility version to 11
77+
* Update dependencies.
78+
79+
#### `google_mlkit_image_labeling` - `v0.14.0`
80+
81+
* Increase android sdk compile version to 35
82+
* Updates Java compatibility version to 11
83+
* Update dependencies.
84+
85+
#### `google_mlkit_language_id` - `v0.13.0`
86+
87+
* Increase android sdk compile version to 35
88+
* Updates Java compatibility version to 11
89+
90+
#### `google_mlkit_object_detection` - `v0.15.0`
91+
92+
* Increase android sdk compile version to 35
93+
* Updates Java compatibility version to 11
94+
* Update dependencies.
95+
96+
#### `google_mlkit_pose_detection` - `v0.14.0`
97+
98+
* Increase android sdk compile version to 35
99+
* Updates Java compatibility version to 11
100+
* Update dependencies.
101+
102+
#### `google_mlkit_selfie_segmentation` - `v0.10.0`
103+
104+
* Increase android sdk compile version to 35
105+
* Updates Java compatibility version to 11
106+
* Update dependencies.
107+
108+
#### `google_mlkit_smart_reply` - `v0.13.0`
109+
110+
* Increase android sdk compile version to 35
111+
* Updates Java compatibility version to 11
112+
113+
#### `google_mlkit_subject_segmentation` - `v0.0.2`
114+
115+
* Increase android sdk compile version to 35
116+
* Updates Java compatibility version to 11
117+
* Update dependencies.
118+
119+
#### `google_mlkit_text_recognition` - `v0.15.0`
120+
121+
* Add an example showing how to extract text from a bitmap image with the new `InputImage.fromBitmap()` constructor.
122+
* Bumps the version to support the new `InputImage.fromBitmap()` constructor from `google_mlkit_commons`.
123+
* Increase android sdk compile version to 35
124+
* Updates Java compatibility version to 11
125+
126+
#### `google_mlkit_translation` - `v0.13.0`
127+
128+
* Increase android sdk compile version to 35
129+
* Updates Java compatibility version to 11
130+
* Update dependencies.
131+
6132
## 2024-10-07
7133

8134
### Changes

packages/example/.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
1112
./android/app/google-services.json
13+
.swiftpm/
14+
migrate_working_dir/
1215

1316
# IntelliJ related
1417
*.iml
@@ -27,16 +30,17 @@
2730
.dart_tool/
2831
.flutter-plugins
2932
.flutter-plugins-dependencies
30-
.packages
3133
.pub-cache/
3234
.pub/
3335
/build/
3436

35-
# Web related
36-
lib/generated_plugin_registrant.dart
37-
3837
# Symbolication related
3938
app.*.symbols
4039

4140
# Obfuscation related
4241
app.*.map.json
42+
43+
# Android Studio will place build artifacts here
44+
/android/app/debug
45+
/android/app/profile
46+
/android/app/release

packages/example/.metadata

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,30 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818
8-
channel: stable
7+
revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf"
8+
channel: "stable"
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
17+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
18+
- platform: android
19+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
20+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
21+
- platform: ios
22+
create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
23+
base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
24+
25+
# User provided section
26+
27+
# List of Local paths (relative to this file) that should be
28+
# ignored by the migrate tool.
29+
#
30+
# Files that are not part of the templates will be ignored by default.
31+
unmanaged_files:
32+
- 'lib/main.dart'
33+
- 'ios/Runner.xcodeproj/project.pbxproj'

packages/example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# google\_ml\_kit example app
1+
# google_ml_kit example app
22

33
Demonstrates how to use the google_mlkit plugins.
44

packages/example/android/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
# See https://flutter.dev/to/reference-keystore
1112
key.properties
1213
**/*.keystore
1314
**/*.jks

packages/example/android/app/build.gradle

Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
plugins {
2+
id("com.android.application")
3+
id("kotlin-android")
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id("dev.flutter.flutter-gradle-plugin")
6+
}
7+
8+
android {
9+
namespace = "com.google.ml.kit.flutter.example"
10+
compileSdk = flutter.compileSdkVersion
11+
ndkVersion = flutter.ndkVersion
12+
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
18+
kotlinOptions {
19+
jvmTarget = JavaVersion.VERSION_11.toString()
20+
}
21+
22+
defaultConfig {
23+
applicationId = "com.google.ml.kit.flutter.example"
24+
minSdk = 24
25+
targetSdk = flutter.targetSdkVersion
26+
versionCode = flutter.versionCode
27+
versionName = flutter.versionName
28+
}
29+
30+
buildTypes {
31+
release {
32+
signingConfig = signingConfigs.getByName("debug")
33+
}
34+
}
35+
36+
aaptOptions {
37+
noCompress("tflite") // Your model's file extension: "tflite", "lite", etc.
38+
}
39+
}
40+
41+
dependencies {
42+
// Add language package you need to use
43+
implementation("com.google.mlkit:text-recognition-chinese:16.0.0")
44+
implementation("com.google.mlkit:text-recognition-devanagari:16.0.0")
45+
implementation("com.google.mlkit:text-recognition-japanese:16.0.0")
46+
implementation("com.google.mlkit:text-recognition-korean:16.0.0")
47+
}
48+
49+
flutter {
50+
source = "../.."
51+
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
44
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
55
<application
6-
android:name="${applicationName}"
76
android:label="ML Kit in Flutter"
7+
android:name="${applicationName}"
88
android:icon="@mipmap/ic_launcher"
99
android:enableOnBackInvokedCallback="true">
1010
<activity
1111
android:name=".MainActivity"
1212
android:exported="true"
1313
android:launchMode="singleTop"
14+
android:taskAffinity=""
1415
android:theme="@style/LaunchTheme"
1516
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1617
android:hardwareAccelerated="true"
@@ -38,7 +39,7 @@
3839
android:value="2" />
3940
</application>
4041
<!-- Required to query activities that can process text, see:
41-
https://developer.android.com/training/package-visibility?hl=en and
42+
https://developer.android.com/training/package-visibility and
4243
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
4344
4445
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->

packages/example/android/app/src/main/kotlin/com/google/ml/kit/flutter/example/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package com.google.ml.kit.flutter.example
22

33
import io.flutter.embedding.android.FlutterActivity
44

5-
class MainActivity: FlutterActivity()
5+
class MainActivity : FlutterActivity()

packages/example/android/build.gradle

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)