Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Bump dependency #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.5.1 - 2024/05/19
* Bump dependency

## 0.5.0 - 2021/09/25
* Apply Analyze and Lint
* Fix iOS *symbol not found* in profile and release mode
Expand Down
33 changes: 8 additions & 25 deletions example/lib/file.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import 'dart:io';

import 'package:convert/convert.dart';
import 'package:file_chooser/file_chooser.dart';
import 'package:file_picker/file_picker.dart';
import 'package:file_selector/file_selector.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:r_crypto_example/data.dart';
Expand Down Expand Up @@ -66,27 +63,13 @@ class _FileScreenState extends State<FileScreen> {
buildRadioGroup(),
ElevatedButton(
onPressed: () async {
if (Platform.isAndroid || Platform.isIOS) {
// No Op
FilePickerResult? result =
await FilePicker.platform.pickFiles();
if (result != null) {
var file = File(result.files.single.path ?? "");
updateResult(file.path);
}
setState(() {});
} else if (Platform.isMacOS ||
Platform.isLinux ||
Platform.isWindows) {
var picker = await showOpenPanel();
if (!picker.canceled) {
var file = File(picker.paths.single);
updateResult(file.path);
} else {
_result = "";
_time = "";
_file = "";
}
final picker = await openFile();
if (picker != null) {
updateResult(picker.path);
} else {
_result = "";
_time = "";
_file = "";
}
setState(() {});
},
Expand Down
8 changes: 4 additions & 4 deletions example/linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

#include "generated_plugin_registrant.h"

#include <file_chooser/file_chooser_plugin.h>
#include <file_selector_linux/file_selector_plugin.h>
#include <r_crypto/r_crypto_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_chooser_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileChooserPlugin");
file_chooser_plugin_register_with_registrar(file_chooser_registrar);
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) r_crypto_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "RCryptoPlugin");
r_crypto_plugin_register_with_registrar(r_crypto_registrar);
Expand Down
10 changes: 9 additions & 1 deletion example/linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
file_chooser
file_selector_linux
r_crypto
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)

foreach(plugin ${FLUTTER_PLUGIN_LIST})
Expand All @@ -15,3 +18,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)

foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
4 changes: 2 additions & 2 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import FlutterMacOS
import Foundation

import file_chooser
import file_selector_macos
import r_crypto

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileChooserPlugin.register(with: registry.registrar(forPlugin: "FileChooserPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
RCryptoPlugin.register(with: registry.registrar(forPlugin: "RCryptoPlugin"))
}
2 changes: 1 addition & 1 deletion example/macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :osx, '10.11'
platform :osx, '10.14'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
11 changes: 6 additions & 5 deletions example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXAggregateTarget section */
Expand Down Expand Up @@ -203,7 +203,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down Expand Up @@ -256,6 +256,7 @@
/* Begin PBXShellScriptBuildPhase section */
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -404,7 +405,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -483,7 +484,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -530,7 +531,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
9 changes: 2 additions & 7 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
crypto:
convert: ^3.0.0
convert: ^3.1.1

file_chooser:
git:
url: https://github.com/google/flutter-desktop-embedding
path: plugins/file_chooser
ref: 040f36c
file_picker: ^4.0.3
file_selector: 1.0.3

dev_dependencies:
flutter_driver:
Expand Down
6 changes: 3 additions & 3 deletions example/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

#include "generated_plugin_registrant.h"

#include <file_chooser/file_chooser_plugin.h>
#include <file_selector_windows/file_selector_windows.h>
#include <r_crypto/r_crypto_plugin.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
FileChooserPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileChooserPlugin"));
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
RCryptoPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("RCryptoPlugin"));
}
10 changes: 9 additions & 1 deletion example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
file_chooser
file_selector_windows
r_crypto
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)

foreach(plugin ${FLUTTER_PLUGIN_LIST})
Expand All @@ -15,3 +18,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)

foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
2 changes: 1 addition & 1 deletion lib/src/basic/loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'dart:io';
import 'package:ffi/ffi.dart';
import 'package:r_crypto/src/basic/debuggable.dart';

late final DynamicLibrary nativeLib = _open();
final DynamicLibrary nativeLib = _open();

DynamicLibrary _open() {
if (Platform.environment.containsKey('FLUTTER_TEST') &&
Expand Down
2 changes: 1 addition & 1 deletion macos/Classes/RCryptoPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public class RCryptoPlugin: NSObject, FlutterPlugin {
}

public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
result(nil)

}
}
Binary file modified macos/librcrypto.dylib
Binary file not shown.
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: r_crypto
description: Rust backend support crypto flutter library, much faster than Dart-implementation library, light-weight library. Some crypto support hardware accelerate.
version: 0.5.0
version: 0.5.1
homepage: https://github.com/TinoGuo/r_crypto
repository: https://github.com/TinoGuo/r_crypto

Expand All @@ -11,13 +11,13 @@ environment:
dependencies:
flutter:
sdk: flutter
ffi: ^1.0.0
ffi: ^2.1.2

dev_dependencies:
flutter_lints: ^1.0.4
flutter_lints: 4.0.0
flutter_test:
sdk: flutter
convert: 3.0.0
convert: 3.1.1

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down