Skip to content

Commit 2d1ce1e

Browse files
committed
Update ffigen_codelab
1 parent 4f36c6b commit 2d1ce1e

File tree

72 files changed

+735
-595
lines changed

Some content is hidden

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

72 files changed

+735
-595
lines changed

ffigen_codelab/step_03/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related
@@ -26,4 +28,6 @@ migrate_working_dir/
2628
/pubspec.lock
2729
**/doc/api/
2830
.dart_tool/
31+
.flutter-plugins
32+
.flutter-plugins-dependencies
2933
build/

ffigen_codelab/step_03/android/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ buildscript {
1111

1212
dependencies {
1313
// The Android Gradle Plugin knows how to build native code with the NDK.
14-
classpath("com.android.tools.build:gradle:7.3.0")
14+
classpath("com.android.tools.build:gradle:8.1.0")
1515
}
1616
}
1717

@@ -25,13 +25,11 @@ rootProject.allprojects {
2525
apply plugin: "com.android.library"
2626

2727
android {
28-
if (project.android.hasProperty("namespace")) {
29-
namespace = "com.example.ffigen_app"
30-
}
28+
namespace = "com.example.ffigen_app"
3129

3230
// Bumping the plugin compileSdk version requires all clients of this plugin
3331
// to bump the version in their app.
34-
compileSdk = 34
32+
compileSdk = 35
3533

3634
// Use the NDK version
3735
// declared in /android/app/build.gradle file of the Flutter project.
@@ -55,8 +53,8 @@ android {
5553
}
5654

5755
compileOptions {
58-
sourceCompatibility = JavaVersion.VERSION_1_8
59-
targetCompatibility = JavaVersion.VERSION_1_8
56+
sourceCompatibility = JavaVersion.VERSION_11
57+
targetCompatibility = JavaVersion.VERSION_11
6058
}
6159

6260
defaultConfig {

ffigen_codelab/step_03/example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
1+
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true

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

ffigen_codelab/step_03/example/android/settings.gradle

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

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "7.3.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
21+
id "com.android.application" version "8.1.0" apply false
22+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2323
}
2424

2525
include ":app"

ffigen_codelab/step_03/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 63 additions & 63 deletions
Large diffs are not rendered by default.

ffigen_codelab/step_03/example/linux/CMakeLists.txt

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Project-level configuration.
2-
cmake_minimum_required(VERSION 3.10)
2+
cmake_minimum_required(VERSION 3.13)
33
project(runner LANGUAGES CXX)
44

55
# The name of the executable created for the application. Change this to change
@@ -54,25 +54,8 @@ add_subdirectory(${FLUTTER_MANAGED_DIR})
5454
find_package(PkgConfig REQUIRED)
5555
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
5656

57-
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
58-
59-
# Define the application target. To change its name, change BINARY_NAME above,
60-
# not the value here, or `flutter run` will no longer work.
61-
#
62-
# Any new source files that you add to the application should be added here.
63-
add_executable(${BINARY_NAME}
64-
"main.cc"
65-
"my_application.cc"
66-
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
67-
)
68-
69-
# Apply the standard set of build settings. This can be removed for applications
70-
# that need different build settings.
71-
apply_standard_settings(${BINARY_NAME})
72-
73-
# Add dependency libraries. Add any application-specific dependencies here.
74-
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
75-
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
57+
# Application build; see runner/CMakeLists.txt.
58+
add_subdirectory("runner")
7659

7760
# Run the Flutter tool portions of the build. This must not be removed.
7861
add_dependencies(${BINARY_NAME} flutter_assemble)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
cmake_minimum_required(VERSION 3.13)
2+
project(runner LANGUAGES CXX)
3+
4+
# Define the application target. To change its name, change BINARY_NAME in the
5+
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6+
# work.
7+
#
8+
# Any new source files that you add to the application should be added here.
9+
add_executable(${BINARY_NAME}
10+
"main.cc"
11+
"my_application.cc"
12+
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
13+
)
14+
15+
# Apply the standard set of build settings. This can be removed for applications
16+
# that need different build settings.
17+
apply_standard_settings(${BINARY_NAME})
18+
19+
# Add preprocessor definitions for the application ID.
20+
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
21+
22+
# Add dependency libraries. Add any application-specific dependencies here.
23+
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
24+
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
25+
26+
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")

0 commit comments

Comments
 (0)