Docs

How to Add a Package with Gradle

Add the Grovs SDK dependency to your Android project using Gradle.

Gradle is the build system for Android projects, making it easy to manage dependencies. Follow these steps to add the Grovs SDK to your project.

1

Open your Android project

Launch Android Studio and open your Android project.

2

Open app/build.gradle

Navigate to your app module's build.gradle file, typically located at app/build.gradle. Open it in the editor.

3

Add the Grovs dependency

Inside the dependencies block, add the Grovs SDK:

Groovy
dependencies {
    // Other dependencies
    implementation("io.grovs:Grovs:1.0.1")
}

Check the Grovs documentation for the latest version number.

4

Sync Gradle files

Android Studio will prompt you to sync the project. Click Sync Now in the notification banner.

Alternatively, click the Sync Project with Gradle Files icon in the toolbar.

5

Verify in External Libraries

Once the sync completes, Gradle will download the Grovs SDK and its dependencies.

Verify the installation by checking the External Libraries section in the Project view. The Grovs package should be listed.

6

Import in your code

Import the Grovs SDK in your source files:

Kotlin
import io.grovs.Grovs