Skip to content

Commit c29e3ab

Browse files
Update for Flutter 3.38 (#2361)
1 parent e58d108 commit c29e3ab

File tree

1,546 files changed

+16432
-14376
lines changed

Some content is hidden

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

1,546 files changed

+16432
-14376
lines changed

adaptive_app/step_03/android/app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ android {
1111
ndkVersion = flutter.ndkVersion
1212

1313
compileOptions {
14-
sourceCompatibility = JavaVersion.VERSION_11
15-
targetCompatibility = JavaVersion.VERSION_11
14+
sourceCompatibility = JavaVersion.VERSION_17
15+
targetCompatibility = JavaVersion.VERSION_17
1616
}
1717

1818
kotlinOptions {
19-
jvmTarget = JavaVersion.VERSION_11.toString()
19+
jvmTarget = JavaVersion.VERSION_17.toString()
2020
}
2121

2222
defaultConfig {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
3-
android.enableJetifier=true

adaptive_app/step_03/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-8.12-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip

adaptive_app/step_03/android/settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pluginManagement {
1919

2020
plugins {
2121
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
22-
id("com.android.application") version "8.9.1" apply false
23-
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
22+
id("com.android.application") version "8.11.1" apply false
23+
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
2424
}
2525

2626
include(":app")

adaptive_app/step_03/linux/runner/my_application.cc

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ struct _MyApplication {
1515
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
1616

1717
// Called when first Flutter frame received.
18-
static void first_frame_cb(MyApplication* self, FlView *view)
19-
{
18+
static void first_frame_cb(MyApplication* self, FlView* view) {
2019
gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view)));
2120
}
2221

@@ -56,19 +55,22 @@ static void my_application_activate(GApplication* application) {
5655
gtk_window_set_default_size(window, 1280, 720);
5756

5857
g_autoptr(FlDartProject) project = fl_dart_project_new();
59-
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
58+
fl_dart_project_set_dart_entrypoint_arguments(
59+
project, self->dart_entrypoint_arguments);
6060

6161
FlView* view = fl_view_new(project);
6262
GdkRGBA background_color;
63-
// Background defaults to black, override it here if necessary, e.g. #00000000 for transparent.
63+
// Background defaults to black, override it here if necessary, e.g. #00000000
64+
// for transparent.
6465
gdk_rgba_parse(&background_color, "#000000");
6566
fl_view_set_background_color(view, &background_color);
6667
gtk_widget_show(GTK_WIDGET(view));
6768
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
6869

6970
// Show the window when Flutter renders.
7071
// Requires the view to be realized so we can start rendering.
71-
g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), self);
72+
g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb),
73+
self);
7274
gtk_widget_realize(GTK_WIDGET(view));
7375

7476
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
@@ -77,16 +79,18 @@ static void my_application_activate(GApplication* application) {
7779
}
7880

7981
// Implements GApplication::local_command_line.
80-
static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
82+
static gboolean my_application_local_command_line(GApplication* application,
83+
gchar*** arguments,
84+
int* exit_status) {
8185
MyApplication* self = MY_APPLICATION(application);
8286
// Strip out the first argument as it is the binary name.
8387
self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
8488

8589
g_autoptr(GError) error = nullptr;
8690
if (!g_application_register(application, nullptr, &error)) {
87-
g_warning("Failed to register: %s", error->message);
88-
*exit_status = 1;
89-
return TRUE;
91+
g_warning("Failed to register: %s", error->message);
92+
*exit_status = 1;
93+
return TRUE;
9094
}
9195

9296
g_application_activate(application);
@@ -97,7 +101,7 @@ static gboolean my_application_local_command_line(GApplication* application, gch
97101

98102
// Implements GApplication::startup.
99103
static void my_application_startup(GApplication* application) {
100-
//MyApplication* self = MY_APPLICATION(object);
104+
// MyApplication* self = MY_APPLICATION(object);
101105

102106
// Perform any actions required at application startup.
103107

@@ -106,7 +110,7 @@ static void my_application_startup(GApplication* application) {
106110

107111
// Implements GApplication::shutdown.
108112
static void my_application_shutdown(GApplication* application) {
109-
//MyApplication* self = MY_APPLICATION(object);
113+
// MyApplication* self = MY_APPLICATION(object);
110114

111115
// Perform any actions required at application shutdown.
112116

@@ -122,7 +126,8 @@ static void my_application_dispose(GObject* object) {
122126

123127
static void my_application_class_init(MyApplicationClass* klass) {
124128
G_APPLICATION_CLASS(klass)->activate = my_application_activate;
125-
G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
129+
G_APPLICATION_CLASS(klass)->local_command_line =
130+
my_application_local_command_line;
126131
G_APPLICATION_CLASS(klass)->startup = my_application_startup;
127132
G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown;
128133
G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
@@ -138,7 +143,6 @@ MyApplication* my_application_new() {
138143
g_set_prgname(APPLICATION_ID);
139144

140145
return MY_APPLICATION(g_object_new(my_application_get_type(),
141-
"application-id", APPLICATION_ID,
142-
"flags", G_APPLICATION_NON_UNIQUE,
143-
nullptr));
146+
"application-id", APPLICATION_ID, "flags",
147+
G_APPLICATION_NON_UNIQUE, nullptr));
144148
}

adaptive_app/step_03/linux/runner/my_application.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33

44
#include <gtk/gtk.h>
55

6-
G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
6+
G_DECLARE_FINAL_TYPE(MyApplication,
7+
my_application,
8+
MY,
9+
APPLICATION,
710
GtkApplication)
811

912
/**

adaptive_app/step_03/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1919
version: 1.0.0+1
2020

2121
environment:
22-
sdk: ^3.9.0
22+
sdk: ^3.10.0-0
2323

2424
# Dependencies specify other packages that your package needs in order to work.
2525
# To automatically upgrade your package dependencies to the latest versions

adaptive_app/step_04/android/app/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ android {
1111
ndkVersion = flutter.ndkVersion
1212

1313
compileOptions {
14-
sourceCompatibility = JavaVersion.VERSION_11
15-
targetCompatibility = JavaVersion.VERSION_11
14+
sourceCompatibility = JavaVersion.VERSION_17
15+
targetCompatibility = JavaVersion.VERSION_17
1616
}
1717

1818
kotlinOptions {
19-
jvmTarget = JavaVersion.VERSION_11.toString()
19+
jvmTarget = JavaVersion.VERSION_17.toString()
2020
}
2121

2222
defaultConfig {
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
3-
android.enableJetifier=true

adaptive_app/step_04/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-8.12-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip

0 commit comments

Comments
 (0)