diff --git a/lib/src/tag/tagger.dart b/lib/src/tag/tagger.dart index 078390c97..e9db0346a 100644 --- a/lib/src/tag/tagger.dart +++ b/lib/src/tag/tagger.dart @@ -365,21 +365,22 @@ class Tagger { return true; } - var support = true; + var isDarwinPlugin = false; + var swiftPmSupport = true; for (final darwinOs in ['macos', 'ios']) { if (pathExists( pubspec.originalYaml, ['flutter', 'plugin', 'platforms', darwinOs])) { + isDarwinPlugin = true; final specificPackageSwiftFile = path.join(darwinOs, packageName, 'Package.swift'); final genericPackageSwiftFile = path.join('darwin', packageName, 'Package.swift'); - if (!(File(path.join(packageDir, specificPackageSwiftFile)) .existsSync() || File(path.join(packageDir, genericPackageSwiftFile)) .existsSync())) { - support = false; + swiftPmSupport = false; explanations.add(Explanation( 'Package does not support the Swift Package Manager on $darwinOs', ''' @@ -391,7 +392,7 @@ It contains none of } } } - if (support) { + if (isDarwinPlugin && swiftPmSupport) { tags.add(PanaTags.isSwiftPackageManagerReady); } } diff --git a/test/goldens/end2end/audio_service-0.18.10.json b/test/goldens/end2end/audio_service-0.18.10.json index d5bd2c79b..d6a4ecd17 100644 --- a/test/goldens/end2end/audio_service-0.18.10.json +++ b/test/goldens/end2end/audio_service-0.18.10.json @@ -155,7 +155,7 @@ "grantedPoints": 20, "maxPoints": 20, "status": "failed", - "summary": "### [*] 20/20 points: Supports 4 of 6 possible platforms (**iOS**, **Android**, **Web**, Windows, **macOS**, Linux)\n\n* ✓ Android\n\n* ✓ iOS\n\n* ✓ macOS\n\n* ✓ Web\n\n\nThese platforms are not supported:\n\n
\n\nPackage does not support platform `Windows`.\n\n\nBecause:\n* `package:audio_service/audio_service.dart` that declares support for platforms: `Android`, `iOS`, `macOS`, `Web`.\n
\n\n
\n\nPackage does not support platform `Linux`.\n\n\nBecause:\n* `package:audio_service/audio_service.dart` that declares support for platforms: `Android`, `iOS`, `macOS`, `Web`.\n
\n\n\nThese issues are present but do not affect the score, because they may not originate in your package:\n\n
\n\nPackage does not support platform `Web`.\n\n\nBecause:\n* `package:audio_service/audio_service.dart` that imports:\n* `package:flutter_cache_manager/flutter_cache_manager.dart` that imports:\n* `package:flutter_cache_manager/src/storage/cache_info_repositories/cache_info_repositories.dart` that imports:\n* `package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart` that imports:\n* `package:path_provider/path_provider.dart` that declares support for platforms: `Android`, `iOS`, `Windows`, `Linux`, `macOS`.\n
\n\n### [x] 0/0 points: WASM compatibility\n\n
\n\nPackage not compatible with runtime wasm\n\n\nBecause:\n* `package:audio_service/audio_service.dart` that imports:\n* `package:flutter_cache_manager/flutter_cache_manager.dart` that imports:\n* `package:flutter_cache_manager/src/web/web_helper.dart` that imports:\n* `package:flutter_cache_manager/src/cache_store.dart` that imports:\n* `package:flutter_cache_manager/src/storage/file_system/file_system.dart` that imports:\n* `package:file/file.dart` that imports:\n* `package:file/src/interface.dart` that imports:\n* `package:file/src/io.dart` that imports:\n* `dart:io`\n
\n\nThis package is not compatible with runtime `wasm`, and will not be rewarded full points in a future version of the scoring model.\n\nSee https://dart.dev/web/wasm for details.\n" + "summary": "### [*] 20/20 points: Supports 4 of 6 possible platforms (**iOS**, **Android**, **Web**, Windows, **macOS**, Linux)\n\n* ✓ Android\n\n* ✓ iOS\n\n* ✓ macOS\n\n* ✓ Web\n\n\nThese platforms are not supported:\n\n
\n\nPackage does not support platform `Windows`.\n\n\nBecause:\n* `package:audio_service/audio_service.dart` that declares support for platforms: `Android`, `iOS`, `macOS`, `Web`.\n
\n\n
\n\nPackage does not support platform `Linux`.\n\n\nBecause:\n* `package:audio_service/audio_service.dart` that declares support for platforms: `Android`, `iOS`, `macOS`, `Web`.\n
\n\n\nThese issues are present but do not affect the score, because they may not originate in your package:\n\n
\n\nPackage does not support platform `Web`.\n\n\nBecause:\n* `package:audio_service/audio_service.dart` that imports:\n* `package:flutter_cache_manager/flutter_cache_manager.dart` that imports:\n* `package:flutter_cache_manager/src/storage/cache_info_repositories/cache_info_repositories.dart` that imports:\n* `package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart` that imports:\n* `package:path_provider/path_provider.dart` that declares support for platforms: `Android`, `iOS`, `Windows`, `Linux`, `macOS`.\n
\n\n### [x] 0/0 points: WASM compatibility\n\n
\n\nPackage not compatible with runtime wasm\n\n\nBecause:\n* `package:audio_service/audio_service.dart` that imports:\n* `package:flutter_cache_manager/flutter_cache_manager.dart` that imports:\n* `package:flutter_cache_manager/src/web/web_helper.dart` that imports:\n* `package:flutter_cache_manager/src/cache_store.dart` that imports:\n* `package:flutter_cache_manager/src/storage/file_system/file_system.dart` that imports:\n* `package:file/file.dart` that imports:\n* `package:file/src/interface.dart` that imports:\n* `package:file/src/io.dart` that imports:\n* `dart:io`\n
\n\nThis package is not compatible with runtime `wasm`, and will not be rewarded full points in a future version of the scoring model.\n\nSee https://dart.dev/web/wasm for details.\n\n### [x] 0/0 points: Swift Package Manager support\n\n
\n\nPackage does not support the Swift Package Manager on macos\n\n\nIt contains none of\n* macos/audio_service/Package.swift\n* darwin/audio_service/Package.swift\n\n
\n\nThis package for iOS or MacOs does not support the Swift Package Manager. It will not receive full points in a future version of the scoring model.\n\nSee https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors for details.\n" }, { "id": "analysis", diff --git a/test/goldens/end2end/audio_service-0.18.10.json_report.md b/test/goldens/end2end/audio_service-0.18.10.json_report.md index f479a09bf..24eb5b3e6 100644 --- a/test/goldens/end2end/audio_service-0.18.10.json_report.md +++ b/test/goldens/end2end/audio_service-0.18.10.json_report.md @@ -88,6 +88,23 @@ This package is not compatible with runtime `wasm`, and will not be rewarded ful See https://dart.dev/web/wasm for details. +### [x] 0/0 points: Swift Package Manager support + +
+ +Package does not support the Swift Package Manager on macos + + +It contains none of +* macos/audio_service/Package.swift +* darwin/audio_service/Package.swift + +
+ +This package for iOS or MacOs does not support the Swift Package Manager. It will not receive full points in a future version of the scoring model. + +See https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors for details. + ## 50/50 Pass static analysis diff --git a/test/goldens/end2end/url_launcher-6.1.12.json b/test/goldens/end2end/url_launcher-6.1.12.json index fe039a500..fcebcfea4 100644 --- a/test/goldens/end2end/url_launcher-6.1.12.json +++ b/test/goldens/end2end/url_launcher-6.1.12.json @@ -133,8 +133,8 @@ "title": "Platform support", "grantedPoints": 20, "maxPoints": 20, - "status": "passed", - "summary": "### [*] 20/20 points: Supports 6 of 6 possible platforms (**iOS**, **Android**, **Web**, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n\n* ✓ iOS\n\n* ✓ Windows\n\n* ✓ Linux\n\n* ✓ macOS\n\n* ✓ Web\n\n### [*] 0/0 points: WASM compatibility\n\nThis package is compatible with runtime `wasm`, and will be rewarded additional points in a future version of the scoring model.\n\nSee https://dart.dev/web/wasm for details.\n" + "status": "failed", + "summary": "### [*] 20/20 points: Supports 6 of 6 possible platforms (**iOS**, **Android**, **Web**, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n\n* ✓ iOS\n\n* ✓ Windows\n\n* ✓ Linux\n\n* ✓ macOS\n\n* ✓ Web\n\n### [*] 0/0 points: WASM compatibility\n\nThis package is compatible with runtime `wasm`, and will be rewarded additional points in a future version of the scoring model.\n\nSee https://dart.dev/web/wasm for details.\n\n### [x] 0/0 points: Swift Package Manager support\n\n
\n\nPackage does not support the Swift Package Manager on macos\n\n\nIt contains none of\n* macos/url_launcher/Package.swift\n* darwin/url_launcher/Package.swift\n\n
\n\nThis package for iOS or MacOs does not support the Swift Package Manager. It will not receive full points in a future version of the scoring model.\n\nSee https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors for details.\n" }, { "id": "analysis", diff --git a/test/goldens/end2end/url_launcher-6.1.12.json_report.md b/test/goldens/end2end/url_launcher-6.1.12.json_report.md index 8e729700d..c4782c7a1 100644 --- a/test/goldens/end2end/url_launcher-6.1.12.json_report.md +++ b/test/goldens/end2end/url_launcher-6.1.12.json_report.md @@ -52,6 +52,23 @@ This package is compatible with runtime `wasm`, and will be rewarded additional See https://dart.dev/web/wasm for details. +### [x] 0/0 points: Swift Package Manager support + +
+ +Package does not support the Swift Package Manager on macos + + +It contains none of +* macos/url_launcher/Package.swift +* darwin/url_launcher/Package.swift + +
+ +This package for iOS or MacOs does not support the Swift Package Manager. It will not receive full points in a future version of the scoring model. + +See https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors for details. + ## 50/50 Pass static analysis