From a5b6af61680f82fc027ffd211e01fb1330441211 Mon Sep 17 00:00:00 2001 From: Foti Dim Date: Mon, 5 Jan 2026 16:12:31 +0100 Subject: [PATCH] Enforce cxx_std_20 (#205) * Enforce cxx_std_20 * Bump version * Switch to private --- CHANGELOG.md | 3 +++ example/pubspec.lock | 2 +- example/windows/flutter/generated_plugin_registrant.cc | 3 +++ example/windows/flutter/generated_plugins.cmake | 1 + pubspec.yaml | 2 +- windows/CMakeLists.txt | 1 + 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e30880b..3573155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.0.1 +* Enforce C++20 standard for Windows builds + ## 1.0.0 * BREAKING CHANGE: `OnValueChange` callback also includes timestamp * BREAKING CHANGE: Bump minimum IOS version to 13.1 diff --git a/example/pubspec.lock b/example/pubspec.lock index aa85ade..504925a 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -632,7 +632,7 @@ packages: path: ".." relative: true source: path - version: "1.0.0" + version: "1.0.1+3" url_launcher: dependency: "direct main" description: diff --git a/example/windows/flutter/generated_plugin_registrant.cc b/example/windows/flutter/generated_plugin_registrant.cc index 5c765e6..b3bed2a 100644 --- a/example/windows/flutter/generated_plugin_registrant.cc +++ b/example/windows/flutter/generated_plugin_registrant.cc @@ -7,8 +7,11 @@ #include "generated_plugin_registrant.h" #include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { UniversalBlePluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("UniversalBlePluginCApi")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/example/windows/flutter/generated_plugins.cmake b/example/windows/flutter/generated_plugins.cmake index 97ecaa5..a6a3a4c 100644 --- a/example/windows/flutter/generated_plugins.cmake +++ b/example/windows/flutter/generated_plugins.cmake @@ -4,6 +4,7 @@ list(APPEND FLUTTER_PLUGIN_LIST universal_ble + url_launcher_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/pubspec.yaml b/pubspec.yaml index d36aac0..d6cb2ff 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: universal_ble description: A cross-platform (Android/iOS/macOS/Windows/Linux/Web) Bluetooth Low Energy (BLE) plugin for Flutter -version: 1.0.0+2 +version: 1.0.1+3 homepage: https://navideck.com repository: https://github.com/Navideck/universal_ble issue_tracker: https://github.com/Navideck/universal_ble/issues diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 18d66ae..606812f 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -70,6 +70,7 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE # ############### NuGet import end ################ set_target_properties(${PLUGIN_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden) +target_compile_features(${PLUGIN_NAME} PRIVATE cxx_std_20) target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) target_include_directories(${PLUGIN_NAME} INTERFACE