Skip to content
This repository has been archived by the owner on Jun 26, 2019. It is now read-only.

Commit

Permalink
using grunt-crosswalk that uses crosswalk-app-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Waterman committed Sep 29, 2015
1 parent b724fe5 commit 6565e53
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 21 deletions.
48 changes: 28 additions & 20 deletions Gruntfile.js
Expand Up @@ -17,26 +17,15 @@ module.exports = function (grunt) {

crosswalk: {
options: {
outDir: 'build',
verbose: false,
verbose: true, // informative output, otherwise quiet
debug: false, // includes output of rm and cp commands (-v option)
version: '<%= packageInfo.version %>',
name: '<%= packageInfo.name %>',
pkg: 'org.org01.webapps.<%= packageInfo.name.toLowerCase() %>',
icon: 'icon_128.png',
fullscreen: true,
remoteDebugging: true,
appRoot: 'build/xpk',
appLocalPath: 'index.html',
},
shared: {
// no arch for shared
},
arm: {
arch: 'arm',
appRoot: 'build/apk',
},
x86: {
arch: 'x86',
}
'default': {}
},

clean: ['build'],
Expand Down Expand Up @@ -168,6 +157,29 @@ module.exports = function (grunt) {

},

apk: {
files: [
{ expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/apk/' },
{ expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/apk/' }
]
},

apk_manifest:
{
files: [
{ expand: true, cwd: 'platforms/android-apk/', src: ['manifest.json'], dest: 'build/apk/' }
],

options:
{
processContent: function(content, srcpath)
{
return grunt.template.process(content);
}
}

},

sdk: {
files: [
{ expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/sdk/' },
Expand Down Expand Up @@ -322,6 +334,7 @@ module.exports = function (grunt) {
]);
grunt.registerTask('wgt', ['dist', 'copy:wgt', 'copy:wgt_config', 'package:wgt']);
grunt.registerTask('xpk', ['dist', 'copy:xpk', 'copy:xpk_manifest']);
grunt.registerTask('apk', ['dist', 'copy:apk', 'copy:apk_manifest']);
grunt.registerTask('sdk', [
'clean',
'imagemin:dist',
Expand Down Expand Up @@ -363,9 +376,4 @@ module.exports = function (grunt) {
grunt.registerTask('sdk-install', ['sdk', 'install']);

grunt.registerTask('default', 'wgt');
grunt.registerTask('apk', [
'xpk',
'crosswalk:x86',
'crosswalk:arm'
]);
};
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -20,7 +20,7 @@
"grunt-contrib-copy": "~0.4.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-tizen": "~0.1.1",
"grunt-crosswalk": "~0.0.1",
"grunt-crosswalk": "*",
"async": "~0.2.6",
"node-native-zip": "~1.1.0",
"lodash": "~1.1.1",
Expand Down
27 changes: 27 additions & 0 deletions platforms/android-apk/manifest.json
@@ -0,0 +1,27 @@
{
"name": "<%= packageInfo.name %>",
"short_name": "<%= packageInfo.name %>",
"display": "standalone",
"icons": [
{
"src": "icon_128.png",
"sizes": "128x128"
},
{
"src": "icon_48.png",
"sizes": "48x48"
},
{
"src": "icon_16.png",
"sizes": "16x16"
}
],
"start_url": "index.html",
"xwalk_app_version": "<%= packageInfo.version %>",
"xwalk_package_id": "org.org01.webapps.<%= packageInfo.name.toLowerCase() %>",
"xwalk_target_platforms": "android",
"xwalk_android_animatable_view": false,
"xwalk_android_keep_screen_on": false,
"xwalk_windows_update_id": "39377815-5790-6419-4898-877555970102",
"xwalk_windows_vendor": "(Intel)"
}

0 comments on commit 6565e53

Please sign in to comment.