-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
nativescript.config.js
53 lines (53 loc) · 2.04 KB
/
nativescript.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
const timelineEnabled = !!process.env['NS_TIMELINE'];
const sentryEnabled = !!process.env['NS_SENTRY'];
const loggingEnabled = !!process.env['NS_LOGGING'];
const id = process.env['APP_ID'];
const CARD_APP = id === 'com.akylas.cardwallet';
module.exports = {
ignoredNativeDependencies: [].concat(sentryEnabled ? [] : ['@nativescript-community/sentry']),
id: id || 'com.akylas.documentscanner',
appResourcesPath: process.env['APP_RESOURCES'] || 'App_Resources/documentscanner',
buildPath: process.env['APP_BUILD_PATH'] || 'build/documentscanner',
webpackPackageName: '@akylas/nativescript-webpack',
webpackConfigPath: 'app.webpack.config.js',
projectName: process.env['PROJECT_NAME'],
appPath: 'app',
forceLog: loggingEnabled,
profiling: timelineEnabled ? 'timeline' : undefined,
i18n: {
defaultLanguage: 'en'
},
ios: {
runtimePackageName: '@akylas/nativescript-ios-runtime'
},
android: {
plugins: {
'plugin-nativeprocessor': {
// based on the app the plugin is built with our without qrcode.
// so both apps cant use the same aar. we use a suffix to differentiate them
aarSuffix: CARD_APP ? '-cardwallet' : '-documentscanner'
}
},
runtimePackageName: '@akylas/nativescript-android-runtime',
gradleVersion: '8.6',
markingMode: 'none',
codeCache: true,
// for cardwallet we enable qrcode. and then we filter aar to only use the one we want
gradleArgs: CARD_APP ? ['-PwithQRCode', '-PaarIgnoreFilter=**/*documentscanner*'] : ['-PaarIgnoreFilter=**/*cardwallet*'],
enableMultithreadedJavascript: false,
handleTimeZoneChanges: true,
...(loggingEnabled
? {
forceLog: true,
maxLogcatObjectSize: 40096
}
: {})
},
cssParser: 'rework',
hooks: [
{
type: 'after-prepareNativeApp',
script: 'tools/scripts/after-prepareNativeApp.js'
}
]
};