Skip to content

Commit f4b7c85

Browse files
authored
Merge pull request #7 from arpankumarlahiri/master
fix: sdk 49 kotlin java semicolon build error
2 parents 8534277 + c9da803 commit f4b7c85

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

build/android/mainApplicationDependency.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/android/mainApplicationDependency.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/android/mainApplicationDependency.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@ export const withAndroidMainApplicationDependency: ConfigPlugin<
1515
const hostWrapperClass = "import expo.modules.ReactNativeHostWrapper";
1616
const codePushClass = "import com.microsoft.codepush.react.CodePush";
1717

18-
// Expo 50 uses Kotlin and does not require the ;
19-
if (mainApplicationProps.modResults.contents.includes(hostWrapperClass)) {
20-
mainApplicationProps.modResults.contents = addBelowAnchorIfNotFound(
21-
mainApplicationProps.modResults.contents,
22-
hostWrapperClass,
23-
codePushClass
24-
);
25-
}
26-
2718
// Expo 49 uses Java and requires the ;
2819
if (
2920
mainApplicationProps.modResults.contents.includes(`${hostWrapperClass};`)
@@ -35,6 +26,17 @@ export const withAndroidMainApplicationDependency: ConfigPlugin<
3526
);
3627
}
3728

29+
// Expo 50 uses Kotlin and does not require the ;
30+
else if (mainApplicationProps.modResults.contents.includes(hostWrapperClass)) {
31+
mainApplicationProps.modResults.contents = addBelowAnchorIfNotFound(
32+
mainApplicationProps.modResults.contents,
33+
hostWrapperClass,
34+
codePushClass
35+
);
36+
}
37+
38+
39+
3840
/**
3941
* Override the getJSBundleFile method in order to let
4042
* the CodePush runtime determine where to get the JS

0 commit comments

Comments
 (0)