Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

set: rebuild settings #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/eslint-recommended', //eslint에서 권장하는 타입체크 플러그인들
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parser: '@typescript-eslint/parser', //타입스트립트에서도 eslint를 사용하기 위해 설치한 파서
parser: '@typescript-eslint/parser',
plugins: ['react', 'react-hooks', '@typescript-eslint'],
rules: {
indent: ['error', 2, { SwitchCase: 1 }], //들여쓰기 체크
semi: ['error', 'always'], //세미콜론 체크
quotes: ['error', 'double', { avoidEscape: true }], //따옴표 체크
'no-empty-function': 'off', //함수 띄어쓰기 체크인데 함수 실행()할때 에러낼 수 있으니 꺼버려
indent: ['error', 2, { SwitchCase: 1 }],
semi: ['error', 'always'],
quotes: ['error', 'double', { avoidEscape: true }],
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'off',
'react/display-name': 'off',
'react/prop-types': 'off',
Expand Down
7 changes: 3 additions & 4 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ node_modules/react-native/flow/
[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

exact_by_default=true

format.bracket_spacing=false

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
Expand Down Expand Up @@ -63,4 +62,4 @@ untyped-import
untyped-type-import

[version]
^0.137.0
^0.158.0
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ build/
.gradle
local.properties
*.iml
*.hprof

# node.js
#
Expand Down Expand Up @@ -65,4 +66,4 @@ ios/eyebody.xcodeproj/project.xcworkspace/
/.vscode

# package lock
package-lock.json
package-lock.json
12 changes: 6 additions & 6 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
jsxBracketSameLine: true, // > 를 다음 줄로 내릴지 여부
singleQuote: true, //싱글쿼트 사용 여부
trailingComma: 'all', //여러 줄을 사용할 때, 후행 콤마
printWidth: 100, //줄바꿈할 너비
endOfLine: 'auto', //마지막 라인 엔터
arrowParens: 'avoid', //화살표 함수 괄호 사용 방식
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
printWidth: 100,
endOfLine: 'auto',
arrowParens: 'avoid',
};
15 changes: 8 additions & 7 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
} from './src/lib/context/useStackContext';
import { NavigationContainer } from '@react-navigation/native';
import { cameraContext } from '@/lib/context/useCameraContext';
import { useRef } from 'react';

type TProps = {};

Expand All @@ -21,10 +20,10 @@ export type TGuideImage = {
};

// Initialize Apollo Client
const client = new ApolloClient({
uri: 'localhost:4000/graphql',
cache: new InMemoryCache(),
});
// const client = new ApolloClient({
// uri: 'localhost:4000/graphql',
// cache: new InMemoryCache(),
// });

const App = ({}: TProps) => {
const [GalleryStackType, setGalleryStack] = useState<TGalleryStack>('Select');
Expand All @@ -38,7 +37,8 @@ const App = ({}: TProps) => {
const [quality, setQuality] = useState(true);

return (
<ApolloProvider client={client}>
// <ApolloProvider client={client}>
<>
<StatusBar barStyle="light-content" />
<stackContext.Provider
value={{
Expand All @@ -63,7 +63,8 @@ const App = ({}: TProps) => {
</NavigationContainer>
</cameraContext.Provider>
</stackContext.Provider>
</ApolloProvider>
</>
// </ApolloProvider>
);
};

Expand Down
4 changes: 2 additions & 2 deletions android/app/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ android_library(

android_build_config(
name = "build_config",
package = "com.eyebody",
package = "com.eyebody2",
)

android_resource(
name = "res",
package = "com.eyebody",
package = "com.eyebody2",
res = "src/main/res",
)

Expand Down
22 changes: 13 additions & 9 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,22 @@ def jscFlavor = 'org.webkit:android-jsc:+'
*/
def enableHermes = project.ext.react.get("enableHermes", false);

/**
* Architectures to build native code for in debug.
*/
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")

android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
applicationId "com.eyebody"
applicationId "com.eyebody2"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
missingDimensionStrategy 'react-native-camera', 'general'
}
splits {
abi {
Expand All @@ -157,6 +156,11 @@ android {
buildTypes {
debug {
signingConfig signingConfigs.debug
if (nativeArchitectures) {
ndk {
abiFilters nativeArchitectures.split(',')
}
}
}
release {
// Caution! In production, you need to generate your own keystore file.
Expand Down Expand Up @@ -192,7 +196,7 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
exclude group:'com.facebook.fbjni'
}

debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
Expand All @@ -216,7 +220,7 @@ dependencies {
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
from configurations.implementation
into 'libs'
}

Expand Down
6 changes: 1 addition & 5 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:usesCleartextTraffic="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.eyebody;
package com.eyebody2;

import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
Expand Down
6 changes: 2 additions & 4 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eyebody">
package="com.eyebody2">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:name=".MainApplication"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.eyebody;
package com.eyebody2;

import com.facebook.react.ReactActivity;

Expand All @@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "eyebody";
return "eyebody2";
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.eyebody;
package com.eyebody2;

import android.app.Application;
import android.content.Context;
Expand Down Expand Up @@ -62,7 +62,7 @@ private static void initializeFlipper(
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.eyebody.ReactNativeFlipper");
Class<?> aClass = Class.forName("com.eyebody2.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">eyebody</string>
<string name="app_name">eyebody2</string>
</resources>
1 change: 0 additions & 1 deletion android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#000000</item>
</style>

</resources>
14 changes: 7 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@

buildscript {
ext {
buildToolsVersion = "29.0.3"
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
ndkVersion = "20.1.5948944"
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "21.4.7075529"
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("com.android.tools.build:gradle:4.2.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
Expand All @@ -32,7 +33,6 @@ allprojects {
}

google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ android.useAndroidX=true
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.75.1
FLIPPER_VERSION=0.99.0
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rootProject.name = 'eyebody'
rootProject.name = 'eyebody2'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "eyebody",
"displayName": "eyebody"
}
"name": "eyebody2",
"displayName": "eyebody2"
}
14 changes: 5 additions & 9 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'
platform :ios, '11.0'

target 'eyebody' do
target 'eyebody2' do
config = use_native_modules!

permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera/Permission-Camera.podspec"

config = use_native_modules!
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"

use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)

# Third party deps podspec link
pod 'react-native-camera', path: '../node_modules/react-native-camera'


target 'eyebodyTests' do
target 'eyebody2Tests' do
inherit! :complete
# Pods for testing
end
Expand Down
Loading