Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Lint Error and Android Build #175

Merged
merged 2 commits into from
Aug 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Menu_kotlinVersion=1.3.50
Menu_compileSdkVersion=28
Menu_buildToolsVersion=28.0.3
Menu_targetSdkVersion=28
Menu_compileSdkVersion=29
Menu_buildToolsVersion=30.0.3
Menu_targetSdkVersion=29
8 changes: 4 additions & 4 deletions example/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* @format
*/

const path = require("path");
const path = require('path');

const exclusionList = (() => {
try {
return require("metro-config/src/defaults/exclusionList");
return require('metro-config/src/defaults/exclusionList');
} catch (_) {
// `blacklist` was renamed to `exclusionList` in 0.60
return require("metro-config/src/defaults/blacklist");
return require('metro-config/src/defaults/blacklist');
}
})();

Expand All @@ -21,7 +21,7 @@ const blockList = exclusionList([

// This stops "react-native run-windows" from causing the metro server to
// crash if its already running
new RegExp(`${path.join(__dirname, "windows").replace(/[/\\]+/g, "/")}.*`),
new RegExp(`${path.join(__dirname, 'windows').replace(/[/\\]+/g, '/')}.*`),

// Workaround for `EBUSY: resource busy or locked, open '~\msbuild.ProjectImports.zip'`
// when building with `yarn windows --release`
Expand Down
46 changes: 23 additions & 23 deletions example/react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
const fs = require("fs");
const path = require("path");
const fs = require('fs');
const path = require('path');

const windowsProjectFile = path.join(
"node_modules",
".generated",
"windows",
"ReactTestApp",
"ReactTestApp.vcxproj"
'node_modules',
'.generated',
'windows',
'ReactTestApp',
'ReactTestApp.vcxproj'
);

module.exports = {
project: {
android: {
sourceDir: "android",
sourceDir: 'android',
manifestPath: path.relative(
path.join(__dirname, "android"),
path.join(__dirname, 'android'),
path.join(
path.dirname(require.resolve("react-native-test-app/package.json")),
"android",
"app",
"src",
"main",
"AndroidManifest.xml"
path.dirname(require.resolve('react-native-test-app/package.json')),
'android',
'app',
'src',
'main',
'AndroidManifest.xml'
)
),
},
ios: {
project: (() => {
const {
packageSatisfiesVersionRange,
} = require("react-native-test-app/scripts/configure");
} = require('react-native-test-app/scripts/configure');
if (
packageSatisfiesVersionRange(
"@react-native-community/cli-platform-ios",
"<5.0.2"
'@react-native-community/cli-platform-ios',
'<5.0.2'
)
) {
// Prior to @react-native-community/cli-platform-ios v5.0.0,
// `project` was only used to infer `sourceDir` and `podfile`.
return "ios/ReactTestApp-Dummy.xcodeproj";
return 'ios/ReactTestApp-Dummy.xcodeproj';
}

// `sourceDir` and `podfile` detection was fixed in
// @react-native-community/cli-platform-ios v5.0.2 (see
// https://github.com/react-native-community/cli/pull/1444).
return "node_modules/.generated/ios/ReactTestApp.xcodeproj";
return 'node_modules/.generated/ios/ReactTestApp.xcodeproj';
})(),
},
windows: fs.existsSync(windowsProjectFile) && {
sourceDir: "windows",
solutionFile: "MenuExample.sln",
sourceDir: 'windows',
solutionFile: 'MenuExample.sln',
project: {
projectFile: path.relative(
path.join(__dirname, "windows"),
path.join(__dirname, 'windows'),
windowsProjectFile
),
},
Expand Down