Showing posts with label jet. Show all posts
Showing posts with label jet. Show all posts
Monday, December 18, 2017
How To Package JET Hybrid Mobile Application for Release Android Platform
How To Package JET Hybrid Mobile Application for Release Android Platform
If you want to build/package JET Hybrid application you must issue build:release or serve:release command. Read more about it in JET developer guide: Packaging Hybrid Mobile Applications. In order to run build:release or serve:release commands successfully, you need create buildConfig.json file, which includes information about self signed certificate. This allows to sign application and package it for release.
Steps below are tested for Android platform.
You can generate certificate with Java keytool utility. Navigate to Java home bin folder and run keytool. Specify correct path and preferred alias:
keytool -genkey -v -keystore /Users/andrejusbaranovskis/jdeveloper/mywork/jellyhouse-release-key.keystore -alias RedSamuraiConsulting -keyalg RSA -keysize 2048 -validity 10000
You will be asked to enter additional information, such as name, organization, location, etc.:

Once certificate is generated, you can create empty buildConfig.json file. I have created it in the root directory of JET Hybrid application. Certificate file is copied into the same location:

Provide release information in buildConfig.json. Since certificate file is located in the same folder, it is enough to specify its name without path. Include alias name, certificate password and keystore password:

If buildConfig.json contains correct entries, build:release should run successfully:
sudo grunt build:release --platform=android --buildConfig=buildConfig.json
Successful result output:

JET Hybrid release app built for Android platform size is 7.5 MB (major part takes Cordova libraries):

So, if you create self signed certificate and populate buildConfig.json correctly - it is very easy to run release build for Oracle JET Hybrid application.
Steps below are tested for Android platform.
You can generate certificate with Java keytool utility. Navigate to Java home bin folder and run keytool. Specify correct path and preferred alias:
keytool -genkey -v -keystore /Users/andrejusbaranovskis/jdeveloper/mywork/jellyhouse-release-key.keystore -alias RedSamuraiConsulting -keyalg RSA -keysize 2048 -validity 10000
You will be asked to enter additional information, such as name, organization, location, etc.:

Once certificate is generated, you can create empty buildConfig.json file. I have created it in the root directory of JET Hybrid application. Certificate file is copied into the same location:

Provide release information in buildConfig.json. Since certificate file is located in the same folder, it is enough to specify its name without path. Include alias name, certificate password and keystore password:

If buildConfig.json contains correct entries, build:release should run successfully:
sudo grunt build:release --platform=android --buildConfig=buildConfig.json
Successful result output:

JET Hybrid release app built for Android platform size is 7.5 MB (major part takes Cordova libraries):

So, if you create self signed certificate and populate buildConfig.json correctly - it is very easy to run release build for Oracle JET Hybrid application.
Friday, December 8, 2017
How to Setup Node js and Oracle JET on Oracle Linux
How to Setup Node js and Oracle JET on Oracle Linux
What if you want to develop Oracle JET in Oracle Linux? Certainly this is possible - both Node.js and Oracle JET run on Oracle Linux or any other Linux distribution. If you follow Oracle JET Setup Guide, you will see Node.js is listed as prerequisite. But it may not be exactly straightforward to install Node.js on Oracle Linux. Below I will guide you through the steps.
Run command to install development tools to build native add-ons to be installed:
yum install -y gcc-c++ make

Enable Node.js yum repository:
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -

Install Node.js:
sudo yum install nodejs

Verify if node and npm was installed successfully:

Next you can follow steps described in Oracle JET setup guide, all straightforward. Install Oracle JET:
sudo npm -g install @oracle/ojet-cli

Create new JET application with OJET utility:
sudo ojet create jetwinapp --template=navdrawer

Run application with OJET utility:
sudo ojet serve

JET application runs on Oracle Linux:

Run command to install development tools to build native add-ons to be installed:
yum install -y gcc-c++ make

Enable Node.js yum repository:
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -

Install Node.js:
sudo yum install nodejs

Verify if node and npm was installed successfully:

Next you can follow steps described in Oracle JET setup guide, all straightforward. Install Oracle JET:
sudo npm -g install @oracle/ojet-cli

Create new JET application with OJET utility:
sudo ojet create jetwinapp --template=navdrawer

Run application with OJET utility:
sudo ojet serve

JET application runs on Oracle Linux:

Subscribe to:
Posts (Atom)