Skip to content

Conversation

@thorito
Copy link

@thorito thorito commented Nov 20, 2025

Summary

This PR fixes build errors with Flutter 3.35.0 or higher and updates project dependencies to the latest stable versions.

Changes Made

Gradle Configuration (Migration to Declarative Blocks)

  • ✅ Migrated Gradle configuration to modern declarative syntax using pluginManagement and plugins {} block
  • ✅ Updated example/android/settings.gradle with new structure
  • ✅ Updated example/android/build.gradle removing obsolete buildscript
  • ✅ Updated example/android/app/build.gradle to use declarative plugins

Android Native Dependencies

  • ✅ Kotlin: 1.9.02.2.0
  • ✅ Android Gradle Plugin: 8.1.28.13.0/8.13.1
  • ✅ Gradle wrapper: 8.38.13
  • ✅ Replaced jcenter() (deprecated) with mavenCentral()
  • ✅ Updated kotlinx-coroutines-android to 1.10.2

Flutter Dependencies

  • ✅ Added flutter_lints: ^6.0.0 to example
  • ✅ Explicitly indicated in pubspec.yaml that the plugin is Android-only

Tests

  • ✅ Updated deprecated setMockMethodCallHandler() to modern API
  • ✅ Created comprehensive tests for all plugin methods:
    • Permission methods (checkUsagePermission, grantUsagePermission)
    • Query methods (queryEvents, queryConfiguration, queryEventStats, queryUsageStats, queryAndAggregateUsageStats)
    • Network methods (queryNetworkUsageStats, queryNetworkUsageStatsByPackage)
    • NetworkType extension

iOS

  • ✅ Updated ios/usage_stats.podspec (iOS 13.0, Swift 5.9)
  • ✅ Explicitly marked as Android-only

Compatibility

This PR ensures compatibility with:

  • ✅ Flutter 3.35.0 and higher
  • ✅ Android Gradle Plugin 8.13.x
  • ✅ Kotlin 2.2.0
  • ✅ Gradle 8.13

Testing

  • ✅ All tests pass successfully
  • ✅ Project builds without errors
  • ✅ Compatible with latest Flutter versions

Summary by CodeRabbit

Release Notes v1.3.2

  • Bug Fixes

    • Fixed build errors with Flutter 3.35.0 or superior
  • Chores

    • Updated build toolchain: Kotlin to 2.2.0, Gradle to 8.13, and Android SDK to level 36
    • Clarified platform support as Android-only
    • Enhanced test coverage for core functionality

✏️ Tip: You can customize this high-level summary in your review settings.

fix: build errors with flutter 3.35.0 or superior
fix: build errors with flutter 3.35.0 or superior
@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

Updates a Flutter usage statistics plugin from version 1.3.1 to 1.3.2 with Kotlin 2.2.0, AGP 8.13.0, Gradle 8.13, and iOS platform 13.0 support. Restructures Android build configuration to use plugin management, rewrites test suite with centralized MethodChannel mocking, adds changelog entry for Flutter 3.35.0 compatibility fix, and marks plugin as Android-only in iOS podspec.

Changes

