forked from appium/appium-uiautomator2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
26 lines (22 loc) · 799 Bytes
/
gulpfile.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
'use strict';
const gulp = require('gulp');
const boilerplate = require('@appium/gulp-plugins').boilerplate.use(gulp);
const DEFAULTS = require('@appium/gulp-plugins').boilerplate.DEFAULTS;
const { androidHelpers } = require('appium-android-driver');
const { fs } = require('@appium/support');
const path = require('path');
const B = require('bluebird');
boilerplate({
build: 'appium-uiautomator2-server',
files: DEFAULTS.files.concat('index.js'),
transpile: false,
});
gulp.task('sign-apk', async function signApks () {
// Signs the APK with the default Appium Certificate
const adb = await androidHelpers.createADB({});
const apksToSign = await fs.glob('*.apk', {
cwd: path.resolve('apks'),
absolute: true,
});
return B.all(apksToSign.map((apk) => adb.sign(apk)));
});