Skip to content

Commit e80dd39

Browse files
authored
feat: add unitTesting gradle variable (#46)
1 parent 774e043 commit e80dd39

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/before-build-task-args.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
module.exports = function (hookArgs, $options) {
3+
if(!hookArgs || !hookArgs.args) {
4+
return;
5+
}
6+
const unitTesting = $options && $options.env && $options.env.unitTesting || false;
7+
hookArgs.args.push(`-PunitTesting=${!!unitTesting}`);
8+
};

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
"type": "before-liveSync",
4040
"script": "lib/before-liveSync.js",
4141
"inject": true
42+
},
43+
{
44+
"type": "before-build-task-args",
45+
"script": "lib/before-build-task-args.js",
46+
"inject": true
4247
}
4348
]
4449
},

0 commit comments

Comments
 (0)