Skip to content

Commit

Permalink
fix multidex config
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddell committed Oct 22, 2020
1 parent f2bbc84 commit c275d9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion boilerplate/test/setup.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jest
})
<%_ } _%>
.mock('react-native-vector-icons/FontAwesome', () => 'Icon')
// related to
// related to https://github.com/rt2zz/redux-persist/issues/1243
.mock("redux-persist/lib/createPersistoid", () =>
jest.fn(() => ({
update: jest.fn(),
Expand Down
9 changes: 8 additions & 1 deletion src/lib/react-native-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ const updateAndroidFiles = async (context) => {
await patchInFile(context, `${process.cwd()}/android/app/build.gradle`, {
before: `dependencies {`,
insert: `
implementation 'androidx.multidex:multidex:2.0.1'
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
Expand All @@ -134,6 +133,14 @@ const updateAndroidFiles = async (context) => {
}
}`,
})
await patchInFile(context, `${process.cwd()}/android/app/build.gradle`, {
after: `dependencies {`,
insert: ` implementation 'androidx.multidex:multidex:2.0.1'`,
})
await patchInFile(context, `${process.cwd()}/android/app/build.gradle`, {
after: `versionCode 1`,
insert: ` multiDexEnabled true`,
})
}

module.exports = {
Expand Down

0 comments on commit c275d9f

Please sign in to comment.