Skip to content

Add plugin tooling to enforce documentation of minimum supported OS versions #84200

@stuartmorgan-g

Description

@stuartmorgan-g

Currently we don't document what the minimum OS version of our plugins is, for any platform. On iOS, it's mostly a non-issue at the moment since like Flutter they all support iOS 8 (at build time at least; camera doesn't mostly work before iOS 10), but there's no guarantee of that being true in general; on Android it's already a build-time issue (#34999).

The risk of such documentation is of course that it isn't the source of truth, so could become outdated. We should

  • Design a standard format we use to document this in all of our READMEs (extensible to all platforms)
    • This format should have both an easily parsed version for the step below, but also a place for general notes like ("functionality X requires a higher minimum version Y")
  • Add it to all our plugin READMEs
  • Add tooling support to detect that plugins have that entry, and wherever possible enforce that it is no lower than the source of truth (as we do with CHANGELOG and pubspec.yaml versions, for instance):
    • iOS/macOS: s.platform in the podspec
    • Android: minSdkVersion in build.gradle
    • Windows: I don't know that there's a formal way to express this in the build
    • Linux: There's not really a good way of expressing this; the build requirements are in the form of library versions

The check needs to be "no lower" rather than "equal" so that we have the ability to express things like the current iOS camera plugin situation, where we may want to allow the plugin to build in projects that target older iOS versions, but not work at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: contributor-productivityTeam-specific productivity, code health, technical debt.d: api docsIssues with https://api.flutter.dev/p: toolingAffects the flutter_plugin_tools packagepackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions