Skip to content

Commit 250f485

Browse files
committed
fix: plugins that need a different minsdkversion for android build
1 parent 19415ae commit 250f485

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/project.service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ const exceptions = {
1313
'kinvey-nativescript-sdk': {
1414
command: 'npm i rxjs-compat'
1515
},
16+
'nativescript-fingerprint-auth': {
17+
command: 'sed -i -- \'s/defaultConfig ./defaultConfig {\\n minSdkVersion 23/g\' app/App_Resources/Android/app.gradle'
18+
},
1619
'nativescript-plugin-gplaces': {
1720
file: 'google-places.config.json',
1821
content: `{
@@ -34,6 +37,7 @@ const exceptions = {
3437
}`
3538
},
3639
'nativescript-push-notifications': {
40+
command: 'sed -i -- \'s/defaultConfig ./defaultConfig {\\n minSdkVersion 19/g\' app/App_Resources/Android/app.gradle',
3741
file: 'app/App_Resources/Android/google-services.json',
3842
content: `{
3943
"project_info": {
@@ -199,7 +203,8 @@ export namespace ProjectService {
199203
Logger.log(`Applying plugin exception for ${name}`);
200204
if (exceptions[name].file) {
201205
writeFileSync(path.join(cwd, exceptions[name].file), exceptions[name].content, 'utf8');
202-
} else if (exceptions[name].command) {
206+
}
207+
if (exceptions[name].command) {
203208
await execPromise(cwd, exceptions[name].command);
204209
}
205210
} catch (ex) {

0 commit comments

Comments
 (0)