:wave: Hey! Is there any way to know which environ...
# compose-web
n
👋 Hey! Is there any way to know which environment a compose web app was built on? For instance, it’d be great to know if the web app was built using
jsBrowserDevelopment*
or
jsBrowserDistribution
to know which server environment (staging, prod) should be used, or to decide the logs strategy.
a
i am not aware if there is a way to tell, but on compose-desktop there is none. I use this with a combination of forwarding a production param via gradle so I know if I am on a debug or production build. https://github.com/gmazzo/gradle-buildconfig-plugin
n
Ok, thanks. That’s similar to what I’ve been doing with BuildKonfig. I wanted to take advantage of the fact that Android and iOS can provide config arguments on their own and are tied to Android Studio and XCode, so it’s easier to use than custom Gradle parameters for which you must create different run configurations:
Copy code
//android
initShared(
  isDebug = BuildConfig.isDebug,
  env = BuildConfig.environment,
)
👍 2