Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[expo-cli] Fix 'generate-module' to support latest expo-module-template #2510

Merged
merged 2 commits into from
Aug 28, 2020

Conversation

barthap
Copy link
Contributor

@barthap barthap commented Aug 26, 2020

Why

Due to expo/expo#9319, package expo-module-templates changed directory structure (kotlin was renamed to java under android/src/main).

Currently, npm-published expo-module-template@8.3.1 tagged as latest still has kotlin directory, but version 8.4.0/next has that directory renamed.

Current CLI expo generate-module expects kotlin as directory. This PR prepares it to also expect java.

How

Created a function to check which of these directories exist. If both - choose java; if none - throw human readable error.

Test plan

Tested for both expo-module-template versions (latest and next). Also tested for package with invalid directory structure.

@barthap barthap force-pushed the @barthap/generate-module-fix branch from 0cb959d to a626118 Compare August 28, 2020 07:27
@barthap barthap merged commit 800ce3a into master Aug 28, 2020
@barthap barthap deleted the @barthap/generate-module-fix branch August 28, 2020 07:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants