Integrating Specto using Gradle
Specto supports integration using Gradle versions 5.4.1 to 7.0, and Android Gradle Plugin versions 3.5.0 to 4.1.1.
Add the Gradle plugin
Specto uses a Gradle plugin to upload application metadata (application ID, version, etc.) to our service. If your builds are minified, the plugin will also upload the ProGuard mapping file so that we can deobfuscate function names. To add the Gradle plugin to your project:
- Open your application module's
build.gradle
- Add the
dev.specto.android.gradle
plugin:
plugins {
id 'com.android.application'
id 'dev.specto.android.gradle' version '1.1.0'
}


Adding the Specto plugin to your application module's build.gradle (steps 1-2)
Add the library
- Open the
build.gradle
for each module that you want to collect performance data from - Add
dev.specto:specto-android-core
as a dependency:
dependencies {
// β¦
implementation 'dev.specto:specto-android-core:1.1.0'
}


Adding the Specto library as a dependency in build.gradle (steps 1-2)
Set the API key
- Copy the API key that was automatically created upon sign up or create a new API key from the dashboard
- Open your application's
AndroidManifest.xml
- Add the API key as meta-data inside the
application
element of the manifest:
<manifest β¦>
<application β¦>
<!-- β¦ -->
<meta-data
android:name="dev.specto.API_KEY"
android:value="<YOUR_API_KEY>" />
</application>
</manifest>


Setting the Specto API key in AndroidManifest.xml (steps 2-3)
Updated about 1 year ago