Skip to content

Commit 463e4b9

Browse files
committed
Testing cordova implementation
1 parent 8799c92 commit 463e4b9

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

build/schemas.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Joi from "joi";
1+
import Joi, { version } from "joi";
22

33
// Define the paramSchema
44
const paramSchema = Joi.object({
@@ -265,6 +265,14 @@ const configSchema = Joi.object({
265265
)
266266
)
267267
.required(),
268+
cordovaPlugins: Joi.array()
269+
.items(
270+
Joi.object({
271+
id: Joi.string().required(),
272+
version: Joi.string().required(),
273+
})
274+
)
275+
.required(),
268276
}).required(),
269277
aceCategories: Joi.object().pattern(Joi.string(), Joi.string()).default({}),
270278
info: Joi.object({

config.caw.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const hasDomside = false;
2121
export const files = {
2222
extensionScript: {},
2323
fileDependencies: [],
24+
cordovaPlugins: [],
2425
};
2526

2627
// categories that are not filled will use the folder name

template/plugin.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ export default function (ADDON_INFO, parentClass) {
7777
});
7878
});
7979
}
80+
81+
if (ADDON_INFO.files.cordovaPlugins) {
82+
ADDON_INFO.files.cordovaPlugins.forEach((plugin) => {
83+
this._info.AddCordovaPlugin(plugin.id, plugin.version);
84+
});
85+
}
8086
}
8187
SDK.Lang.PushContext(".properties");
8288
this._info.SetProperties(

0 commit comments

Comments
 (0)