Skip to content

[native_assets_cli] Dart API interface per asset type #994

Closed
@dcharkes

Description

@dcharkes

The Dart API can be revved independently of the protocol, bumping this out of v1.0.

Make package:native_assets_cli only consume an API that shows getters for native code (and not any getters for Java or other asset types). This can be achieved by

  1. nesting NativeBuildConfig inside BuildConfig which doesn't work well with the shared fields such as outputDirectory, or
  2. BuildConfig implements NativeBuildConfig where only a subset of the getters is visible, or
  3. an extension type NativeBuildConfig on BuildConfig.

Make package:native_toolchain_c add assets to a NativeBuildOutput that doesn't have methdods/setters related to Java assets or data assets. This can be achieved by

  1. BuildOutput implements NativeBuildOutput and NativeBuildOutput.addAsset takes NativeCodeAsset instead of Asset.
  2. an extension type.

We could even have assetId be optional for some asset types (jars) in the API.

Question: Don't we ever have builders that would like to add more than one asset type? They would need to take the full BuildOutput.

Related:

Sister issue for the JSON protocol:

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A feature or bug we're unlikely to addresspackage:hooks

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions