Embedded feature flags

Embedded feature flags give teams the ability to pack CloudBees Feature Management data (Feature Flags) at build time.

The ability to pack custom deployment rules and configurations at build time allows teams to control elements which are required at startup time without introducing any latency (fetching data from the network).

As opposed to default values which handle flag defaults, embedded feature flags allow for custom default deployment rules, i.e: open a feature only for beta users in the US.

Below are Android, iOS, and JavaScript embedded feature flags installation instructions.



See Gradle plugin page for the installation notes.


The plugin is able to find all the necessary information from Android sources automatically.

By default, it looks for ROX app key in AndroidManifest.xml. But this can be changed via the resValue config in build.gradle:

defaultConfig {
    resValue "string", "ROLLOUT_KEY", "<ROLLOUT_KEY>"

buildTypes {
    debug {
      resValue "string", "ROLLOUT_KEY", "<DEBUG_ROLLOUT_KEY>"
    release {
      resValue "string", "ROLLOUT_KEY", "<RELEASE_ROLLOUT_KEY>"

Another way of overriding default values is specifying them in Gradle’s rox extension. Config property names, and their default values are below:

rox {
  resKey     "ROLLOUT_KEY"                  // resValue key to extract appKey
  xmlKey     "rox.apiKey"                   // android manifest key to extract appKey
  host       "https://x-api.rollout.io"     // host to get configuration from
  platform   "Android"                      // platform to send with request
  fieldName  "ROX_EMBEDDED_CONFIGURATION"   // field name in BuildConfig.class which stores the configuration
  groupId    "io.rollout.rox"               // groupId to identify the version of the sdk
  artifactId "rox-android"                  // artifactId to identify the artifact name of the sdk
  buildTypes "release,debug"                // list of build types, separated by ',' - to apply to plugin for. Empty string "" Stands for _all_ build types. This is the default.
  apiVersion "1.8"                          // ROX API version

Java Server

See Gradle plugin page for the installation notes.

After installing plugin, specify your app key in build.gradle:

rox {
    appKey "<ROLLOUT_KEY>"


Add a new Run Script phase to your target, with the following line

“${SRCROOT}“/Pods/ROXCore/lib/store_rox_configuration.sh -k “<your_app_key>”


  1. Install the plugin - npm install --save-dev rox-embedded-webpack.

  2. Add the plugin to you Webpack config.

const ROXEmbeddedPlugin = require('rox-embedded-webpack-plugin');
module.exports = {
  entry: //...,
  output: //...,
  plugins: [
    new ROXEmbeddedPlugin(options)

Where options in an object with the following keys

   app: <YOUR APP KEY>,
   platform: <YOUR_PLATFORM_OF_CHOICE>, // (you can use 'Browser' here)