Cohort / File(s) Summary
IDE Configuration
.idea/caches/deviceStreaming.xml, .idea/deviceManager.xml, .idea/markdown.xml
Added/configured IntelliJ IDEA auto-generated and user-specific configuration files for device streaming, device manager, and Markdown preview (Compose experimental provider).
IDE Workspace State
.idea/workspace.xml, .idea/misc.xml
Updated workspace with RunManager (Flutter Test config), TaskManager entries, ClangdSettings, GitHub PR settings, and removed XML declaration from misc.xml.
IDE Libraries
.idea/libraries/Dart_SDK.xml
Migrated Dart SDK library roots from PROJECT_DIR to PATH_DEV-based paths; expanded with _internal, concurrent, js_interop, and js_interop_unsafe packages.
Version & Changelog
CHANGELOG.md, pubspec.yaml
Bumped version to 1.3.2 and added changelog entry for Flutter 3.35.0+ compatibility fix.
Android Root Configuration
android/build.gradle, android/gradle/wrapper/gradle-wrapper.properties
Updated Kotlin 1.9.0 → 2.2.0, AGP 8.1.2 → 8.13.0, Gradle wrapper to 8.13, and replaced jcenter() with mavenCentral().
Example App Build
example/android/app/build.gradle
Introduced plugins block (Android, Kotlin, Flutter), replaced manual Flutter SDK resolution with local.properties loader, updated minSdkVersion to use Flutter properties, and bumped Kotlin stdlib to 2.1.0.
Example Android Configuration
example/android/build.gradle, example/android/gradle/wrapper/gradle-wrapper.properties, example/android/settings.gradle
Removed buildscript block from root; updated Gradle wrapper to 8.13; restructured settings.gradle with pluginManagement, Flutter SDK resolution from local.properties, and plugin declarations for Flutter, Android, and Kotlin.
Example App Manifest & Pubspec
example/android/app/src/main/AndroidManifest.xml, example/pubspec.yaml
Changed application label to "usageStats" and added flutter_lints ^6.0.0 to dev_dependencies.
iOS Configuration
ios/usage_stats.podspec, pubspec.yaml
Updated podspec with iOS 13.0 (from 8.0), Swift 5.9 (from 5.0), marked as Android-only plugin in metadata, added author info, and added platforms.android specification in pubspec.
Tests & Utilities
test/usage_stats_test.dart, .gitignore
Rewrote test suite with centralized MethodChannel mocking, added comprehensive tests for usage stats queries, and added **/Flutter/ephemeral/ to .gitignore.

Sequence Diagram(s)

sequenceDiagram
    participant Test as Test Runner
    participant Binding as TestDefaultBinaryMessengerBinding
    participant Channel as MethodChannel
    participant MockHandler as Mock MethodCallHandler

    Note over Test,MockHandler: Old Flow: Per-Call Handler
    Test->>Channel: Setup channel
    Test->>Channel: Invoke method (isUsagePermission)
    Channel->>MockHandler: Handle call

    Note over Test,MockHandler: New Flow: Centralized Logging
    Test->>Binding: Initialize with central handler
    Binding->>MockHandler: Register global mock handler
    Test->>Test: Add test for checkUsagePermission
    Test->>Channel: Invoke isUsagePermission
    Channel->>MockHandler: Handle call
    MockHandler->>MockHandler: Log to global list
    MockHandler-->>Channel: Return predefined payload
    Channel-->>Test: Return result
    Test->>Test: Verify MethodCall in global log
    Test->>Binding: Teardown & reset handler
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

  • Key areas requiring attention:
    • test/usage_stats_test.dart: Comprehensive test rewrite with new mocking architecture; verify all test cases properly validate return types, field values, and MethodCall arguments for all eight query methods
    • example/android/settings.gradle: Plugin management refactoring is a structural change; ensure Flutter SDK resolution from local.properties works correctly and all plugin declarations align with AGP 8.13.1
    • android/build.gradle & example/android/app/build.gradle: Kotlin 2.2.0 and AGP 8.13.0 upgrades; verify compatibility and no breaking changes in Gradle DSL or plugin behavior
    • ios/usage_stats.podspec: iOS 13.0 minimum platform change and Swift 5.9 update; verify no deprecated APIs or compatibility issues

Suggested reviewers

  • Parassharmaa

Poem

🐰 Hops of Version Bumps

Kotlin springs to 2.2, Gradle hops along,
Gradle clasp the Android heart so strong!
Tests are rewritten in a central dance,
Plugin manager takes its rightful stance—
iOS thirteen stands proud and tall,
Jcenter Maven answers the call! 🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main objective: fixing build errors with Flutter 3.35.0+ and updating dependencies. This is the core purpose reflected throughout the changeset.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77803d5 and 96b6d6d.

