mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Add workaround to build the rive plugin for linux
This commit is contained in:
@@ -36,8 +36,8 @@ android {
|
||||
ndkVersion "25.1.8937393"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
|
||||
@@ -41,7 +41,11 @@ endif()
|
||||
# of modifying this function.
|
||||
function(APPLY_STANDARD_SETTINGS TARGET)
|
||||
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
||||
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
||||
|
||||
# Workaround for https://github.com/wger-project/flutter/issues/577 / https://github.com/rive-app/rive-flutter/issues/390
|
||||
#target_compile_options(${TARGET} PRIVATE -Wall -Werror) -- original options
|
||||
target_compile_options(${TARGET} PRIVATE -Wall -Werror -Wno-unused-variable -Wno-unused-function)
|
||||
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
||||
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
||||
endfunction()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <file_selector_linux/file_selector_plugin.h>
|
||||
#include <rive_common/rive_plugin.h>
|
||||
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
|
||||
@@ -14,6 +15,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
||||
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) rive_common_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "RivePlugin");
|
||||
rive_plugin_register_with_registrar(rive_common_registrar);
|
||||
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
|
||||
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
file_selector_linux
|
||||
rive_common
|
||||
sqlite3_flutter_libs
|
||||
url_launcher_linux
|
||||
)
|
||||
|
||||
@@ -1112,18 +1112,18 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: rive
|
||||
sha256: ae75a6e9cfbf146630bfb1feba97ee582d935508be6b362e4bd197b9c55a6dd3
|
||||
sha256: b44b62feb908610ca6c85e05f4573a66118a23867425926cf06152d171236141
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.4"
|
||||
version: "0.13.17"
|
||||
rive_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: rive_common
|
||||
sha256: f4e20d0a99c5040c85624a3eb2b0b6b19e614d93a693c3bb25cf6e7bb2d3d6d3
|
||||
sha256: a3e5786f8d85c89977062b9ceeb3b72a7c28f81e32fb68497744042ce20bee2f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.8"
|
||||
version: "0.4.12"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@@ -47,8 +47,7 @@ dependencies:
|
||||
version: ^3.0.2
|
||||
package_info_plus: ^8.1.1
|
||||
provider: ^6.1.2
|
||||
# Note, do not update rive! https://github.com/wger-project/flutter/issues/577
|
||||
rive: ^0.12.4
|
||||
rive: ^0.13.17
|
||||
shared_preferences: ^2.3.3
|
||||
table_calendar: ^3.0.8
|
||||
url_launcher: ^6.3.1
|
||||
|
||||
Reference in New Issue
Block a user