Skip to content

Expo config plugin does not support kotlin on android and thus fails to configure the sdk properly #178

@mauricedoepke

Description

@mauricedoepke

I use expo sdk 52 and react-native-crisp-chat-sdk 0.20.0.

The expo prebuild command creates my MainApplication file in kotlin (MainApplication.kt).
The crisp expo config plugin assumes it to be written in java though, which is why the matchers and the replacing don't work.

There are 2 issues in my oppinion:

  1. The plugin needs to support kotlin
  2. The plugin fails silently which makes future failures not so obvious, even though they are likely when dealing with string manipulation in expo config plugins. It would be nice as a pattern if the plugin checks if adding a line, e.g. a import was successful and throw if not, to make such errors more obvious.

In the expo code it looks like the plugin functions even provide the language as a variable, which can be used to build case distinctions:
https://github.com/expo/expo/blob/6a25dace4f3d77a5412949c57a8e68882762b2b1/packages/install-expo-modules/src/plugins/android/withAndroidModulesMainApplication.ts#L11-L21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions