From 5edcd26fb925874d08617bc623ad930c92f46fa4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Aug 2026 07:40:05 +0000 Subject: [PATCH 1/4] refactor: rename package to monext_flutter_sdk and example to monext_example The plugin's pubspec/iOS Package.swift name (monext_payment) didn't match the repo's checkout directory name, which Flutter's Swift Package Manager integration uses to compute the plugin's local package identity. This caused Xcode to fail with "unable to override package... doesn't match override's identity" when adding SPM integration. Renaming the package to match the (to be renamed) repo name fixes it at the source instead of requiring a directory-naming workaround in every consuming app and in CI. The example app is renamed to monext_example (pubspec name and UI/native identifiers only, folder stays `example/`) to no longer reference the old plugin name. Android package (io.lenra.monext_payment) is left unchanged since it isn't affected by this issue. --- .github/workflows/ci.yml | 17 +++++++---------- README.md | 4 ++-- docs/guides/project-setup-requirements.md | 2 +- example/README.md | 6 +++--- example/android/app/build.gradle.kts | 4 ++-- .../android/app/src/main/AndroidManifest.xml | 2 +- .../MainActivity.kt | 2 +- .../plugin_integration_test.dart | 2 +- example/ios/Runner/Info.plist | 4 ++-- example/ios/RunnerTests/RunnerTests.swift | 2 +- example/lib/main.dart | 10 +++++----- example/pubspec.lock | 2 +- example/pubspec.yaml | 8 ++++---- example/test/widget_test.dart | 2 +- ...yment.podspec => monext_flutter_sdk.podspec} | 12 ++++++------ .../Package.swift | 6 +++--- .../MonextAppearanceMapper.swift | 0 .../MonextApplePayConfigurationMapper.swift | 0 .../MonextPaymentPlugin.swift | 0 .../MonextPaymentResultMapper.swift | 0 .../monext_flutter_sdk}/MonextSdkClient.swift | 0 .../PaymentHostingView.swift | 0 .../monext_flutter_sdk}/PrivacyInfo.xcprivacy | 0 ...ext_payment.dart => monext_flutter_sdk.dart} | 0 pubspec.yaml | 8 ++++---- test/monext_appearance_test.dart | 2 +- test/monext_payment_method_channel_test.dart | 4 ++-- test/monext_payment_result_test.dart | 2 +- test/monext_payment_test.dart | 6 +++--- 29 files changed, 52 insertions(+), 55 deletions(-) rename example/android/app/src/main/kotlin/io/lenra/{monext_payment_example => monext_example}/MainActivity.kt (69%) rename ios/{monext_payment.podspec => monext_flutter_sdk.podspec} (74%) rename ios/{monext_payment => monext_flutter_sdk}/Package.swift (91%) rename ios/{monext_payment/Sources/monext_payment => monext_flutter_sdk/Sources/monext_flutter_sdk}/MonextAppearanceMapper.swift (100%) rename ios/{monext_payment/Sources/monext_payment => monext_flutter_sdk/Sources/monext_flutter_sdk}/MonextApplePayConfigurationMapper.swift (100%) rename ios/{monext_payment/Sources/monext_payment => monext_flutter_sdk/Sources/monext_flutter_sdk}/MonextPaymentPlugin.swift (100%) rename ios/{monext_payment/Sources/monext_payment => monext_flutter_sdk/Sources/monext_flutter_sdk}/MonextPaymentResultMapper.swift (100%) rename ios/{monext_payment/Sources/monext_payment => monext_flutter_sdk/Sources/monext_flutter_sdk}/MonextSdkClient.swift (100%) rename ios/{monext_payment/Sources/monext_payment => monext_flutter_sdk/Sources/monext_flutter_sdk}/PaymentHostingView.swift (100%) rename ios/{monext_payment/Sources/monext_payment => monext_flutter_sdk/Sources/monext_flutter_sdk}/PrivacyInfo.xcprivacy (100%) rename lib/{monext_payment.dart => monext_flutter_sdk.dart} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e4f396..9d00420 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,15 +90,12 @@ jobs: runs-on: macos-latest steps: # Flutter's Swift Package Manager integration derives the plugin's local package - # identity from the checkout directory's basename. Since this repo *is* the plugin - # (pubspec/Package.swift name `monext_payment`) but the repo is named `monext-flutter`, - # checking out under the default path makes Xcode compute a mismatched identity and - # fail with "unable to override package... doesn't match override's identity". Checking - # out into a `monext_payment` directory keeps the basename aligned with the plugin name. + # identity from the checkout directory's basename, which must match the pubspec/ + # Package.swift name (`monext_flutter_sdk`) or Xcode fails with "unable to override + # package... doesn't match override's identity". The repo name matches the package + # name, so the default checkout path already satisfies this. - name: Checkout repository uses: actions/checkout@v4 - with: - path: monext_payment - name: Setup Flutter Environment uses: subosito/flutter-action@v2.18.0 @@ -108,17 +105,17 @@ jobs: cache: true - name: Install example app dependencies - working-directory: monext_payment/example + working-directory: example run: flutter pub get - name: Generate iOS project config (pods, xcconfig) without a full build - working-directory: monext_payment/example + working-directory: example run: flutter build ios --config-only --no-codesign # xcodebuild test builds the app as part of running the tests, so this also # acts as the compile check - no need for a separate `flutter build ios` step. - name: Run iOS native unit tests - working-directory: monext_payment/example + working-directory: example run: | xcodebuild test \ -workspace ios/Runner.xcworkspace \ diff --git a/README.md b/README.md index 26ac37c..3ae3a5a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# monext_payment +# monext_flutter_sdk Flutter plugin bridging Monext's native Android/iOS payment SDKs to a unified Dart API. @@ -13,7 +13,7 @@ needs to configure beyond adding this dependency. ## Dart API ```dart -import 'package:monext_payment/monext_payment.dart'; +import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; await MonextPayment.initialize(); diff --git a/docs/guides/project-setup-requirements.md b/docs/guides/project-setup-requirements.md index d7c5775..4b36c4b 100644 --- a/docs/guides/project-setup-requirements.md +++ b/docs/guides/project-setup-requirements.md @@ -4,7 +4,7 @@ title: Project Setup Requirements # Project Setup Requirements -Requirements a consuming app must satisfy beyond adding the `monext_payment` dependency, +Requirements a consuming app must satisfy beyond adding the `monext_flutter_sdk` dependency, calling `MonextPayment.initialize()` and `MonextPayment.startPayment(...)`. These come from the native Monext SDKs' own minimum requirements, not from this plugin. diff --git a/example/README.md b/example/README.md index 0026d62..5b076fc 100644 --- a/example/README.md +++ b/example/README.md @@ -1,13 +1,13 @@ -# monext_payment_example +# monext_example -Demonstrates how to use the `monext_payment` plugin: a single screen with a session token field, +Demonstrates how to use the `monext_flutter_sdk` plugin: a single screen with a session token field, an environment picker, and a **Buy** button that launches Monext's native payment UI and displays the resulting `MonextPaymentResult`. ## Prerequisites - A working Flutter setup (`flutter doctor`). -- This app depends on `monext_payment` via a local path dependency (`../`), so no extra setup is +- This app depends on `monext_flutter_sdk` via a local path dependency (`../`), so no extra setup is needed for the plugin itself. See the root [Project Setup Requirements](../docs/guides/project-setup-requirements.md) for native minimum versions if you fork this example into a standalone app. diff --git a/example/android/app/build.gradle.kts b/example/android/app/build.gradle.kts index 7fd939a..67f32e3 100644 --- a/example/android/app/build.gradle.kts +++ b/example/android/app/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } android { - namespace = "io.lenra.monext_payment_example" + namespace = "io.lenra.monext_example" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion @@ -16,7 +16,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "io.lenra.monext_payment_example" + applicationId = "io.lenra.monext_example" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. // Must be >= the plugin's minSdk (26, required by Monext's Android SDK). diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 3223b70..4491e2a 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Monext Payment + Monext Example CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - monext_payment_example + monext_example CFBundlePackageType APPL CFBundleShortVersionString diff --git a/example/ios/RunnerTests/RunnerTests.swift b/example/ios/RunnerTests/RunnerTests.swift index 9d6caf8..9b02726 100644 --- a/example/ios/RunnerTests/RunnerTests.swift +++ b/example/ios/RunnerTests/RunnerTests.swift @@ -6,7 +6,7 @@ import UIKit import XCTest -@testable import monext_payment +@testable import monext_flutter_sdk // This demonstrates a simple unit test of the Swift portion of this plugin's implementation. // diff --git a/example/lib/main.dart b/example/lib/main.dart index b3af09e..383b91a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:monext_payment/monext_payment.dart'; +import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; void main() { runApp(const MyApp()); @@ -11,13 +11,13 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - title: 'monext_payment example', + title: 'monext_example', home: const PaymentDemoPage(), ); } } -/// Demo page showing the minimal integration of `monext_payment`: a form to +/// Demo page showing the minimal integration of `monext_flutter_sdk`: a form to /// fill in a session token/environment and a "Buy" button that starts the /// native payment flow and displays the resulting [MonextPaymentResult]. /// @@ -65,7 +65,7 @@ class _PaymentDemoPageState extends State { await MonextPayment.startPayment( sessionToken: sessionToken, environment: _environment, - appearance: const MonextAppearance(headerTitle: 'monext_payment example'), + appearance: const MonextAppearance(headerTitle: 'monext_example'), onPaymentResult: (result) { if (!mounted) return; setState(() { @@ -86,7 +86,7 @@ class _PaymentDemoPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text('monext_payment example')), + appBar: AppBar(title: const Text('monext_example')), body: Padding( padding: const EdgeInsets.all(16), child: Column( diff --git a/example/pubspec.lock b/example/pubspec.lock index c746963..ec79855 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -162,7 +162,7 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" - monext_payment: + monext_flutter_sdk: dependency: "direct main" description: path: ".." diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 7493541..43c2a63 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,5 +1,5 @@ -name: monext_payment_example -description: "Demonstrates how to use the monext_payment plugin." +name: monext_example +description: "Demonstrates how to use the monext_flutter_sdk plugin." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev @@ -17,9 +17,9 @@ dependencies: flutter: sdk: flutter - monext_payment: + monext_flutter_sdk: # When depending on this package from a real application you should use: - # monext_payment: ^x.y.z + # monext_flutter_sdk: ^x.y.z # See https://dart.dev/tools/pub/dependencies#version-constraints # The example app is bundled with the plugin so we use a path dependency on # the parent directory to use the current plugin's version. diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index a9641c0..e6fb3bc 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_payment_example/main.dart'; +import 'package:monext_example/main.dart'; void main() { testWidgets('Verify Platform version', (WidgetTester tester) async { diff --git a/ios/monext_payment.podspec b/ios/monext_flutter_sdk.podspec similarity index 74% rename from ios/monext_payment.podspec rename to ios/monext_flutter_sdk.podspec index f2a4682..2d72df1 100644 --- a/ios/monext_payment.podspec +++ b/ios/monext_flutter_sdk.podspec @@ -1,23 +1,23 @@ # # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint monext_payment.podspec` to validate before publishing. +# Run `pod lib lint monext_flutter_sdk.podspec` to validate before publishing. # Pod::Spec.new do |s| - s.name = 'monext_payment' + s.name = 'monext_flutter_sdk' s.version = '0.0.1' s.summary = 'Flutter plugin for Monext payment flow integration.' s.description = <<-DESC Flutter plugin bridging Monext's native Android/iOS payment SDKs to a unified Dart API. DESC - s.homepage = 'https://github.com/lenra-io/monext-flutter' + s.homepage = 'https://github.com/lenra-io/monext_flutter_sdk' s.author = { 'Lenra' => 'contact@lenra.io' } s.source = { :path => '.' } - s.source_files = 'monext_payment/Sources/monext_payment/**/*' + s.source_files = 'monext_flutter_sdk/Sources/monext_flutter_sdk/**/*' s.dependency 'Flutter' # Monext's iOS SDK (distributed only via Swift Package Manager) requires iOS 16.0+. # Host apps that consume this plugin through CocoaPods must enable Flutter's # Swift Package Manager support to resolve the Monext dependency declared in - # monext_payment/Package.swift. + # monext_flutter_sdk/Package.swift. s.platform = :ios, '16.0' # Flutter.framework does not contain a i386 slice. @@ -28,5 +28,5 @@ Flutter plugin bridging Monext's native Android/iOS payment SDKs to a unified Da # required reason APIs, update the PrivacyInfo.xcprivacy file to describe your # plugin's privacy impact, and then uncomment this line. For more information, # see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files - # s.resource_bundles = {'monext_payment_privacy' => ['monext_payment/Sources/monext_payment/PrivacyInfo.xcprivacy']} + # s.resource_bundles = {'monext_flutter_sdk_privacy' => ['monext_flutter_sdk/Sources/monext_flutter_sdk/PrivacyInfo.xcprivacy']} end diff --git a/ios/monext_payment/Package.swift b/ios/monext_flutter_sdk/Package.swift similarity index 91% rename from ios/monext_payment/Package.swift rename to ios/monext_flutter_sdk/Package.swift index 9b0f6fe..91738ff 100644 --- a/ios/monext_payment/Package.swift +++ b/ios/monext_flutter_sdk/Package.swift @@ -4,13 +4,13 @@ import PackageDescription let package = Package( - name: "monext_payment", + name: "monext_flutter_sdk", platforms: [ // Monext's iOS SDK requires iOS 16.0 or later. .iOS("16.0") ], products: [ - .library(name: "monext-payment", targets: ["monext_payment"]) + .library(name: "monext-flutter-sdk", targets: ["monext_flutter_sdk"]) ], dependencies: [ .package(name: "FlutterFramework", path: "../FlutterFramework"), @@ -20,7 +20,7 @@ let package = Package( ], targets: [ .target( - name: "monext_payment", + name: "monext_flutter_sdk", dependencies: [ .product(name: "FlutterFramework", package: "FlutterFramework"), .product(name: "Monext", package: "monext-ios-sdk-spm") diff --git a/ios/monext_payment/Sources/monext_payment/MonextAppearanceMapper.swift b/ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextAppearanceMapper.swift similarity index 100% rename from ios/monext_payment/Sources/monext_payment/MonextAppearanceMapper.swift rename to ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextAppearanceMapper.swift diff --git a/ios/monext_payment/Sources/monext_payment/MonextApplePayConfigurationMapper.swift b/ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextApplePayConfigurationMapper.swift similarity index 100% rename from ios/monext_payment/Sources/monext_payment/MonextApplePayConfigurationMapper.swift rename to ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextApplePayConfigurationMapper.swift diff --git a/ios/monext_payment/Sources/monext_payment/MonextPaymentPlugin.swift b/ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextPaymentPlugin.swift similarity index 100% rename from ios/monext_payment/Sources/monext_payment/MonextPaymentPlugin.swift rename to ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextPaymentPlugin.swift diff --git a/ios/monext_payment/Sources/monext_payment/MonextPaymentResultMapper.swift b/ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextPaymentResultMapper.swift similarity index 100% rename from ios/monext_payment/Sources/monext_payment/MonextPaymentResultMapper.swift rename to ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextPaymentResultMapper.swift diff --git a/ios/monext_payment/Sources/monext_payment/MonextSdkClient.swift b/ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextSdkClient.swift similarity index 100% rename from ios/monext_payment/Sources/monext_payment/MonextSdkClient.swift rename to ios/monext_flutter_sdk/Sources/monext_flutter_sdk/MonextSdkClient.swift diff --git a/ios/monext_payment/Sources/monext_payment/PaymentHostingView.swift b/ios/monext_flutter_sdk/Sources/monext_flutter_sdk/PaymentHostingView.swift similarity index 100% rename from ios/monext_payment/Sources/monext_payment/PaymentHostingView.swift rename to ios/monext_flutter_sdk/Sources/monext_flutter_sdk/PaymentHostingView.swift diff --git a/ios/monext_payment/Sources/monext_payment/PrivacyInfo.xcprivacy b/ios/monext_flutter_sdk/Sources/monext_flutter_sdk/PrivacyInfo.xcprivacy similarity index 100% rename from ios/monext_payment/Sources/monext_payment/PrivacyInfo.xcprivacy rename to ios/monext_flutter_sdk/Sources/monext_flutter_sdk/PrivacyInfo.xcprivacy diff --git a/lib/monext_payment.dart b/lib/monext_flutter_sdk.dart similarity index 100% rename from lib/monext_payment.dart rename to lib/monext_flutter_sdk.dart diff --git a/pubspec.yaml b/pubspec.yaml index 2039fc5..63eb616 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,9 +1,9 @@ -name: monext_payment +name: monext_flutter_sdk description: "Flutter plugin bridging Monext's native Android/iOS payment SDKs to a unified Dart API." version: 0.0.1 -homepage: "https://github.com/lenra-io/monext-flutter" -repository: "https://github.com/lenra-io/monext-flutter" -issue_tracker: "https://github.com/lenra-io/monext-flutter/issues" +homepage: "https://github.com/lenra-io/monext_flutter_sdk" +repository: "https://github.com/lenra-io/monext_flutter_sdk" +issue_tracker: "https://github.com/lenra-io/monext_flutter_sdk/issues" topics: - payments - checkout diff --git a/test/monext_appearance_test.dart b/test/monext_appearance_test.dart index a76ac42..edd004d 100644 --- a/test/monext_appearance_test.dart +++ b/test/monext_appearance_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_payment/monext_payment.dart'; +import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; void main() { group('MonextAppearance', () { diff --git a/test/monext_payment_method_channel_test.dart b/test/monext_payment_method_channel_test.dart index 397319b..b46bc5c 100644 --- a/test/monext_payment_method_channel_test.dart +++ b/test/monext_payment_method_channel_test.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_payment/monext_payment.dart'; -import 'package:monext_payment/monext_payment_method_channel.dart'; +import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext_payment_method_channel.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); diff --git a/test/monext_payment_result_test.dart b/test/monext_payment_result_test.dart index d5af044..84de78e 100644 --- a/test/monext_payment_result_test.dart +++ b/test/monext_payment_result_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_payment/monext_payment.dart'; +import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; void main() { group('MonextPaymentResult', () { diff --git a/test/monext_payment_test.dart b/test/monext_payment_test.dart index 7a3122f..a679804 100644 --- a/test/monext_payment_test.dart +++ b/test/monext_payment_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_payment/monext_payment.dart'; -import 'package:monext_payment/monext_payment_platform_interface.dart'; -import 'package:monext_payment/monext_payment_method_channel.dart'; +import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext_payment_platform_interface.dart'; +import 'package:monext_flutter_sdk/monext_payment_method_channel.dart'; import 'package:plugin_platform_interface/plugin_platform_interface.dart'; class MockMonextPaymentPlatform From cc4f6854a63848f7a9cff27e3e376f0362780a8f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Aug 2026 07:48:27 +0000 Subject: [PATCH 2/4] ci: force iOS checkout path to monext_flutter_sdk The GitHub repo is still named monext-flutter, so the default checkout path doesn't match the plugin's new pubspec/Package.swift name (monext_flutter_sdk), which reintroduces the SPM identity mismatch this rename was meant to fix. Force the checkout directory name until the repo itself is renamed to match. --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d00420..6fc185c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,10 +92,12 @@ jobs: # Flutter's Swift Package Manager integration derives the plugin's local package # identity from the checkout directory's basename, which must match the pubspec/ # Package.swift name (`monext_flutter_sdk`) or Xcode fails with "unable to override - # package... doesn't match override's identity". The repo name matches the package - # name, so the default checkout path already satisfies this. + # package... doesn't match override's identity". This repo is still named + # `monext-flutter` on GitHub, so force the checkout path until it's renamed to match. - name: Checkout repository uses: actions/checkout@v4 + with: + path: monext_flutter_sdk - name: Setup Flutter Environment uses: subosito/flutter-action@v2.18.0 @@ -105,17 +107,17 @@ jobs: cache: true - name: Install example app dependencies - working-directory: example + working-directory: monext_flutter_sdk/example run: flutter pub get - name: Generate iOS project config (pods, xcconfig) without a full build - working-directory: example + working-directory: monext_flutter_sdk/example run: flutter build ios --config-only --no-codesign # xcodebuild test builds the app as part of running the tests, so this also # acts as the compile check - no need for a separate `flutter build ios` step. - name: Run iOS native unit tests - working-directory: example + working-directory: monext_flutter_sdk/example run: | xcodebuild test \ -workspace ios/Runner.xcworkspace \ From 11aa13cc00ae8e006f6018524a11a2f74fd8053c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Aug 2026 08:00:24 +0000 Subject: [PATCH 3/4] refactor: drop redundant "payment" from lib/test file names Files already live under the monext_flutter_sdk package and export payment-domain symbols (MonextPaymentResult, MonextPaymentNotInitialized- Exception, etc.), so the "_payment_" segment in their own file names was redundant. Only file names change; the shared MethodChannel name ("monext_payment", used by the Android/iOS native sides too) is untouched. --- ...art => monext_channel_unavailable_exception.dart} | 0 lib/monext_flutter_sdk.dart | 12 ++++++------ ...ethod_channel.dart => monext_method_channel.dart} | 6 +++--- ...e_exception.dart => monext_native_exception.dart} | 0 ...on.dart => monext_not_initialized_exception.dart} | 0 ...interface.dart => monext_platform_interface.dart} | 4 ++-- ...monext_payment_result.dart => monext_result.dart} | 2 +- ...xt_payment_result.g.dart => monext_result.g.dart} | 2 +- ...nel_test.dart => monext_method_channel_test.dart} | 2 +- ...ment_result_test.dart => monext_result_test.dart} | 0 test/{monext_payment_test.dart => monext_test.dart} | 4 ++-- 11 files changed, 16 insertions(+), 16 deletions(-) rename lib/{monext_payment_channel_unavailable_exception.dart => monext_channel_unavailable_exception.dart} (100%) rename lib/{monext_payment_method_channel.dart => monext_method_channel.dart} (95%) rename lib/{monext_payment_native_exception.dart => monext_native_exception.dart} (100%) rename lib/{monext_payment_not_initialized_exception.dart => monext_not_initialized_exception.dart} (100%) rename lib/{monext_payment_platform_interface.dart => monext_platform_interface.dart} (96%) rename lib/{monext_payment_result.dart => monext_result.dart} (98%) rename lib/{monext_payment_result.g.dart => monext_result.g.dart} (93%) rename test/{monext_payment_method_channel_test.dart => monext_method_channel_test.dart} (99%) rename test/{monext_payment_result_test.dart => monext_result_test.dart} (100%) rename test/{monext_payment_test.dart => monext_test.dart} (97%) diff --git a/lib/monext_payment_channel_unavailable_exception.dart b/lib/monext_channel_unavailable_exception.dart similarity index 100% rename from lib/monext_payment_channel_unavailable_exception.dart rename to lib/monext_channel_unavailable_exception.dart diff --git a/lib/monext_flutter_sdk.dart b/lib/monext_flutter_sdk.dart index 93c0152..bf2c068 100644 --- a/lib/monext_flutter_sdk.dart +++ b/lib/monext_flutter_sdk.dart @@ -5,18 +5,18 @@ import 'monext_appearance.dart'; import 'monext_environment.dart'; import 'monext_google_pay_configuration.dart'; import 'monext_language.dart'; -import 'monext_payment_not_initialized_exception.dart'; -import 'monext_payment_platform_interface.dart'; +import 'monext_not_initialized_exception.dart'; +import 'monext_platform_interface.dart'; export 'monext_apple_pay_configuration.dart'; export 'monext_appearance.dart'; export 'monext_environment.dart'; export 'monext_google_pay_configuration.dart'; export 'monext_language.dart'; -export 'monext_payment_channel_unavailable_exception.dart'; -export 'monext_payment_native_exception.dart'; -export 'monext_payment_not_initialized_exception.dart'; -export 'monext_payment_result.dart'; +export 'monext_channel_unavailable_exception.dart'; +export 'monext_native_exception.dart'; +export 'monext_not_initialized_exception.dart'; +export 'monext_result.dart'; /// Dart entry point for the Monext payment plugin. class MonextPayment { diff --git a/lib/monext_payment_method_channel.dart b/lib/monext_method_channel.dart similarity index 95% rename from lib/monext_payment_method_channel.dart rename to lib/monext_method_channel.dart index 6ce81bf..e0891e4 100644 --- a/lib/monext_payment_method_channel.dart +++ b/lib/monext_method_channel.dart @@ -6,9 +6,9 @@ import 'monext_appearance.dart'; import 'monext_environment.dart'; import 'monext_google_pay_configuration.dart'; import 'monext_language.dart'; -import 'monext_payment_channel_unavailable_exception.dart'; -import 'monext_payment_native_exception.dart'; -import 'monext_payment_platform_interface.dart'; +import 'monext_channel_unavailable_exception.dart'; +import 'monext_native_exception.dart'; +import 'monext_platform_interface.dart'; /// An implementation of [MonextPaymentPlatform] that uses method channels. class MethodChannelMonextPayment extends MonextPaymentPlatform { diff --git a/lib/monext_payment_native_exception.dart b/lib/monext_native_exception.dart similarity index 100% rename from lib/monext_payment_native_exception.dart rename to lib/monext_native_exception.dart diff --git a/lib/monext_payment_not_initialized_exception.dart b/lib/monext_not_initialized_exception.dart similarity index 100% rename from lib/monext_payment_not_initialized_exception.dart rename to lib/monext_not_initialized_exception.dart diff --git a/lib/monext_payment_platform_interface.dart b/lib/monext_platform_interface.dart similarity index 96% rename from lib/monext_payment_platform_interface.dart rename to lib/monext_platform_interface.dart index 4ea2508..9dc7413 100644 --- a/lib/monext_payment_platform_interface.dart +++ b/lib/monext_platform_interface.dart @@ -5,8 +5,8 @@ import 'monext_appearance.dart'; import 'monext_environment.dart'; import 'monext_google_pay_configuration.dart'; import 'monext_language.dart'; -import 'monext_payment_method_channel.dart'; -import 'monext_payment_result.dart'; +import 'monext_method_channel.dart'; +import 'monext_result.dart'; abstract class MonextPaymentPlatform extends PlatformInterface { /// Constructs a MonextPaymentPlatform. diff --git a/lib/monext_payment_result.dart b/lib/monext_result.dart similarity index 98% rename from lib/monext_payment_result.dart rename to lib/monext_result.dart index 19c3701..a04ebff 100644 --- a/lib/monext_payment_result.dart +++ b/lib/monext_result.dart @@ -1,6 +1,6 @@ import 'package:json_annotation/json_annotation.dart'; -part 'monext_payment_result.g.dart'; +part 'monext_result.g.dart'; /// Outcome of a payment handled through [MonextPayment.startPayment]. /// diff --git a/lib/monext_payment_result.g.dart b/lib/monext_result.g.dart similarity index 93% rename from lib/monext_payment_result.g.dart rename to lib/monext_result.g.dart index d9f5afd..6d4b04a 100644 --- a/lib/monext_payment_result.g.dart +++ b/lib/monext_result.g.dart @@ -1,6 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'monext_payment_result.dart'; +part of 'monext_result.dart'; // ************************************************************************** // JsonSerializableGenerator diff --git a/test/monext_payment_method_channel_test.dart b/test/monext_method_channel_test.dart similarity index 99% rename from test/monext_payment_method_channel_test.dart rename to test/monext_method_channel_test.dart index b46bc5c..a0936df 100644 --- a/test/monext_payment_method_channel_test.dart +++ b/test/monext_method_channel_test.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; -import 'package:monext_flutter_sdk/monext_payment_method_channel.dart'; +import 'package:monext_flutter_sdk/monext_method_channel.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); diff --git a/test/monext_payment_result_test.dart b/test/monext_result_test.dart similarity index 100% rename from test/monext_payment_result_test.dart rename to test/monext_result_test.dart diff --git a/test/monext_payment_test.dart b/test/monext_test.dart similarity index 97% rename from test/monext_payment_test.dart rename to test/monext_test.dart index a679804..b6be2f7 100644 --- a/test/monext_payment_test.dart +++ b/test/monext_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; -import 'package:monext_flutter_sdk/monext_payment_platform_interface.dart'; -import 'package:monext_flutter_sdk/monext_payment_method_channel.dart'; +import 'package:monext_flutter_sdk/monext_platform_interface.dart'; +import 'package:monext_flutter_sdk/monext_method_channel.dart'; import 'package:plugin_platform_interface/plugin_platform_interface.dart'; class MockMonextPaymentPlatform From e4b650cbfae40e57a7462508a8e261702fca865f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Aug 2026 08:07:55 +0000 Subject: [PATCH 4/4] refactor: rename lib/monext_flutter_sdk.dart to lib/monext.dart --- README.md | 2 +- example/integration_test/plugin_integration_test.dart | 2 +- example/lib/main.dart | 2 +- lib/{monext_flutter_sdk.dart => monext.dart} | 0 test/monext_appearance_test.dart | 2 +- test/monext_method_channel_test.dart | 2 +- test/monext_result_test.dart | 2 +- test/monext_test.dart | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename lib/{monext_flutter_sdk.dart => monext.dart} (100%) diff --git a/README.md b/README.md index 3ae3a5a..46f58e0 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ needs to configure beyond adding this dependency. ## Dart API ```dart -import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext.dart'; await MonextPayment.initialize(); diff --git a/example/integration_test/plugin_integration_test.dart b/example/integration_test/plugin_integration_test.dart index 05a3d51..35a07f5 100644 --- a/example/integration_test/plugin_integration_test.dart +++ b/example/integration_test/plugin_integration_test.dart @@ -9,7 +9,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; -import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/example/lib/main.dart b/example/lib/main.dart index 383b91a..2eca1fe 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext.dart'; void main() { runApp(const MyApp()); diff --git a/lib/monext_flutter_sdk.dart b/lib/monext.dart similarity index 100% rename from lib/monext_flutter_sdk.dart rename to lib/monext.dart diff --git a/test/monext_appearance_test.dart b/test/monext_appearance_test.dart index edd004d..42a6ad6 100644 --- a/test/monext_appearance_test.dart +++ b/test/monext_appearance_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext.dart'; void main() { group('MonextAppearance', () { diff --git a/test/monext_method_channel_test.dart b/test/monext_method_channel_test.dart index a0936df..a9d2996 100644 --- a/test/monext_method_channel_test.dart +++ b/test/monext_method_channel_test.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext.dart'; import 'package:monext_flutter_sdk/monext_method_channel.dart'; void main() { diff --git a/test/monext_result_test.dart b/test/monext_result_test.dart index 84de78e..c309af9 100644 --- a/test/monext_result_test.dart +++ b/test/monext_result_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext.dart'; void main() { group('MonextPaymentResult', () { diff --git a/test/monext_test.dart b/test/monext_test.dart index b6be2f7..8a83e54 100644 --- a/test/monext_test.dart +++ b/test/monext_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:monext_flutter_sdk/monext_flutter_sdk.dart'; +import 'package:monext_flutter_sdk/monext.dart'; import 'package:monext_flutter_sdk/monext_platform_interface.dart'; import 'package:monext_flutter_sdk/monext_method_channel.dart'; import 'package:plugin_platform_interface/plugin_platform_interface.dart';