Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native_assets_cli] Add JarAssets #1350

Open
3 tasks
dcharkes opened this issue Jul 17, 2024 · 6 comments
Open
3 tasks

[native_assets_cli] Add JarAssets #1350

dcharkes opened this issue Jul 17, 2024 · 6 comments

Comments

@dcharkes
Copy link
Collaborator

  • Add a new JarAsset in the API.
  • Consume that asset type in flutter_tools.
  • Consume that asset type in Dart standalone. (optional)

This would solve:

We didn't have a tracking bug for this yet, just some loose references in various places (for example #878 (comment)).

@dcharkes
Copy link
Collaborator Author

We also need a BuildConfig.targetJavaVersion that can be passed to javac as -target $version. (Note this should be a Version or String in the API, as versions such as 1.6 occur.)

@HosseinYousefi
Copy link
Member

HosseinYousefi commented Jul 18, 2024

We also need a BuildConfig.targetJavaVersion that can be passed to javac as -target $version. (Note this should be a Version or String in the API, as versions such as 1.6 occur.)

And a minimumAndroidSdk.

This also allows us to evaluate android sdk version comparisons at compile time and tree shake unused code away similar to how Platform.isFoo does it. We had this discussion with @mkustermann before. One question is where to put "Android.sdkVersion". For now it's only accessible from Flutter but we could decide to have a specific android target in mind when compiling Dart standalone as well which we can pass in pubspec.yaml.

@dcharkes
Copy link
Collaborator Author

@HosseinYousefi
Copy link
Member

minimumAndroidSdk

https://pub.dev/documentation/native_assets_cli/latest/native_assets_cli/HookConfig/targetAndroidNdkApi.html

That seems like a confusing name though because we also have a targetSdkVersion.

@dcharkes
Copy link
Collaborator Author

dcharkes commented Jul 18, 2024

minimumAndroidSdk

https://pub.dev/documentation/native_assets_cli/latest/native_assets_cli/HookConfig/targetAndroidNdkApi.html

That seems like a confusing name though because we also have a targetSdkVersion.

It seems that the reviewer on #49 should have done more bike shedding! 🤔

(Note: I have never seen someone use target SDK and max SDK versions. The NDK compiler doesn't even take take them as options. Only min SDK is implemented there. And it's not called min. It's just the target tripple.)

@HosseinYousefi
Copy link
Member

It seems that the reviewer on #49 should have done more bike shedding! 🤔

Always-Has-Been

@HosseinYousefi HosseinYousefi moved this to Backlog in JNIgen tracker Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants