-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.js
150 lines (132 loc) · 3.09 KB
/
app.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// @ts-check
import withBuildProperties from 'expo-build-properties'
import {
AndroidConfig,
withAndroidStyles,
withGradleProperties,
} from 'expo/config-plugins'
const version = '0.17.0'
// eslint-disable-next-line no-undef
const IS_DEV = !!process.env.DEV
const id = IS_DEV
? 'com.leaftail1880.xdnevnik.dev'
: 'com.leaftail1880.xdnevnik'
const sentry = {
organization: 'leaftail1880',
project: 'xdnevnik',
}
const splashBackgroundDark = '#252525'
const splashBackgroundLight = '#EBEAEA'
const projectId = '97163afe-5c7e-4856-ba8f-348e00aa7c04'
/** @type {{expo: import("@expo/config-types/build/ExpoConfig.js").ExpoConfig}} */
const Config = {
expo: {
name: IS_DEV ? 'XDnevnik Dev Client' : 'XDnevnik',
slug: 'xdnevnik',
version: version,
owner: 'leaftail1880',
orientation: 'default',
icon: './assets/icon.png',
assetBundlePatterns: ['**/*'],
userInterfaceStyle: 'automatic',
notification: {
icon: './assets/notification_icon.png',
color: splashBackgroundLight,
},
ios: {
bundleIdentifier: id,
userInterfaceStyle: 'automatic',
infoPlist: {
UIBackgroundModes: ['lesson-notifications'],
},
},
android: {
package: id,
userInterfaceStyle: 'automatic',
permissions: ['FOREGROUND_SERVICE', 'REQUEST_INSTALL_PACKAGES'],
adaptiveIcon: {
foregroundImage: './assets/adaptive-icon.png',
backgroundColor: splashBackgroundLight,
},
},
plugins: [
IS_DEV ? 'expo-dev-client' : '',
'expo-updates',
'expo-build-properties',
['@sentry/react-native/expo', sentry],
[
'expo-navigation-bar',
{
position: 'relative',
visibility: 'visible',
behavior: 'inset-swipe',
},
],
[
'expo-splash-screen',
{
backgroundColor: splashBackgroundLight,
image: './assets/splash.png',
dark: {
image: './assets/splash.png',
backgroundColor: splashBackgroundDark,
},
imageWidth: 1284,
},
],
],
runtimeVersion: {
policy: 'appVersion',
},
updates: {
url: `https://u.expo.dev/${projectId}`,
},
extra: {
eas: {
projectId: projectId,
},
},
},
}
Config.expo.plugins = Config.expo.plugins?.filter(Boolean)
Config.expo = withBuildProperties(Config.expo, {
android: {
enableProguardInReleaseBuilds: true,
enableShrinkResourcesInReleaseBuilds: true,
useLegacyPackaging: true,
},
})
Config.expo = withGradleProperties(Config.expo, config => {
config.modResults.push(
{
type: 'property',
key: 'reactNativeArchitectures',
value: 'armeabi-v7a,arm64-v8a', //,x86,x86_64
},
{
type: 'property',
key: 'org.gradle.jvmargs',
value: '-Xmx3096m -XX:MaxMetaspaceSize=512m',
},
{
type: 'property',
key: 'gradle',
value: 'build -x lint -x lintVitalRelease',
},
)
return config
})
// Make dark theme properly work on Xiaomi devices
Config.expo = withAndroidStyles(Config.expo, config => {
config.modResults = AndroidConfig.Styles.assignStylesValue(
config.modResults,
{
add: true,
parent: AndroidConfig.Styles.getAppThemeGroup(),
name: `android:forceDarkAllowed`,
value: 'false',
},
)
return config
})
export default Config