File tree 5 files changed +56
-0
lines changed
5 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
2
build
3
3
* /build
4
+ node_modules /
4
5
bin
5
6
gen
6
7
local.properties
Original file line number Diff line number Diff line change @@ -39,3 +39,8 @@ dependencies {
39
39
implementation ' com.alibaba:fastjson:1.2.38'
40
40
implementation ' com.airbnb.android:lottie:2.5.4'
41
41
}
42
+
43
+ ext {
44
+ buildVersionName = ' 1.0'
45
+ buildVersionCode = ' 0.2'
46
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ gradle clean build -PdisablePreDex --stacktrace
4
+
5
+ npm i
6
+
7
+ npm run marmot
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const fs = require ( 'fs' ) ;
4
+ const path = require ( 'path' ) ;
5
+ const helper = require ( 'marmot-cli/lib/helper' ) ;
6
+
7
+ const pkg = require ( './package' ) ;
8
+
9
+ const dotGradle = path . join ( __dirname , pkg . name , 'build.gradle' ) ;
10
+ const dotGradleContent = fs . readFileSync ( dotGradle , 'utf8' ) ;
11
+
12
+ module . exports = async function ( ) {
13
+ const gradle = await helper
14
+ . androidUtils
15
+ . parseGradle ( dotGradleContent ) ;
16
+
17
+ console . log ( JSON . stringify ( gradle , null , 2 ) ) ;
18
+ const version = `${ gradle . ext . buildVersionName } .${ gradle . ext . buildVersionCode } ` ;
19
+ const outputPath = `${ pkg . name } /build/outputs` ;
20
+ return {
21
+ files : [
22
+ `${ outputPath } /` ,
23
+ ] ,
24
+ packages : [
25
+ {
26
+ version,
27
+ type : 'debug' ,
28
+ path : `${ outputPath } /apk/debug/debug/${ pkg . name } .apk`
29
+ }
30
+ ] ,
31
+ testInfo : {
32
+ } ,
33
+ extraInfo : {
34
+ }
35
+ } ;
36
+ } ;
37
+
Original file line number Diff line number Diff line change 9
9
" android_app_bootstrap/build/outputs/apk/android_app_bootstrap-debug.apk" ,
10
10
" index.js"
11
11
],
12
+ "scripts" : {
13
+ "marmot" : " marmot report -c ./marmot.config.js"
14
+ },
12
15
"repository" : {
13
16
"type" : " git" ,
14
17
"url" : " git://github.com/app-boostrap/android-app-bootstrap.git"
15
18
},
19
+ "devDependencies" : {
20
+ "marmot-cli" : " ^1.0.0"
21
+ },
16
22
"license" : " MIT"
17
23
}
You can’t perform that action at this time.
0 commit comments