native icon indicating copy to clipboard operation
native copied to clipboard

[hooks] Exclude a platform from being built by dependency's build hook

Open HosseinYousefi opened this issue 3 months ago • 6 comments

package:jni supports Windows, Linux, ... and Android but a lot of the times users only want to use it for Android. Sentry also supports Windows, Linux, ... but wants to use package:jni only on Android. However right now if someone wants to build an app that depends on Sentry, they still need to have JDK installed on their machine: https://github.com/getsentry/sentry-dart/issues/3033

This is a problem in the Flutter plugin build system as well: https://github.com/flutter/flutter/issues/81650

With build hooks, we could allow end-users to add some user-defines for package:jni not to be built for Desktop but this means that a Sentry user has to know about the internal implementation of Sentry which is not ideal. Ideally we would want Sentry itself to be able to specify this.

HosseinYousefi avatar Aug 06 '25 11:08 HosseinYousefi