From 070d36317b849e46d3f8153224f44f065ee5ce7a Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Thu, 28 Dec 2017 17:25:25 +0100 Subject: [PATCH] added simple build script to create the react native bundle before the buildozer APK build --- app/index.js | 2 +- build.sh | 5 +++++ src/main/assets/index.android.bundle | 2 +- src/main/assets/index.android.bundle.meta | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100755 build.sh diff --git a/app/index.js b/app/index.js index 7756e353..da8ab0b6 100644 --- a/app/index.js +++ b/app/index.js @@ -5,7 +5,7 @@ class InfoComponent extends React.Component { render() { return ( - LBRY Info + LBRY UI ); } diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..3024721e --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd app +react-native bundle --platform android --dev false --entry-file index.js --bundle-output ../src/main/assets/index.android.bundle --assets-dest ../src/main/res/ +cd .. +buildozer android debug diff --git a/src/main/assets/index.android.bundle b/src/main/assets/index.android.bundle index d51fce37..ad50bea5 100644 --- a/src/main/assets/index.android.bundle +++ b/src/main/assets/index.android.bundle @@ -9,7 +9,7 @@ 'undefined'!=typeof global?global:'undefined'!=typeof self&&self,Array.from||(Array.from=function(e){if(null==e)throw new TypeError('Object is null or undefined');var n,t,o=arguments[1],f=arguments[2],r=Object(e),l='function'==typeof Symbol&&"function"==typeof Symbol?Symbol.iterator:'@@iterator',i='function'==typeof o,u=0;if('function'==typeof r[l]){n='function'==typeof this?new this:[];for(var y,a=r[l]();!(y=a.next()).done;)t=y.value,i&&(t=o.call(f,t,u)),n[u]=t,u+=1;return n.length=u,n}var c=r.length;for((isNaN(c)||c<0)&&(c=0),n='function'==typeof this?new this(c):new Array(c);u=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r},r.slicedToArray=(function(){return function(e,r){if(Array.isArray(e))return e;if(("function"==typeof Symbol?Symbol.iterator:"@@iterator")in Object(e))return(function(e,r){var t=[],n=!0,o=!1,i=void 0;try{for(var f,u=e["function"==typeof Symbol?Symbol.iterator:"@@iterator"]();!(n=(f=u.next()).done)&&(t.push(f.value),!r||t.length!==r);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t})(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),r.taggedTemplateLiteral=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))},r.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},r.toConsumableArray=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);rj.length&&j.push(e)}function E(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var u=!1;if(null===e)u=!0;else switch(o){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case c:case f:case a:case p:u=!0}}if(u)return n(r,e,""===t?"."+C(e,0):t),1;if(u=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l