@sentry/wizard 3.39.0 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/README.md +21 -21
- package/bin.ts +5 -0
- package/codecov.yml +15 -0
- package/dist/bin.js +4 -0
- package/dist/bin.js.map +1 -1
- package/dist/e2e-tests/jest.config.d.ts +1 -0
- package/dist/e2e-tests/jest.config.js +1 -0
- package/dist/e2e-tests/jest.config.js.map +1 -1
- package/dist/e2e-tests/tests/flutter.test.d.ts +1 -0
- package/dist/e2e-tests/tests/flutter.test.js +190 -0
- package/dist/e2e-tests/tests/flutter.test.js.map +1 -0
- package/dist/e2e-tests/utils/index.d.ts +11 -0
- package/dist/e2e-tests/utils/index.js +36 -1
- package/dist/e2e-tests/utils/index.js.map +1 -1
- package/dist/lib/Constants.d.ts +1 -0
- package/dist/lib/Constants.js +5 -0
- package/dist/lib/Constants.js.map +1 -1
- package/dist/package.json +3 -2
- package/dist/src/apple/apple-wizard.js +2 -3
- package/dist/src/apple/apple-wizard.js.map +1 -1
- package/dist/src/apple/code-tools.d.ts +10 -0
- package/dist/src/apple/code-tools.js +16 -12
- package/dist/src/apple/code-tools.js.map +1 -1
- package/dist/src/apple/fastlane.d.ts +23 -0
- package/dist/src/apple/fastlane.js +11 -7
- package/dist/src/apple/fastlane.js.map +1 -1
- package/dist/src/apple/templates.d.ts +1 -1
- package/dist/src/apple/templates.js +0 -2
- package/dist/src/apple/templates.js.map +1 -1
- package/dist/src/apple/xcode-manager.d.ts +13 -9
- package/dist/src/apple/xcode-manager.js +146 -61
- package/dist/src/apple/xcode-manager.js.map +1 -1
- package/dist/src/flutter/code-tools.d.ts +17 -0
- package/dist/src/flutter/code-tools.js +263 -0
- package/dist/src/flutter/code-tools.js.map +1 -0
- package/dist/src/flutter/flutter-wizard.d.ts +2 -0
- package/dist/src/flutter/flutter-wizard.js +171 -0
- package/dist/src/flutter/flutter-wizard.js.map +1 -0
- package/dist/src/flutter/templates.d.ts +9 -0
- package/dist/src/flutter/templates.js +40 -0
- package/dist/src/flutter/templates.js.map +1 -0
- package/dist/src/nextjs/nextjs-wizard.js +5 -3
- package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
- package/dist/src/nuxt/nuxt-wizard.js +6 -4
- package/dist/src/nuxt/nuxt-wizard.js.map +1 -1
- package/dist/src/nuxt/sdk-setup.d.ts +1 -1
- package/dist/src/nuxt/sdk-setup.js +2 -1
- package/dist/src/nuxt/sdk-setup.js.map +1 -1
- package/dist/src/react-native/react-native-wizard.js +5 -3
- package/dist/src/react-native/react-native-wizard.js.map +1 -1
- package/dist/src/remix/remix-wizard.js +5 -3
- package/dist/src/remix/remix-wizard.js.map +1 -1
- package/dist/src/run.d.ts +2 -1
- package/dist/src/run.js +40 -32
- package/dist/src/run.js.map +1 -1
- package/dist/src/sveltekit/sveltekit-wizard.js +5 -3
- package/dist/src/sveltekit/sveltekit-wizard.js.map +1 -1
- package/dist/src/utils/clack-utils.d.ts +4 -2
- package/dist/src/utils/clack-utils.js +18 -12
- package/dist/src/utils/clack-utils.js.map +1 -1
- package/dist/src/utils/package-manager.d.ts +1 -0
- package/dist/src/utils/package-manager.js +5 -0
- package/dist/src/utils/package-manager.js.map +1 -1
- package/dist/src/utils/types.d.ts +9 -0
- package/dist/src/utils/types.js.map +1 -1
- package/dist/test/apple/cocoapod.test.d.ts +1 -0
- package/dist/test/apple/cocoapod.test.js +409 -0
- package/dist/test/apple/cocoapod.test.js.map +1 -0
- package/dist/test/apple/code-tools.test.d.ts +1 -0
- package/dist/test/apple/code-tools.test.js +673 -0
- package/dist/test/apple/code-tools.test.js.map +1 -0
- package/dist/test/apple/fastfile.test.d.ts +1 -0
- package/dist/test/apple/fastfile.test.js +431 -0
- package/dist/test/apple/fastfile.test.js.map +1 -0
- package/dist/test/apple/templates.test.d.ts +1 -0
- package/dist/test/apple/templates.test.js +73 -0
- package/dist/test/apple/templates.test.js.map +1 -0
- package/dist/test/apple/xcode-manager.test.d.ts +1 -0
- package/dist/test/apple/xcode-manager.test.js +834 -0
- package/dist/test/apple/xcode-manager.test.js.map +1 -0
- package/dist/test/flutter/code-tools.test.d.ts +1 -0
- package/dist/test/flutter/code-tools.test.js +84 -0
- package/dist/test/flutter/code-tools.test.js.map +1 -0
- package/dist/test/flutter/templates.test.d.ts +1 -0
- package/dist/test/flutter/templates.test.js +41 -0
- package/dist/test/flutter/templates.test.js.map +1 -0
- package/dist/test/utils/clack-utils.test.js +89 -0
- package/dist/test/utils/clack-utils.test.js.map +1 -1
- package/e2e-tests/README.md +5 -1
- package/e2e-tests/jest.config.ts +1 -0
- package/e2e-tests/test-applications/apple/damaged-missing-configuration-list/Project.xcodeproj/project.pbxproj +52 -0
- package/e2e-tests/test-applications/apple/damaged-missing-configuration-list/Project.xcodeproj/xcshareddata/xcschemes/Project1.xcscheme +78 -0
- package/e2e-tests/test-applications/apple/no-targets/Project.xcodeproj/project.pbxproj +62 -0
- package/e2e-tests/test-applications/apple/no-targets/Project.xcodeproj/xcshareddata/xcschemes/Project1.xcscheme +78 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-multi-targets/Project.xcodeproj/project.pbxproj +470 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-multi-targets/Project.xcodeproj/xcshareddata/xcschemes/Project1.xcscheme +78 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-multi-targets/Project1/ContentView.swift +7 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-multi-targets/Project1/Project1App.swift +10 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-multi-targets/Project2/ContentView.swift +7 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-multi-targets/Project2/Project2App.swift +10 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-single-target/Project.xcodeproj/project.pbxproj +382 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-single-target/Project.xcodeproj/xcshareddata/xcschemes/Project.xcscheme +78 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-single-target/Sources/ContentView.swift +7 -0
- package/e2e-tests/test-applications/apple/spm-swiftui-single-target/Sources/MainApp.swift +10 -0
- package/e2e-tests/test-applications/flutter-test-app/.metadata +45 -0
- package/e2e-tests/test-applications/flutter-test-app/README.md +16 -0
- package/e2e-tests/test-applications/flutter-test-app/analysis_options.yaml +28 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/build.gradle +44 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/debug/AndroidManifest.xml +7 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/AndroidManifest.xml +45 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/kotlin/com/example/flutter_magic/MainActivity.kt +5 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/drawable/launch_background.xml +12 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/values/styles.xml +18 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/values-night/styles.xml +18 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/profile/AndroidManifest.xml +7 -0
- package/e2e-tests/test-applications/flutter-test-app/android/build.gradle +18 -0
- package/e2e-tests/test-applications/flutter-test-app/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/e2e-tests/test-applications/flutter-test-app/android/gradle.properties +3 -0
- package/e2e-tests/test-applications/flutter-test-app/android/settings.gradle +25 -0
- package/e2e-tests/test-applications/flutter-test-app/lib/main.dart +125 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/CMakeLists.txt +145 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/flutter/CMakeLists.txt +88 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/flutter/generated_plugin_registrant.cc +11 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/flutter/generated_plugin_registrant.h +15 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/flutter/generated_plugins.cmake +23 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/main.cc +6 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/my_application.cc +124 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/my_application.h +18 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Flutter/Flutter-Debug.xcconfig +2 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Flutter/Flutter-Release.xcconfig +2 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Flutter/GeneratedPluginRegistrant.swift +10 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Podfile +43 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/AppDelegate.swift +9 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Base.lproj/MainMenu.xib +343 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Configs/AppInfo.xcconfig +14 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Configs/Debug.xcconfig +2 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Configs/Release.xcconfig +2 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Configs/Warnings.xcconfig +13 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/DebugProfile.entitlements +12 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Info.plist +32 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/MainFlutterWindow.swift +15 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Release.entitlements +8 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcodeproj/project.pbxproj +705 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +98 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcworkspace/contents.xcworkspacedata +7 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/RunnerTests/RunnerTests.swift +12 -0
- package/e2e-tests/test-applications/flutter-test-app/pubspec.lock +213 -0
- package/e2e-tests/test-applications/flutter-test-app/pubspec.yaml +89 -0
- package/e2e-tests/test-applications/flutter-test-app/test/widget_test.dart +30 -0
- package/e2e-tests/test-applications/flutter-test-app/web/favicon.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/icons/Icon-192.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/icons/Icon-512.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/icons/Icon-maskable-192.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/icons/Icon-maskable-512.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/index.html +38 -0
- package/e2e-tests/test-applications/flutter-test-app/web/manifest.json +35 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/CMakeLists.txt +108 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/flutter/CMakeLists.txt +109 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/flutter/generated_plugin_registrant.cc +11 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/flutter/generated_plugin_registrant.h +15 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/flutter/generated_plugins.cmake +23 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/CMakeLists.txt +40 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/Runner.rc +121 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/flutter_window.cpp +71 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/flutter_window.h +33 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/main.cpp +43 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/resource.h +16 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/resources/app_icon.ico +0 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/runner.exe.manifest +14 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/utils.cpp +65 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/utils.h +19 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/win32_window.cpp +288 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/win32_window.h +102 -0
- package/e2e-tests/tests/flutter.test.ts +127 -0
- package/e2e-tests/utils/index.ts +33 -0
- package/lib/Constants.ts +5 -0
- package/package.json +3 -2
- package/src/apple/apple-wizard.ts +2 -3
- package/src/apple/code-tools.ts +21 -6
- package/src/apple/fastlane.ts +18 -2
- package/src/apple/templates.ts +2 -2
- package/src/apple/xcode-manager.ts +186 -99
- package/src/flutter/code-tools.ts +284 -0
- package/src/flutter/flutter-wizard.ts +164 -0
- package/src/flutter/templates.ts +90 -0
- package/src/nextjs/nextjs-wizard.ts +5 -2
- package/src/nuxt/nuxt-wizard.ts +6 -3
- package/src/nuxt/sdk-setup.ts +2 -0
- package/src/react-native/react-native-wizard.ts +5 -2
- package/src/remix/remix-wizard.ts +5 -2
- package/src/run.ts +9 -0
- package/src/sveltekit/sveltekit-wizard.ts +5 -2
- package/src/utils/clack-utils.ts +16 -4
- package/src/utils/package-manager.ts +6 -0
- package/src/utils/types.ts +10 -0
- package/test/apple/cocoapod.test.ts +306 -0
- package/test/apple/code-tools.test.ts +1042 -0
- package/test/apple/fastfile.test.ts +550 -0
- package/test/apple/templates.test.ts +191 -0
- package/test/apple/xcode-manager.test.ts +1066 -0
- package/test/flutter/code-tools.test.ts +212 -0
- package/test/flutter/templates.test.ts +100 -0
- package/test/utils/clack-utils.test.ts +92 -0
- package/types/xcode.d.ts +526 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file configures the analyzer, which statically analyzes Dart code to
|
|
2
|
+
# check for errors, warnings, and lints.
|
|
3
|
+
#
|
|
4
|
+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
|
5
|
+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
|
6
|
+
# invoked from the command line by running `flutter analyze`.
|
|
7
|
+
|
|
8
|
+
# The following line activates a set of recommended lints for Flutter apps,
|
|
9
|
+
# packages, and plugins designed to encourage good coding practices.
|
|
10
|
+
include: package:flutter_lints/flutter.yaml
|
|
11
|
+
|
|
12
|
+
linter:
|
|
13
|
+
# The lint rules applied to this project can be customized in the
|
|
14
|
+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
|
15
|
+
# included above or to enable additional rules. A list of all available lints
|
|
16
|
+
# and their documentation is published at https://dart.dev/lints.
|
|
17
|
+
#
|
|
18
|
+
# Instead of disabling a lint rule for the entire project in the
|
|
19
|
+
# section below, it can also be suppressed for a single line of code
|
|
20
|
+
# or a specific dart file by using the `// ignore: name_of_lint` and
|
|
21
|
+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
|
22
|
+
# producing the lint.
|
|
23
|
+
rules:
|
|
24
|
+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
|
25
|
+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
|
26
|
+
|
|
27
|
+
# Additional information about this file can be found at
|
|
28
|
+
# https://dart.dev/guides/language/analysis-options
|
|
@@ -0,0 +1,44 @@
|
|
|
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.example.flutter_magic"
|
|
10
|
+
compileSdk = flutter.compileSdkVersion
|
|
11
|
+
ndkVersion = flutter.ndkVersion
|
|
12
|
+
|
|
13
|
+
compileOptions {
|
|
14
|
+
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
15
|
+
targetCompatibility = JavaVersion.VERSION_1_8
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
kotlinOptions {
|
|
19
|
+
jvmTarget = JavaVersion.VERSION_1_8
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
defaultConfig {
|
|
23
|
+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
24
|
+
applicationId = "com.example.flutter_magic"
|
|
25
|
+
// You can update the following values to match your application needs.
|
|
26
|
+
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
|
27
|
+
minSdk = flutter.minSdkVersion
|
|
28
|
+
targetSdk = flutter.targetSdkVersion
|
|
29
|
+
versionCode = flutter.versionCode
|
|
30
|
+
versionName = flutter.versionName
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
buildTypes {
|
|
34
|
+
release {
|
|
35
|
+
// TODO: Add your own signing config for the release build.
|
|
36
|
+
// Signing with the debug keys for now, so `flutter run --release` works.
|
|
37
|
+
signingConfig = signingConfigs.debug
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
flutter {
|
|
43
|
+
source = "../.."
|
|
44
|
+
}
|
package/e2e-tests/test-applications/flutter-test-app/android/app/src/debug/AndroidManifest.xml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
<!-- The INTERNET permission is required for development. Specifically,
|
|
3
|
+
the Flutter tool needs it to communicate with the running application
|
|
4
|
+
to allow setting breakpoints, to provide hot reload, etc.
|
|
5
|
+
-->
|
|
6
|
+
<uses-permission android:name="android.permission.INTERNET"/>
|
|
7
|
+
</manifest>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
<application
|
|
3
|
+
android:label="flutter_magic"
|
|
4
|
+
android:name="${applicationName}"
|
|
5
|
+
android:icon="@mipmap/ic_launcher">
|
|
6
|
+
<activity
|
|
7
|
+
android:name=".MainActivity"
|
|
8
|
+
android:exported="true"
|
|
9
|
+
android:launchMode="singleTop"
|
|
10
|
+
android:taskAffinity=""
|
|
11
|
+
android:theme="@style/LaunchTheme"
|
|
12
|
+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
|
13
|
+
android:hardwareAccelerated="true"
|
|
14
|
+
android:windowSoftInputMode="adjustResize">
|
|
15
|
+
<!-- Specifies an Android theme to apply to this Activity as soon as
|
|
16
|
+
the Android process has started. This theme is visible to the user
|
|
17
|
+
while the Flutter UI initializes. After that, this theme continues
|
|
18
|
+
to determine the Window background behind the Flutter UI. -->
|
|
19
|
+
<meta-data
|
|
20
|
+
android:name="io.flutter.embedding.android.NormalTheme"
|
|
21
|
+
android:resource="@style/NormalTheme"
|
|
22
|
+
/>
|
|
23
|
+
<intent-filter>
|
|
24
|
+
<action android:name="android.intent.action.MAIN"/>
|
|
25
|
+
<category android:name="android.intent.category.LAUNCHER"/>
|
|
26
|
+
</intent-filter>
|
|
27
|
+
</activity>
|
|
28
|
+
<!-- Don't delete the meta-data below.
|
|
29
|
+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
|
30
|
+
<meta-data
|
|
31
|
+
android:name="flutterEmbedding"
|
|
32
|
+
android:value="2" />
|
|
33
|
+
</application>
|
|
34
|
+
<!-- Required to query activities that can process text, see:
|
|
35
|
+
https://developer.android.com/training/package-visibility and
|
|
36
|
+
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
|
37
|
+
|
|
38
|
+
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
|
39
|
+
<queries>
|
|
40
|
+
<intent>
|
|
41
|
+
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
|
42
|
+
<data android:mimeType="text/plain"/>
|
|
43
|
+
</intent>
|
|
44
|
+
</queries>
|
|
45
|
+
</manifest>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Modify this file to customize your launch splash screen -->
|
|
3
|
+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
4
|
+
<item android:drawable="@android:color/white" />
|
|
5
|
+
|
|
6
|
+
<!-- You can insert your own image assets here -->
|
|
7
|
+
<!-- <item>
|
|
8
|
+
<bitmap
|
|
9
|
+
android:gravity="center"
|
|
10
|
+
android:src="@mipmap/launch_image" />
|
|
11
|
+
</item> -->
|
|
12
|
+
</layer-list>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Modify this file to customize your launch splash screen -->
|
|
3
|
+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
4
|
+
<item android:drawable="?android:colorBackground" />
|
|
5
|
+
|
|
6
|
+
<!-- You can insert your own image assets here -->
|
|
7
|
+
<!-- <item>
|
|
8
|
+
<bitmap
|
|
9
|
+
android:gravity="center"
|
|
10
|
+
android:src="@mipmap/launch_image" />
|
|
11
|
+
</item> -->
|
|
12
|
+
</layer-list>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/values/styles.xml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<resources>
|
|
3
|
+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
|
4
|
+
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
|
5
|
+
<!-- Show a splash screen on the activity. Automatically removed when
|
|
6
|
+
the Flutter engine draws its first frame -->
|
|
7
|
+
<item name="android:windowBackground">@drawable/launch_background</item>
|
|
8
|
+
</style>
|
|
9
|
+
<!-- Theme applied to the Android Window as soon as the process has started.
|
|
10
|
+
This theme determines the color of the Android Window while your
|
|
11
|
+
Flutter UI initializes, as well as behind your Flutter UI while its
|
|
12
|
+
running.
|
|
13
|
+
|
|
14
|
+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
|
15
|
+
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
|
16
|
+
<item name="android:windowBackground">?android:colorBackground</item>
|
|
17
|
+
</style>
|
|
18
|
+
</resources>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<resources>
|
|
3
|
+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
|
4
|
+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
|
5
|
+
<!-- Show a splash screen on the activity. Automatically removed when
|
|
6
|
+
the Flutter engine draws its first frame -->
|
|
7
|
+
<item name="android:windowBackground">@drawable/launch_background</item>
|
|
8
|
+
</style>
|
|
9
|
+
<!-- Theme applied to the Android Window as soon as the process has started.
|
|
10
|
+
This theme determines the color of the Android Window while your
|
|
11
|
+
Flutter UI initializes, as well as behind your Flutter UI while its
|
|
12
|
+
running.
|
|
13
|
+
|
|
14
|
+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
|
15
|
+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
|
16
|
+
<item name="android:windowBackground">?android:colorBackground</item>
|
|
17
|
+
</style>
|
|
18
|
+
</resources>
|
package/e2e-tests/test-applications/flutter-test-app/android/app/src/profile/AndroidManifest.xml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
<!-- The INTERNET permission is required for development. Specifically,
|
|
3
|
+
the Flutter tool needs it to communicate with the running application
|
|
4
|
+
to allow setting breakpoints, to provide hot reload, etc.
|
|
5
|
+
-->
|
|
6
|
+
<uses-permission android:name="android.permission.INTERNET"/>
|
|
7
|
+
</manifest>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
allprojects {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
rootProject.buildDir = "../build"
|
|
9
|
+
subprojects {
|
|
10
|
+
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
|
11
|
+
}
|
|
12
|
+
subprojects {
|
|
13
|
+
project.evaluationDependsOn(":app")
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
tasks.register("clean", Delete) {
|
|
17
|
+
delete rootProject.buildDir
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
pluginManagement {
|
|
2
|
+
def flutterSdkPath = {
|
|
3
|
+
def properties = new Properties()
|
|
4
|
+
file("local.properties").withInputStream { properties.load(it) }
|
|
5
|
+
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
|
6
|
+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
|
7
|
+
return flutterSdkPath
|
|
8
|
+
}()
|
|
9
|
+
|
|
10
|
+
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
|
11
|
+
|
|
12
|
+
repositories {
|
|
13
|
+
google()
|
|
14
|
+
mavenCentral()
|
|
15
|
+
gradlePluginPortal()
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
plugins {
|
|
20
|
+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
|
21
|
+
id "com.android.application" version "8.1.0" apply false
|
|
22
|
+
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
include ":app"
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import 'package:flutter/material.dart';
|
|
2
|
+
|
|
3
|
+
void main() {
|
|
4
|
+
runApp(const MyApp());
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
class MyApp extends StatelessWidget {
|
|
8
|
+
const MyApp({super.key});
|
|
9
|
+
|
|
10
|
+
// This widget is the root of your application.
|
|
11
|
+
@override
|
|
12
|
+
Widget build(BuildContext context) {
|
|
13
|
+
return MaterialApp(
|
|
14
|
+
title: 'Flutter Demo',
|
|
15
|
+
theme: ThemeData(
|
|
16
|
+
// This is the theme of your application.
|
|
17
|
+
//
|
|
18
|
+
// TRY THIS: Try running your application with "flutter run". You'll see
|
|
19
|
+
// the application has a purple toolbar. Then, without quitting the app,
|
|
20
|
+
// try changing the seedColor in the colorScheme below to Colors.green
|
|
21
|
+
// and then invoke "hot reload" (save your changes or press the "hot
|
|
22
|
+
// reload" button in a Flutter-supported IDE, or press "r" if you used
|
|
23
|
+
// the command line to start the app).
|
|
24
|
+
//
|
|
25
|
+
// Notice that the counter didn't reset back to zero; the application
|
|
26
|
+
// state is not lost during the reload. To reset the state, use hot
|
|
27
|
+
// restart instead.
|
|
28
|
+
//
|
|
29
|
+
// This works for code too, not just values: Most code changes can be
|
|
30
|
+
// tested with just a hot reload.
|
|
31
|
+
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
|
32
|
+
useMaterial3: true,
|
|
33
|
+
),
|
|
34
|
+
home: const MyHomePage(title: 'Flutter Demo Home Page'),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
class MyHomePage extends StatefulWidget {
|
|
40
|
+
const MyHomePage({super.key, required this.title});
|
|
41
|
+
|
|
42
|
+
// This widget is the home page of your application. It is stateful, meaning
|
|
43
|
+
// that it has a State object (defined below) that contains fields that affect
|
|
44
|
+
// how it looks.
|
|
45
|
+
|
|
46
|
+
// This class is the configuration for the state. It holds the values (in this
|
|
47
|
+
// case the title) provided by the parent (in this case the App widget) and
|
|
48
|
+
// used by the build method of the State. Fields in a Widget subclass are
|
|
49
|
+
// always marked "final".
|
|
50
|
+
|
|
51
|
+
final String title;
|
|
52
|
+
|
|
53
|
+
@override
|
|
54
|
+
State<MyHomePage> createState() => _MyHomePageState();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class _MyHomePageState extends State<MyHomePage> {
|
|
58
|
+
int _counter = 0;
|
|
59
|
+
|
|
60
|
+
void _incrementCounter() {
|
|
61
|
+
setState(() {
|
|
62
|
+
// This call to setState tells the Flutter framework that something has
|
|
63
|
+
// changed in this State, which causes it to rerun the build method below
|
|
64
|
+
// so that the display can reflect the updated values. If we changed
|
|
65
|
+
// _counter without calling setState(), then the build method would not be
|
|
66
|
+
// called again, and so nothing would appear to happen.
|
|
67
|
+
_counter++;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@override
|
|
72
|
+
Widget build(BuildContext context) {
|
|
73
|
+
// This method is rerun every time setState is called, for instance as done
|
|
74
|
+
// by the _incrementCounter method above.
|
|
75
|
+
//
|
|
76
|
+
// The Flutter framework has been optimized to make rerunning build methods
|
|
77
|
+
// fast, so that you can just rebuild anything that needs updating rather
|
|
78
|
+
// than having to individually change instances of widgets.
|
|
79
|
+
return Scaffold(
|
|
80
|
+
appBar: AppBar(
|
|
81
|
+
// TRY THIS: Try changing the color here to a specific color (to
|
|
82
|
+
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
|
|
83
|
+
// change color while the other colors stay the same.
|
|
84
|
+
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
|
85
|
+
// Here we take the value from the MyHomePage object that was created by
|
|
86
|
+
// the App.build method, and use it to set our appbar title.
|
|
87
|
+
title: Text(widget.title),
|
|
88
|
+
),
|
|
89
|
+
body: Center(
|
|
90
|
+
// Center is a layout widget. It takes a single child and positions it
|
|
91
|
+
// in the middle of the parent.
|
|
92
|
+
child: Column(
|
|
93
|
+
// Column is also a layout widget. It takes a list of children and
|
|
94
|
+
// arranges them vertically. By default, it sizes itself to fit its
|
|
95
|
+
// children horizontally, and tries to be as tall as its parent.
|
|
96
|
+
//
|
|
97
|
+
// Column has various properties to control how it sizes itself and
|
|
98
|
+
// how it positions its children. Here we use mainAxisAlignment to
|
|
99
|
+
// center the children vertically; the main axis here is the vertical
|
|
100
|
+
// axis because Columns are vertical (the cross axis would be
|
|
101
|
+
// horizontal).
|
|
102
|
+
//
|
|
103
|
+
// TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
|
|
104
|
+
// action in the IDE, or press "p" in the console), to see the
|
|
105
|
+
// wireframe for each widget.
|
|
106
|
+
mainAxisAlignment: MainAxisAlignment.center,
|
|
107
|
+
children: <Widget>[
|
|
108
|
+
const Text(
|
|
109
|
+
'You have pushed the button this many times:',
|
|
110
|
+
),
|
|
111
|
+
Text(
|
|
112
|
+
'$_counter',
|
|
113
|
+
style: Theme.of(context).textTheme.headlineMedium,
|
|
114
|
+
),
|
|
115
|
+
],
|
|
116
|
+
),
|
|
117
|
+
),
|
|
118
|
+
floatingActionButton: FloatingActionButton(
|
|
119
|
+
onPressed: _incrementCounter,
|
|
120
|
+
tooltip: 'Increment',
|
|
121
|
+
child: const Icon(Icons.add),
|
|
122
|
+
), // This trailing comma makes auto-formatting nicer for build methods.
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Project-level configuration.
|
|
2
|
+
cmake_minimum_required(VERSION 3.10)
|
|
3
|
+
project(runner LANGUAGES CXX)
|
|
4
|
+
|
|
5
|
+
# The name of the executable created for the application. Change this to change
|
|
6
|
+
# the on-disk name of your application.
|
|
7
|
+
set(BINARY_NAME "flutter_magic")
|
|
8
|
+
# The unique GTK application identifier for this application. See:
|
|
9
|
+
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
|
10
|
+
set(APPLICATION_ID "com.example.flutter_magic")
|
|
11
|
+
|
|
12
|
+
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
|
13
|
+
# versions of CMake.
|
|
14
|
+
cmake_policy(SET CMP0063 NEW)
|
|
15
|
+
|
|
16
|
+
# Load bundled libraries from the lib/ directory relative to the binary.
|
|
17
|
+
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
|
|
18
|
+
|
|
19
|
+
# Root filesystem for cross-building.
|
|
20
|
+
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
|
|
21
|
+
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
|
|
22
|
+
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
|
|
23
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
24
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
25
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
26
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
27
|
+
endif()
|
|
28
|
+
|
|
29
|
+
# Define build configuration options.
|
|
30
|
+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
|
31
|
+
set(CMAKE_BUILD_TYPE "Debug" CACHE
|
|
32
|
+
STRING "Flutter build mode" FORCE)
|
|
33
|
+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
|
34
|
+
"Debug" "Profile" "Release")
|
|
35
|
+
endif()
|
|
36
|
+
|
|
37
|
+
# Compilation settings that should be applied to most targets.
|
|
38
|
+
#
|
|
39
|
+
# Be cautious about adding new options here, as plugins use this function by
|
|
40
|
+
# default. In most cases, you should add new options to specific targets instead
|
|
41
|
+
# of modifying this function.
|
|
42
|
+
function(APPLY_STANDARD_SETTINGS TARGET)
|
|
43
|
+
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
|
44
|
+
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
|
45
|
+
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
|
46
|
+
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
|
47
|
+
endfunction()
|
|
48
|
+
|
|
49
|
+
# Flutter library and tool build rules.
|
|
50
|
+
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
|
51
|
+
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
|
52
|
+
|
|
53
|
+
# System-level dependencies.
|
|
54
|
+
find_package(PkgConfig REQUIRED)
|
|
55
|
+
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
|
56
|
+
|
|
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)
|
|
76
|
+
|
|
77
|
+
# Run the Flutter tool portions of the build. This must not be removed.
|
|
78
|
+
add_dependencies(${BINARY_NAME} flutter_assemble)
|
|
79
|
+
|
|
80
|
+
# Only the install-generated bundle's copy of the executable will launch
|
|
81
|
+
# correctly, since the resources must in the right relative locations. To avoid
|
|
82
|
+
# people trying to run the unbundled copy, put it in a subdirectory instead of
|
|
83
|
+
# the default top-level location.
|
|
84
|
+
set_target_properties(${BINARY_NAME}
|
|
85
|
+
PROPERTIES
|
|
86
|
+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
# Generated plugin build rules, which manage building the plugins and adding
|
|
91
|
+
# them to the application.
|
|
92
|
+
include(flutter/generated_plugins.cmake)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# === Installation ===
|
|
96
|
+
# By default, "installing" just makes a relocatable bundle in the build
|
|
97
|
+
# directory.
|
|
98
|
+
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
|
|
99
|
+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
100
|
+
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
|
|
101
|
+
endif()
|
|
102
|
+
|
|
103
|
+
# Start with a clean build bundle directory every time.
|
|
104
|
+
install(CODE "
|
|
105
|
+
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
|
|
106
|
+
" COMPONENT Runtime)
|
|
107
|
+
|
|
108
|
+
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
|
109
|
+
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
|
110
|
+
|
|
111
|
+
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
|
112
|
+
COMPONENT Runtime)
|
|
113
|
+
|
|
114
|
+
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
|
|
115
|
+
COMPONENT Runtime)
|
|
116
|
+
|
|
117
|
+
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
|
118
|
+
COMPONENT Runtime)
|
|
119
|
+
|
|
120
|
+
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
|
|
121
|
+
install(FILES "${bundled_library}"
|
|
122
|
+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
|
123
|
+
COMPONENT Runtime)
|
|
124
|
+
endforeach(bundled_library)
|
|
125
|
+
|
|
126
|
+
# Copy the native assets provided by the build.dart from all packages.
|
|
127
|
+
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
|
|
128
|
+
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
|
|
129
|
+
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
|
130
|
+
COMPONENT Runtime)
|
|
131
|
+
|
|
132
|
+
# Fully re-copy the assets directory on each build to avoid having stale files
|
|
133
|
+
# from a previous install.
|
|
134
|
+
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
|
|
135
|
+
install(CODE "
|
|
136
|
+
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
|
|
137
|
+
" COMPONENT Runtime)
|
|
138
|
+
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
|
|
139
|
+
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
|
|
140
|
+
|
|
141
|
+
# Install the AOT library on non-Debug builds only.
|
|
142
|
+
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
143
|
+
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
|
144
|
+
COMPONENT Runtime)
|
|
145
|
+
endif()
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# This file controls Flutter-level build steps. It should not be edited.
|
|
2
|
+
cmake_minimum_required(VERSION 3.10)
|
|
3
|
+
|
|
4
|
+
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
|
5
|
+
|
|
6
|
+
# Configuration provided via flutter tool.
|
|
7
|
+
include(${EPHEMERAL_DIR}/generated_config.cmake)
|
|
8
|
+
|
|
9
|
+
# TODO: Move the rest of this into files in ephemeral. See
|
|
10
|
+
# https://github.com/flutter/flutter/issues/57146.
|
|
11
|
+
|
|
12
|
+
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
|
|
13
|
+
# which isn't available in 3.10.
|
|
14
|
+
function(list_prepend LIST_NAME PREFIX)
|
|
15
|
+
set(NEW_LIST "")
|
|
16
|
+
foreach(element ${${LIST_NAME}})
|
|
17
|
+
list(APPEND NEW_LIST "${PREFIX}${element}")
|
|
18
|
+
endforeach(element)
|
|
19
|
+
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
|
|
20
|
+
endfunction()
|
|
21
|
+
|
|
22
|
+
# === Flutter Library ===
|
|
23
|
+
# System-level dependencies.
|
|
24
|
+
find_package(PkgConfig REQUIRED)
|
|
25
|
+
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
|
26
|
+
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
|
27
|
+
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
|
|
28
|
+
|
|
29
|
+
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
|
|
30
|
+
|
|
31
|
+
# Published to parent scope for install step.
|
|
32
|
+
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
|
|
33
|
+
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
|
|
34
|
+
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
|
|
35
|
+
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
|
|
36
|
+
|
|
37
|
+
list(APPEND FLUTTER_LIBRARY_HEADERS
|
|
38
|
+
"fl_basic_message_channel.h"
|
|
39
|
+
"fl_binary_codec.h"
|
|
40
|
+
"fl_binary_messenger.h"
|
|
41
|
+
"fl_dart_project.h"
|
|
42
|
+
"fl_engine.h"
|
|
43
|
+
"fl_json_message_codec.h"
|
|
44
|
+
"fl_json_method_codec.h"
|
|
45
|
+
"fl_message_codec.h"
|
|
46
|
+
"fl_method_call.h"
|
|
47
|
+
"fl_method_channel.h"
|
|
48
|
+
"fl_method_codec.h"
|
|
49
|
+
"fl_method_response.h"
|
|
50
|
+
"fl_plugin_registrar.h"
|
|
51
|
+
"fl_plugin_registry.h"
|
|
52
|
+
"fl_standard_message_codec.h"
|
|
53
|
+
"fl_standard_method_codec.h"
|
|
54
|
+
"fl_string_codec.h"
|
|
55
|
+
"fl_value.h"
|
|
56
|
+
"fl_view.h"
|
|
57
|
+
"flutter_linux.h"
|
|
58
|
+
)
|
|
59
|
+
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
|
|
60
|
+
add_library(flutter INTERFACE)
|
|
61
|
+
target_include_directories(flutter INTERFACE
|
|
62
|
+
"${EPHEMERAL_DIR}"
|
|
63
|
+
)
|
|
64
|
+
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
|
|
65
|
+
target_link_libraries(flutter INTERFACE
|
|
66
|
+
PkgConfig::GTK
|
|
67
|
+
PkgConfig::GLIB
|
|
68
|
+
PkgConfig::GIO
|
|
69
|
+
)
|
|
70
|
+
add_dependencies(flutter flutter_assemble)
|
|
71
|
+
|
|
72
|
+
# === Flutter tool backend ===
|
|
73
|
+
# _phony_ is a non-existent file to force this command to run every time,
|
|
74
|
+
# since currently there's no way to get a full input/output list from the
|
|
75
|
+
# flutter tool.
|
|
76
|
+
add_custom_command(
|
|
77
|
+
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
|
|
78
|
+
${CMAKE_CURRENT_BINARY_DIR}/_phony_
|
|
79
|
+
COMMAND ${CMAKE_COMMAND} -E env
|
|
80
|
+
${FLUTTER_TOOL_ENVIRONMENT}
|
|
81
|
+
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
|
|
82
|
+
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
|
|
83
|
+
VERBATIM
|
|
84
|
+
)
|
|
85
|
+
add_custom_target(flutter_assemble DEPENDS
|
|
86
|
+
"${FLUTTER_LIBRARY}"
|
|
87
|
+
${FLUTTER_LIBRARY_HEADERS}
|
|
88
|
+
)
|