Magic variables

Fine-tune your project's settings

Magic environment variables provide you with some fine-tuned control over your project's settings on Nevercode. For example, you can specify the version of a particular component to be used during the build or skip a default step. As opposed to the read-only environment variables that we export, you will have to define these variables yourself to use them, see how to add environment variables here.

Below is a list of magic variables categorized by platform to which they apply.

Generic variables

Environment variableMeaning
NC_CLONE_UNSHALLOWPerforms a full clone of the repository instead of top 50 commits.
NC_INFER_FLAGSAdditional flags for infer - static code analysis tool.
NC_JAVA_VERSIONOne of 1.7, 1.8, or 9. Default value is 1.8.
NC_PLATFORMSpecify project’s platform before initial scan. It can be one of android, ios, cordova, ionic, react_native, fastlane_ios, fastlane_android. Example: your repository has both Android and iOS projects and you want to pick up Android. You can achieve that by setting this variable to android.
NC_REQUIRE_ANDROID_EMULATORIf set to any value, Android emulator is retained even if it is not required for tests.
NC_TEST_ONLYIf set to any value, build step will be skipped.

Android specific variables

Environment variableMeaning
NC_ANDROID_INSTRUMENTATION_TEST_TARGETName of instrumentation test target
NC_ANDROID_MAIN_ARTEFACTPath to the Android apk which is used for running the instrumentation. It can be uploaded as an environment file.
NC_ANDROID_NDK_REVISIONNDK version number
NC_ANDROID_UNIT_TEST_TARGETName of Unit test target
NC_ANDROID_USE_ORCHESTRATORIf set to any value, Android instrumentation test run in Firebase will be executed with --use-orchestrator flag.
NC_GRADLE_LOG_LEVELOne of debug, info or stacktrace. Will add --debug, --info or --stacktrace flag to Gradle commands.
NC_MAIN_EXPANSION_FILE_PATHSpecify main APK expansion file path for Google Play publishing.
Nevercode will download the expansion file from the specified location and publish it to Google Play along with the build package. Note that the expansion file will not be uploaded if the same version of the file already exists on Google Play.
NC_PATCH_EXPANSION_FILE_PATHSpecify patch APK expansion file path for Google Play publishing.
Nevercode will download the expansion file from the specified location and publish it to Google Play along with the build package. Note that the expansion file will not be uploaded if the same version of the file already exists on Google Play.

iOS specific variables

Environment variableMeaning
NC_IOS_ARCHIVE_DONT_UPLOAD_BITCODEDoes not include the bitcode in the archive (only applies to native iOS applications).
NC_IOS_ARCHIVE_DONT_UPLOAD_SYMBOLSDoes not include the debug symbols in the archive (only applies to native iOS applications).
NC_IOS_ARCHIVE_METHODexport method to be used in exportOptionsPlist for Xcode archive step. It can be one of app-store, ad-hoc, enterprise or development. The default value will be deduced from provisioning profiles that are used to perform code signing.
NC_IOS_CONFIGiOS Build Configuration name. It defaults to Build Configuration of selected scheme Archive action.
NC_IOS_INCLUDE_SYMROOTIf set to any value, adds contents of iOS symroot folder to build artefacts zip bundle.
NC_IOS_USE_ARCHIVEExample value: true
If set, Nevercode uses the archive action to build and package the application.
NC_ITC_PROVIDERiTunes Connect provider name.
NC_SKIP_COCOAPODSExample value: true. If any value is present, downloading and installing Cocoapods is skipped.
NC_XCODEBUILD_ARCHxcodebuild architecture to compile for when code signing is not set up. Defaults to x86_64.
NC_XCODEBUILD_SDKxcodebuild SDK name to compile for when code signing is not set up. Defaults to iphonesimulator.

Cordova and Ionic specific variables

Environment variableMeaning
NC_CORDOVA_CLI_VERSIONDefine the Cordova CLI version to be used for building your app.
NC_CORDOVA_ANDROID_PLATFORM_VERSIONDefine the cordova-android plugin version to be used for adding Android platform with (ionic) cordova platform add [email protected]<version>.
NC_CORDOVA_IOS_PLATFORM_VERSIONDefine the cordova-ios plugin version to be used for adding iOS platform with (ionic) cordova platform add [email protected]<version>.
NC_CORDOVA_IGNORE_BUILD_JSONIf set to any value, code signing info from build.json for Cordova/Ionic apps will be ignored.
NC_CORDOVA_PRODUCTION_BUILDIf set to any value, the application for production will be built. The variable may be helpful for a debug build because Nevercode always uses --prod option for a release build.
NC_DONT_REMOVE_CORDOVA_PLATFORMSIf set to any value Nevercode will skip platfrom rm <platform> and platfrom add <platform> steps for Cordova and Ionic projects
NC_IONIC_CLI_VERSIONDefine the Ionic CLI version to be used for building your app. Semver syntax is supported.
NC_NODE_VERSIONDefault value is 8.
Node version to be used. Semver syntax is supported.
NC_NPM_VERSIONDefault value is latest. npm version to be used. Semver syntax is supported.
NC_SKIP_NPM_INSTALLIf any value is present, automatic execution of npm install will be skipped.
NC_SKIP_YARN_INSTALLIf any value is present, automatic execution of yarn install will be skipped.

React Native specific variables

Environment variableMeaning
NC_NODE_VERSIONDefault value is 8.
Node version to be used. Semver syntax is supported.
NC_NPM_VERSIONDefault value is latest. npm version to be used. Semver syntax is supported.
NC_REACT_NATIVE_ANDROID_TARGETCustom Gradle target for your React Native Android build. It defaults to assembleDebug or assembleRelease based on the configuration value chosen from UI.
NC_REACT_NATIVE_SCHEMEiOS Scheme for your React Native iOS build. It defaults to the scheme that was automatically created by React Native command line tools.
NC_SKIP_NPM_DEPENDENCIESIf any value is present, automatic execution of npm install or yarn install will be skipped.
NC_SKIP_NPM_INSTALLIf any value is present, automatic execution of npm install will be skipped.
NC_SKIP_YARN_INSTALLIf any value is present, automatic execution of yarn install will be skipped.

Flutter specific variables

Environment variableMeaning
NC_FLUTTER_VERSIONFlutter version to be checked out (default is latest).
NC_FLUTTER_CHANNELFlutter channel to be checked out. Note that when you define both NC_FLUTTER_CHANNEL and NC_FLUTTER_VERSION, we will use the Flutter version specified by NC_FLUTTER_VERSION.
NC_FLUTTER_VERBOSEVerbose output for Flutter builds.
NC_FLUTTER_ANDROID_FLAVORCustom Gradle task to be built.
NC_FLUTTER_IOS_FLAVORCustom iOS scheme to be built.
NC_FLUTTER_ANDROID_BUILD_ARGSList of build arguments for Android. For example: -t lib/staging.dart --build-number=1.3
NC_FLUTTER_IOS_BUILD_ARGSList of build arguments for iOS. For example: -t lib/staging.dart --build-number=1.3

Updated about a year ago

Magic variables


Fine-tune your project's settings

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.