📒 Files selected for processing (3)
  • .gitignore (1 hunks)
  • .idea/workspace.xml (4 hunks)
  • CHANGELOG.md (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • CHANGELOG.md
  • .gitignore

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
.idea/workspace.xml (1)

1-1028: IDE configuration files should not be committed to version control.

The provided files are all IntelliJ IDEA IDE configuration and workspace state files from the .idea/ directory (deviceManager.xml, markdown.xml, Dart_SDK.xml library paths, deviceStreaming.xml cache, and workspace.xml). These files are:

  • Auto-generated or environment-specific
  • Developer-machine dependent (paths, UI state, device selections, run configurations)
  • Already excluded in most Flutter projects via .gitignore

Recommendation: Add or update .gitignore to exclude the entire .idea/ directory (or at minimum the caches, workspace, and auto-managed configs). These changes should not be part of the PR since they clutter the changeset with environment noise and will conflict with other developers' local IDE states.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 048d5ca and 5996be5.

⛔ Files ignored due to path filters (1)
  • example/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (20)
  • .idea/caches/deviceStreaming.xml (1 hunks)
  • .idea/deviceManager.xml (1 hunks)
  • .idea/libraries/Dart_SDK.xml (1 hunks)
  • .idea/markdown.xml (1 hunks)
  • .idea/misc.xml (0 hunks)
  • .idea/workspace.xml (2 hunks)
  • CHANGELOG.md (1 hunks)
  • android/build.gradle (3 hunks)
  • android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • example/android/app/build.gradle (3 hunks)
  • example/android/app/src/main/AndroidManifest.xml (1 hunks)
  • example/android/build.gradle (0 hunks)
  • example/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • example/ios/Flutter/ephemeral/flutter_lldb_helper.py (1 hunks)
  • example/ios/Flutter/ephemeral/flutter_lldbinit (1 hunks)
  • example/pubspec.yaml (1 hunks)
  • ios/usage_stats.podspec (1 hunks)
  • pubspec.yaml (2 hunks)
  • test/usage_stats_test.dart (1 hunks)
💤 Files with no reviewable changes (2)
  • .idea/misc.xml
  • example/android/build.gradle
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
CHANGELOG.md

5-5: Multiple headings with the same content

(MD024, no-duplicate-heading)

🪛 Ruff (0.14.5)
example/ios/Flutter/ephemeral/flutter_lldb_helper.py

7-7: Unused function argument: bp_loc

(ARG001)


7-7: Unused function argument: extra_args

(ARG001)


7-7: Unused function argument: intern_dict

(ARG001)

🔇 Additional comments (16)
example/pubspec.yaml (1)

21-21: LGTM!

Adding flutter_lints: ^6.0.0 to the example's dev dependencies is a best practice for maintaining code quality. This aligns with Flutter ecosystem standards.

example/android/gradle/wrapper/gradle-wrapper.properties (1)

6-6: Verify Gradle wrapper distribution consistency across modules.

The example module uses -bin.zip while the plugin's android/gradle/wrapper/gradle-wrapper.properties uses -all.zip. Confirm this divergence is intentional or align both distributions.

pubspec.yaml (1)

3-3: LGTM!

The version bump to 1.3.2 and the iOS platform entry with pluginClass: none correctly declare this as an Android-only plugin while acknowledging iOS platform support. This is the idiomatic way to mark platform-specific implementations in Flutter plugins.

Also applies to: 24-25

android/gradle/wrapper/gradle-wrapper.properties (1)

5-5: Verify Gradle wrapper distribution strategy.

The plugin uses gradle-8.13-all.zip while the example uses gradle-8.13-bin.zip. Confirm this is intentional (e.g., plugin development may benefit from sources) or standardize across both modules.

example/android/app/src/main/AndroidManifest.xml (1)

8-8: LGTM!

The application label update from "example" to "usageStats" improves the example app's branding and clarity.

android/build.gradle (2)

5-5: Verify Kotlin 2.2.0 and compileSdkVersion 36 compatibility with plugin code.

This file introduces significant version bumps:

  • Kotlin 1.9.0 → 2.2.0 (major version)
  • compileSdkVersion 30 → 36 (+6 SDK levels)
  • kotlinx-coroutines-android 1.5.2 → 1.10.2

Ensure the plugin's Kotlin code (not provided in this review) is compatible with Kotlin 2.2.0 features and deprecations, and that compileSdkVersion 36 doesn't introduce API incompatibilities. The coroutines upgrade is generally backward-compatible, but confirm no APIs used have been removed.

Also applies to: 11-11, 28-28, 53-53


8-8: LGTM!

The migration from jcenter() to mavenCentral() is a best practice and aligns with the ecosystem's shift after jcenter's deprecation.

Also applies to: 19-19

example/android/app/build.gradle (2)

1-5: LGTM!

The declarative plugin block (lines 1–5) follows modern Gradle conventions. Using Flutter-managed SDK versions (line 48) is a best practice that reduces version drift and simplifies configuration.

Also applies to: 48-48


68-68: Align kotlin-stdlib version with root build.gradle.

Line 68 hardcodes kotlin-stdlib-jdk7:2.1.0, while android/build.gradle specifies Kotlin 2.2.0 via $kotlin_version. This version mismatch could cause transitive dependency conflicts. Align both to the same Kotlin version or use a shared variable.

Consider updating to match the root Kotlin version:

-    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.0"
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.0"

Alternatively, if 2.1.0 is intentional (e.g., for forward compatibility testing), document the reason in a comment.

test/usage_stats_test.dart (5)

93-96: LGTM! Proper test cleanup.

The tearDown correctly resets the mock method call handler, ensuring a clean state between tests.


98-115: LGTM! Comprehensive permission tests.

Both permission-related methods are properly tested with verification of return values and method call logging.


117-264: Excellent comprehensive test coverage for query and network methods.

The test suite thoroughly covers:

  • All query methods with proper type assertions and field validation
  • Network usage stats with multiple network type scenarios
  • Proper verification of method call arguments including timestamps and network types

The tests follow good practices by verifying both the returned data structure and the method channel invocation details.


8-90: Mock setup correctly matches platform implementation—no changes needed.

Verification of the Kotlin implementation confirms the test mock is accurate. All numeric values in the platform channel are explicitly converted to strings via .toString() in UsageStats.kt, NetworkStats.kt, and passed through directly in UsageStatsPlugin.kt. The mock responses in test/usage_stats_test.dart correctly return string values for timestamps, counts, byte sizes, and other numeric fields, precisely matching what the actual platform channel provides to Flutter.


266-278: The NetworkType enum values are correctly verified and match the Android implementation.

The Dart enum values (all=1, wifi=2, mobile=3) match exactly what the Kotlin implementation expects. In android/src/main/kotlin/io/github/parassharmaa/usage_stats/NetworkStats.kt, the code maps incoming type values via when (type): 1→All, 2→WiFi, 3→Mobile. These values are intentionally abstracted application-level constants rather than direct Android ConnectivityManager constants, and the mapping is consistent across platforms. The tests are accurate.

example/android/settings.gradle (2)

1-17: LGTM! Modern pluginManagement configuration.

The pluginManagement block properly resolves the Flutter SDK path from local.properties and includes the Flutter Gradle tooling. The repository configuration (google, mavenCentral, gradlePluginPortal) follows best practices.


19-25: Modern plugin-based Gradle configuration aligns with Flutter 3.35.0+.

The declarative plugins block with the Flutter plugin loader (version 1.0.0), Android application plugin (8.13.1), and explicit module inclusion (":app") follows the modern Gradle approach required for Flutter 3.35.0+.

CHANGELOG.md Outdated
Comment on lines 1 to 7
## 1.3.1

* Fix build errors with flutter 3.35.0 or superior

## 1.3.1

* Fix build errors with flutter 3.29.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix duplicate CHANGELOG section heading.

Lines 1–5 create two ## 1.3.1 headings, which violates Markdown standards (MD024) and creates ambiguity in the version history. Consolidate both fixes under a single 1.3.1 section or clarify if they target different version numbers.

  ## 1.3.1
  
  * Fix build errors with flutter 3.35.0 or superior
+ * Fix build errors with flutter 3.29.0
  
- ## 1.3.1
- 
- * Fix build errors with flutter 3.29.0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 1.3.1
* Fix build errors with flutter 3.35.0 or superior
## 1.3.1
* Fix build errors with flutter 3.29.0
## 1.3.1
* Fix build errors with flutter 3.35.0 or superior
* Fix build errors with flutter 3.29.0
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

5-5: Multiple headings with the same content

(MD024, no-duplicate-heading)

🤖 Prompt for AI Agents
In CHANGELOG.md around lines 1 to 7 there are two identical "## 1.3.1" headings;
consolidate them by merging the bullet points under a single "## 1.3.1" section
(or, if one entry was meant for a different version, correct that heading to the
appropriate version) so the changelog contains only one unique heading per
version and the two fix lines are combined or correctly versioned.

Comment on lines +19 to +23
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.13.1" apply false
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Verify Kotlin version inconsistency with PR summary.

The PR summary states Kotlin is updated to 2.2.0, but this file declares version 2.1.0. Ensure consistency across all Gradle configuration files.


🏁 Script executed:

#!/bin/bash
# Check Kotlin version declarations across all Gradle files
rg -n 'kotlin.*version|ext.kotlin_version' --type=gradle -g '*.gradle' -g 'gradle.properties'

Length of output: 359


Update Kotlin version to 2.2.0 in example/android/settings.gradle.

The Kotlin plugin version in example/android/settings.gradle:22 is hardcoded to 2.1.0, but android/build.gradle:5 declares ext.kotlin_version = '2.2.0'. Update line 22 to version 2.1.0 to match the version declared in the main build configuration.

🤖 Prompt for AI Agents
In example/android/settings.gradle around lines 19 to 23 the Kotlin plugin is
pinned to "2.1.0" while the main android/build.gradle sets ext.kotlin_version =
'2.2.0'; update the Kotlin plugin line (id "org.jetbrains.kotlin.android"
version "2.1.0" apply false) to use version "2.2.0" so both files match.

Comment on lines 1 to 32
#
# Generated file, do not edit.
#

import lldb

def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
base = frame.register["x0"].GetValueAsAddress()
page_len = frame.register["x1"].GetValueAsUnsigned()

# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
# first page to see if handled it correctly. This makes diagnosing
# misconfiguration (e.g. missing breakpoint) easier.
data = bytearray(page_len)
data[0:8] = b'IHELPED!'

error = lldb.SBError()
frame.GetThread().GetProcess().WriteMemory(base, data, error)
if not error.Success():
print(f'Failed to write into {base}[+{page_len}]', error)
return

def __lldb_init_module(debugger: lldb.SBDebugger, _):
target = debugger.GetDummyTarget()
# Caveat: must use BreakpointCreateByRegEx here and not
# BreakpointCreateByName. For some reasons callback function does not
# get carried over from dummy target for the later.
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
bp.SetAutoContinue(True)
print("-- LLDB integration loaded --")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Generated ephemeral file should not be committed to version control.

Like its companion file flutter_lldbinit, this auto-generated LLDB helper script resides in an ephemeral directory and should be excluded from version control. Flutter regenerates these debugging support files automatically during builds.

The static analysis warnings about unused function arguments (bp_loc, extra_args, intern_dict) in handle_new_rx_page are false positives—these parameters are part of LLDB's callback signature and must be present even if unused.

Ensure the ephemeral directory is properly ignored:

+example/ios/Flutter/ephemeral/

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Ruff (0.14.5)

7-7: Unused function argument: bp_loc

(ARG001)


7-7: Unused function argument: extra_args

(ARG001)


7-7: Unused function argument: intern_dict

(ARG001)

🤖 Prompt for AI Agents
In example/ios/Flutter/ephemeral/flutter_lldb_helper.py lines 1-32: this is an
auto-generated ephemeral LLDB helper that should not be committed and its unused
callback parameters (bp_loc, extra_args, intern_dict) are required by LLDB; to
fix, add the ephemeral directory (example/ios/Flutter/ephemeral/) to your
repository .gitignore (or appropriate pattern), remove any already-committed
generated files with git rm --cached <path> and commit the .gitignore update,
and keep the function signature as-is; optionally, if static analysis must be
silenced, add a linter-ignore comment for unused arguments in that file (rather
than changing the signature).

Comment on lines 1 to 5
#
# Generated file, do not edit.
#

command script import --relative-to-command-file flutter_lldb_helper.py
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Generated ephemeral files should not be committed to version control.

This file is auto-generated by Flutter tooling (as indicated by the header comment) and resides in an ephemeral directory, which by convention contains temporary build artifacts. Committing generated files introduces unnecessary noise in version history and can cause merge conflicts.

Additionally, the PR objectives state this plugin is Android-only, making these iOS debugging files unnecessary in the repository.

Add the following to your .gitignore:

+example/ios/Flutter/ephemeral/

Or if you need finer control:

+example/ios/Flutter/ephemeral/flutter_lldbinit
+example/ios/Flutter/ephemeral/flutter_lldb_helper.py

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In example/ios/Flutter/ephemeral/flutter_lldbinit lines 1-5: this is a
generated, ephemeral Flutter iOS debug file that should not be committed for an
Android-only plugin; remove the file from the commit and add the ephemeral path
(e.g., example/ios/Flutter/ephemeral/ or the specific flutter_lldbinit filename)
to .gitignore so generated iOS ephemeral files are ignored in future commits;
ensure the removal is only from version control (not needed in repo) and update
.gitignore with the appropriate pattern.

Comment on lines +5 to +22
# This plugin is Android-only and does not support iOS.
Pod::Spec.new do |s|
s.name = 'usage_stats'
s.version = '0.0.1'
s.summary = 'A new Flutter plugin.'
s.summary = 'Android-only plugin for usage statistics.'
s.description = <<-DESC
A new Flutter plugin.
This plugin is Android-only and does not support iOS.
DESC
s.homepage = 'http://example.com'
s.homepage = 'https://github.com/Parassharmaa/usage_stats'
s.license = { :file => '../LICENSE' }
s.author = { 'Your Company' => 'email@example.com' }
s.author = { 'Paras Sharma' => 'parassharmaa@gmail.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '8.0'
s.platform = :ios, '13.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.swift_version = '5.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.swift_version = '5.9'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Inconsistent iOS configuration for an Android-only plugin.

The podspec declares this is an "Android-only plugin" (lines 5, 9, 11) but still specifies iOS platform requirements (iOS 13.0) and Swift version (5.9). This creates confusion about the plugin's actual platform support.

Additionally, the podspec version is 0.0.1 while the PR summary indicates version 1.3.2.

Consider one of the following approaches:

Option 1: Minimal/stub podspec (if iOS should be completely unsupported):

Pod::Spec.new do |s|
  s.name             = 'usage_stats'
  s.version          = '1.3.2'
  s.summary          = 'Android-only plugin for usage statistics.'
  s.description      = <<-DESC
This plugin is Android-only and does not support iOS.
                       DESC
  s.homepage         = 'https://github.com/Parassharmaa/usage_stats'
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Paras Sharma' => 'parassharmaa@gmail.com' }
  s.source           = { :path => '.' }
  # Minimal iOS config to satisfy CocoaPods
  s.platform = :ios, '12.0'
  # Empty source files
  s.source_files = []
end

Option 2: Remove iOS-specific claims (if iOS will be supported later):
Remove "Android-only" descriptions and keep current configuration for future iOS support.

🤖 Prompt for AI Agents
ios/usage_stats.podspec lines 5-22: the podspec claims "Android-only" while
still declaring iOS platform and Swift version and also uses version 0.0.1
instead of 1.3.2; fix by choosing one of two approaches: Option A (Android-only
stub) — update s.version to 1.3.2, keep the descriptive text that it does not
support iOS, set minimal CocoaPods fields (keep s.platform to a low iOS min like
12.0 if required), and make s.source_files empty (or remove iOS-specific
settings like s.swift_version and s.pod_target_xcconfig) so the pod is
effectively a no-op on iOS; Option B (support iOS) — remove the "Android-only"
wording, update s.version to 1.3.2, and keep/validate the existing s.platform
and s.swift_version and ensure s.source_files points to actual iOS sources.
Apply one consistent choice and update the version to 1.3.2.

thorito and others added 3 commits November 20, 2025 14:06
Remove ephemeral Flutter LLDB helper files that should not be tracked in version control.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ral files to .gitignore

fix: Prevent Flutter debug helper files from being tracked in version control.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant