Installation should take less than 5 minutes. You will need to make changes to build.gradle and to have admin access to your Jenkins server. Once installed the Gradle plugin will upload a build's APK file to NimbleApp for profiling, and show results in console output.
build.gradle
plugins {
id "com.nimbledroid.profiler" version "1.2.3"
}
The NimbleApp plugin will automatically be downloaded as a dependency from plugins.gradle.org. This syntax works for Gradle 2.1 and up. For older versions, see https://plugins.gradle.org/plugin/com.nimbledroid.profiler
build.gradle
// config for NimbleDroid Gradle plugin
nimbledroid {
apiKey "replace with statement to access key variable"
}
Most company security policies forbid adding credentials directly to build.gradle. You should set an API key variable elsewhere, this could be in the gradle.properties file, an environment variable, or wherever you securely store credentials.
Replace the instruction string with a reference to that variable.
By default the plugin looks for the APK generated by the release variant. You can change the target variant:
nimbledroid {
variant "dev"
You can also specify an actual filename. For filenames without paths we look in [root project dir]/app/build/outputs/apk/. You can also specify an absolute path or a path relative to the project directory.
nimbledroid {
//this will look in
//[root project dir]/app/build/outputs/apk/
apkFilename "app-release.apk"
nimbledroid {
//this will look in [root project dir]/relative/path/to/
apkFilename "relative/path/to/app-release.apk"
nimbledroid {
//this will use an absolute path
apkFilename "/absolute/path/to/app-release.apk"
For instructions on using Espresso to create Scenarios for custom user flows visit http://docs.nimbledroid.com
To upload your test APK, you must specify the filename. For filenames without paths we look in [root project dir]/app/build/outputs/apk/. You can also specify an absolute path or a path relative to the project directory.
nimbledroid {
//this will look in
//[root project dir]/app/build/outputs/apk/
testApkFilename "app-dbg-androidTest.apk"
nimbledroid {
//this will look in [root project dir]/relative/path/to/
testApkFilename "relative/path/to/app-dbg-androidTest.apk"
nimbledroid {
//this will use an absolute path
testApkFilename "/absolute/path/to/app-dbg-androidTest.apk"
By default the plugin will look to see if your build variant has minifyEnabled set to true. If it is, it will attempt to include the ProGuard mapping file as part of the upload process. You can disable this behavior:
nimbledroid {
mappingUpload false
You can also specify an actual filename. For filenames without paths we look in [root project dir]/app/build/outputs/mapping/release/. You can also specify an absolute path or a path relative to the project directory.
nimbledroid {
//this will look in
//[root project dir]/app/build/outputs/mapping/release/
mappingFilename "mapping.txt"
nimbledroid {
//this will look in [root project dir]/relative/path/to/
mappingFilename "relative/path/to/mapping.txt"
nimbledroid {
//this will use an absolute path
mappingFilename "/absolute/path/to/mapping.txt"
You can pass username and password and we will attempt to login to your app when we profile. This will allow us to profile the activity an authenticated user sees.
nimbledroid {
appData {
username "testuser"
password "123"
}
Instead of using our default label in the UI for each upload, you can choose your own identifying string for each upload.
nimbledroid {
uploadLabel "$committer $branch"
By default we profile your APK on Android KitKat. You can profile on Android 4 KitKat, Android 5 Lollipop or Android 6 Marshmallow, or All.
nimbledroid {
deviceConfig "android4", "android5", "android6"
The tasks must be added after the step that produces your APK. For example:
clean assembleRelease ndUpload ndGetProfile
ndUpload will upload the APK file we find (see step 1 for how to customize which APK). ndGetProfile will poll our service until the profile is ready.
After the ndUpload task completes, it will be a few minutes before the profile is ready. You can run other tasks like tests in between ndUpload and ndGetProfile.
In order to correctly compare builds against each other, we recommend adding branch and flavor tags with each upload. To do this, add these params to your Tasks section:
-Pbranch=branchname -Pflavor=flavorname
Next time a Jenkins build is triggered, you will see performance profiling information in the console output.
Installation should take less than 5 minutes. You will need to make changes to build.gradle.kts and to have admin access to your Jenkins server. Once installed the Gradle plugin will upload a build's APK file to NimbleApp for profiling, and show results in console output.
build.gradle.kts
plugins {
id("com.nimbledroid.profiler") version "1.2.3"
}
The NimbleApp plugin will automatically be downloaded as a dependency from plugins.gradle.org. This syntax works for Gradle 2.1 and up. For older versions, see https://plugins.gradle.org/plugin/com.nimbledroid.profiler
build.gradle.kts
// config for NimbleDroid Gradle plugin
nimbledroid {
apiKey = "replace with statement to access key variable"
}
Most company security policies forbid adding credentials directly to build.gradle.kts. You should set an API key variable elsewhere, this could be in the gradle.properties file, an environment variable, or wherever you securely store credentials.
Replace the instruction string with a reference to that variable.
By default the plugin looks for the APK generated by the release variant. You can change the target variant:
nimbledroid {
variant = "dev"
You can also specify an actual filename. For filenames without paths we look in [root project dir]/app/build/outputs/apk/. You can also specify an absolute path or a path relative to the project directory.
nimbledroid {
//this will look in
//[root project dir]/app/build/outputs/apk/
apkFilename = "app-release.apk"
nimbledroid {
//this will look in [root project dir]/relative/path/to/
apkFilename = "relative/path/to/app-release.apk"
nimbledroid {
//this will use an absolute path
apkFilename = "/absolute/path/to/app-release.apk"
For instructions on using Espresso to create Scenarios for custom user flows visit http://docs.nimbledroid.com
To upload your test APK, you must specify the filename. For filenames without paths we look in [root project dir]/app/build/outputs/apk/. You can also specify an absolute path or a path relative to the project directory.
nimbledroid {
//this will look in
//[root project dir]/app/build/outputs/apk/
testApkFilename = "app-androidTest.apk"
nimbledroid {
//this will look in [root project dir]/relative/path/to/
testApkFilename = "relative/path/to/app-androidTest.apk"
nimbledroid {
//this will use an absolute path
testApkFilename = "/absolute/path/to/app-androidTest.apk"
By default the plugin will look to see if your build variant has minifyEnabled set to true. If it is, it will attempt to include the ProGuard mapping file as part of the upload process. You can disable this behavior:
nimbledroid {
mappingUpload = false
You can also specify an actual filename. For filenames without paths we look in [root project dir]/app/build/outputs/mapping/release/. You can also specify an absolute path or a path relative to the project directory.
nimbledroid {
//this will look in
//[root project dir]/app/build/outputs/mapping/release/
mappingFilename = "mapping.txt"
nimbledroid {
//this will look in [root project dir]/relative/path/to/
mappingFilename = "relative/path/to/mapping.txt"
nimbledroid {
//this will use an absolute path
mappingFilename = "/absolute/path/to/mapping.txt"
You can pass username and password and we will attempt to login to your app when we profile. This will allow us to profile the activity an authenticated user sees.
nimbledroid {
appData {
username = "testuser"
password = "123"
}
Instead of using our default label in the UI for each upload, you can choose your own identifying string for each upload.
nimbledroid {
uploadLabel = "$committer $branch"
By default we profile your APK on Android KitKat. You can profile on Android 4 KitKat, Android 5 Lollipop or Android 6 Marshmallow, or All.
nimbledroid {
deviceConfig("android4", "android5", "android6")
The tasks must be added after the step that produces your APK. For example:
clean assembleRelease ndUpload ndGetProfile
ndUpload will upload the APK file we find (see step 1 for how to customize which APK). ndGetProfile will poll our service until the profile is ready.
After the ndUpload task completes, it will be a few minutes before the profile is ready. You can run other tasks like tests in between ndUpload and ndGetProfile.
In order to correctly compare builds against each other, we recommend adding branch and flavor tags with each upload. To do this, add these params to your Tasks section:
-Pbranch=branchname -Pflavor=flavorname
Next time a Jenkins build is triggered, you will see performance profiling information in the console output.
The APK is only used to generate profiling information which is accessible only to your account. Once profiling is completed, we delete your APK.
Yes! As long as it can integrate with Gradle for builds, the steps should be similar. We plan to add detailed instructions for other CI servers to this page.
This website or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in the Cookie Policy.
To find out more about the categories of personal information collected and the purposes for which such information will be used, please refer to our Privacy Policy.
By accepting, you consent to be bound by NimbleDroid’s terms and conditions, and you consent to the use of cookies and the processing of your personal data in accordance with company policy. If you do not accept, NimbleDroid shall not process your personal data for any purpose during your use of the services.