# Prepare Environment

## **Import the SDK dependency**

To include Uqudo SDK in your project, you must first add our Maven repository to your build configuration. Below are the instructions for both Groovy (used in `build.gradle`) and Kotlin DSL (used in `build.gradle.kts`), ensuring compatibility with your preferred syntax for Gradle scripts.

**1- build.gradle** (Groovy):

```groovy
allprojects {
      repositories {
            maven { url "https://rm.dev.uqudo.io/repository/uqudo-public/" }
      } 
}
```

2- **build.gradle.kts** (Kotlin DSL):

```kts
allprojects {
    repositories {
        maven(url = "https://rm.dev.uqudo.io/repository/uqudo-public/")
    }
}
```

or in your:

1- **settings.gradle** (Groovy):

```groovy
dependencyResolutionManagement {
      repositories {
            maven { url "https://rm.dev.uqudo.io/repository/uqudo-public/" }
      } 
}
```

2- **settings.gradle.kts** (Kotlin DSL):

```kts
dependencyResolutionManagement { 
        repositories { 
                maven(url = "https://rm.dev.uqudo.io/repository/uqudo-public/")
         } 
  }
```

Add the following dependency in your application build.gradle. Please make sure the apk generation is split by platform to reduce the size of the apk or use the bundle build (preferred way) when you push your application to the store, Google Play Store will take care to split by platform:

1- **build.gradle** (Groovy):

```groovy
android {
      compileOptions {
            sourceCompatibility JavaVersion.VERSION_17 
            targetCompatibility JavaVersion.VERSION_17
      }
      splits {
            abi {
                  enable true
                  universalApk false
            }
      }
}
dependencies {
      implementation 'io.uqudo.sdk:Uqudo:3.7.0'
}
```

2-  **build.gradle.kts** (Kotlin DSL):

```kotlin
android {
    compileOptions {
        sourceCompatibility(JavaVersion.VERSION_17)
        targetCompatibility(JavaVersion.VERSION_17)
    }
    splits {
        abi {
            isEnable = true
            isUniversalApk = false
        }
    }
}

dependencies {
    implementation("io.uqudo.sdk:Uqudo:3.7.0")
}

```

\
**N.B.**: It is crucial to highlight a key configuration that must be present in the `buildTypes` within the `release` block, or within any other build flavor where the `minifyEnabled` property (formerly known as ProGuard) is activated. Ensure the inclusion of the following ProGuard configuration line:

```kotlin
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
```

## **Build using a custom endpoint**

**N.B.**: this is required only if your account is not associated to our default environment in Europe.

In order to build your application and tell the SDK to point to another environment you can simply configure the following string resource in your application strings.xml with the provided url:

```xml
<string name="uq_api_base_url">https://hostname</string>
```

**N.B.**: Don’t add any / after the hostname.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uqudo.com/docs/kyc/uqudo-sdk/integration/android/prepare-environment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
