-
Notifications
You must be signed in to change notification settings - Fork 9
/
macaca-reliable.config.js
45 lines (38 loc) · 1.04 KB
/
macaca-reliable.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
'use strict';
const fs = require('fs');
const path = require('path');
const helper = require('reliable-cli/lib/helper');
const pkg = require('./package');
const appId = pkg.name.replace(/-/g, '_');
const dotGradle = path.join(__dirname, appId, 'build.gradle');
const dotGradleContent = fs.readFileSync(dotGradle, 'utf8');
module.exports = async function () {
const gradle = await helper
.androidUtils
.parseGradle(dotGradleContent);
console.log(JSON.stringify(gradle, null, 2));
const version = `${gradle.ext.buildVersionName}.${gradle.ext.buildVersionCode}`;
const outputPath = `${appId}/build/outputs`;
return {
files: [
`${outputPath}/`,
],
packages: [
{
version,
type: 'debug',
path: `${outputPath}/apk/debug/${appId}-debug.apk`
},
{
version,
type: 'release',
path: `${outputPath}/apk/release/${appId}-release-unsigned.apk`
}
],
testInfo: {
},
extraInfo: {
'build.gradle': JSON.stringify(gradle, null, 2)
}
};
};