OpenTV ION

RN - Common Build Instructions

Introduction

This page provides information on:

  • How to install the dependencies for different clients    

  • How to build the OCB source code for different platforms

  • Various feature flags and their values/impact on native libraries

  • How to add a target, feature with libraries custom building

  • Different Jenkins targets and their configurations

OCB - Git URL

The full code of OCB can be cloned from the location below. 

Clone with SSH - git@gitlab.hq.k.grp:ion-codebase/ocb.git
Clone with HTTPS - https://gitlab.hq.k.grp/ion-codebase/ocb.git


Install dependencies

For details on installing dependencies, refer to Dependency installation.

General

This is the default build for command for the application from the default/git Perforce source code. 

yarn builds 

For customization of builds, the same command can be used with the following properties. 

yarn builds --platform=<platform_item> --client=<client> --buildType=<variant>


Build properties and values 

Property

Values

Description

platform (target)




andmob(default)

The app will build for Android mobile and Tablet.

ios

Generate ios build folder

androidTv

The app will build for Android TV based on the buildType. It will include all features.

fireTv

The app will build for Firestick based on the buildType. Exclude Google service features like Firebase and include Amazon counterparts like ADM.

client (config)






sales(default)

The configuration of sales hosting and UI feature customization to be included along with the build.

deviceinteg

The configuration of deviceinteg hosting and UI feature customization to be included along with the build.

customer1Test

The configuration of customer1Test hosting and UI feature customization to be included along with the build.

customer2

The configuration of customer2 hosting and UI feature customization to be included along with the build.

customer3

The configuration of customer3 hosting and UI feature customization to be included along with the build.

customer1Demo

The configuration of customer1Demo hosting and UI feature customization to be included along with the build.

buildType

release

To generate an APK and enterprise IPA file.

debug(default)

To run an application in debug mode.

appstore-release

To generate AppStore IPA

launcher

ott

To generate the build for an OTT launcher variant.

hybrid

To generate the build for a hybrid variant.


Platform-specific build

iOS (mobile and tablet) 

Release

For generating the release IPA with client-specific and platform-specific configuration, use this command. 

yarn builds --platform=ios --client=sales --buildType=release

For more details on iOS release build, refer to iOS release build.

Development

For generating development iOS build with client-specific and platform-specific configuration, use this command. 

yarn builds --platform=ios --client=sales --buildType=debug

For more details on iOS development build, refer to iOS development build.

Android (mobile and tablet)

Release

For generating the release APK for Android mobile or TAB with client-specific and platform-specific configuration, use this command.

yarn builds --platform=andmob --client=sales --buildType=release

For more details on generating the APK, refer to Android mobile and tablet release build.

Development

For generating the development APK for Android mobile or TAB with client-specific and platform-specific configuration, use this command.

yarn builds --platform=andmob --client=sales --buildType=debug

 For more details on generating the APK, refer to Android mobile and tablet development build.

Android TV

Release

For generating the release APK for Android TV with client-specific and platform-specific configuration, use this command.

yarn builds --platform=androidTv --client=sales --buildType=release

For more details on generating the APK, refer to Android TV release build.

Development

For generating the development APK for Android TV with client-specific and platform-specific configuration, use this command.

yarn builds --platform=androidTv --client=sales --buildType=debug

 For more details on generating the APK, refer to Android TV development build.

Fire TV

Release

For generating the release APK for Fire TV with client-specific and platform-specific configuration, use this command.

yarn builds --platform=fireTv --client=sales --buildType=release

For more details for generating APK please refer the link - Fire TV release build

Development

For generating the development APK for fire TV with clinet and platform-specific configuration, please follow the below command

yarn builds --platform=fireTv --client=sales --buildType=debug

 More details on generating the APK, refer to Fire TV development build.

Launcher

Release

For generating the release APK for a launcher (for OTT or hybrid) with client-specific and platform-specific configuration, use this command.

yarn builds --launcher=ott --client=sales --buildType=release

For more details on generating the APK, refer to Launcher variant for OTT and hybrid release build.

Development

For generating the development APK for launcher (for OTT or hybrid) with client-specific and platform-specific configuration, use this command.

yarn builds --launcher=ott --client=sales --buildType=debug

 For more details on generating the APK, refer to Launcher build for OTT and hybrid variant development.

Android

We can configure a dependency for a specific build variant by prefixing the name of the build variant before the Implementation keyword.

For example, we have five variants now:  customer1, product, mobile, Fire TV and Android TV.

Now when we want a dependency to be included only for Android TV (for example Firebase analytics), then it will be added like this:

Before: implementation 'com.google.firebase:firebase-analytics:<version_number>'
After: androidTvImplementation 'com.google.firebase:firebase-analytics:<version_number>'

Referencehttps://developer.android.com/studio/build/build-variants.