-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test-app): fix Android build (#10)
CI is broken on Android since today, applying a quick workaround to keep CI green while the react-native team figures it out. See: - facebook/react-native#21910 - facebook/react-native#21907
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
// As of today (Oct 23) react-native is broken on Android | ||
// We're fixing this by patching the repository order in the main gradle file of the Android project | ||
// See: | ||
// - https://github.com/facebook/react-native/pull/21910 | ||
// - https://github.com/facebook/react-native/issues/21907#issuecomment-432319128 | ||
|
||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
const gradlePath = path.resolve(__dirname, 'project/android/build.gradle') | ||
|
||
fs.writeFileSync( | ||
gradlePath, | ||
fs | ||
.readFileSync(gradlePath, 'utf-8') | ||
.replace(/google\(\)/g, '') | ||
.replace(/jcenter\(\)/g, 'google()\njcenter()') | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters