---
page_title: Installing Assets Plugin
product: UPI TPAP SDK
platform: Android
page_source: https://juspay.io/in/docs/upi-tpap-sdk/android/getting-the-sdk/adding-plugin
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/upi-tpap-sdk/llms.txt
---


## Installing Assets Plugin



UPI In-app SDK depends on certain assets to function. These are available over the air and are supposed to be present while building the SDK. The Assets Plugin is a build time dependency that downloads all required assets and ensures the availability of the latest assets at build time.

To install Assets Plugin follow the below steps:


### Step 1 Add Assets Plugin maven url


The maven URL specifies from where the assets plugin should be downloaded. This is supposed to present inside the `buildscript` of your application



#### Code Snippets: -

#### Java Code Snippet:

```java
maven {
            url "https://maven.juspay.in/jp-build-packages/hyper-sdk/"
        }
```

#### Kotlin Code Snippet:

```kotlin
maven {
            url "https://maven.juspay.in/jp-build-packages/hyper-sdk/"
        }
```



### Step 2 Add Assets plugin classpath


Adding classpath to buildscript dependencies helps build tool load the assets plugin. This also resides inside `buildscript`.



#### Code Snippets: -

#### Java Code Snippet:

```java
classpath 'in.juspay:hypersdk.plugin:2.0.6'
```

#### Kotlin Code Snippet:

```kotlin
classpath 'in.juspay:hypersdk.plugin:2.0.6'
```



### Step 3 Apply Assets plugin


This step will ensure that assets plugin is used as a plugin inside your application build cycle. Ensure you apply the plugin inside your `app/build.gradle`



#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"Failed to fetch snippet"}
```

#### Kotlin Code Snippet:

```kotlin
id 'hypersdk.plugin'
```



### Step 4 Add settings.gradle(optional)


This ensures that gradle can locate and configure modules to include in the build during the build process. Specify these plugin & dependency management configurations in `settings.gradle`



#### Code Snippets: -

#### Java Code Snippet:

```java
pluginManagement {
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.juspay.in/jp-build-packages/hyper-sdk/" }
    }
}

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.juspay.in/jp-build-packages/hyper-sdk/" }
    }
}

rootProject.name = "YourProjectName"
include ':app'
```

#### Kotlin Code Snippet:

```kotlin
pluginManagement {
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.juspay.in/jp-build-packages/hyper-sdk/" }
    }
}

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.juspay.in/jp-build-packages/hyper-sdk/" }
    }
}

rootProject.name = "YourProjectName"
include ':app'
```



###   Plugin version


> **Note**
> Minimum supported Android Gradle Plugin version is 3.6.0. Please get in touch with your Juspay POC or the Support Team if you are on an older version.





---

## Complete Code Reference

The following code files are referenced in the steps above:

### build.gradle

```
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        mavenCentral()
        // block:start:assets-plugin-maven-url
        maven {
            url "https://maven.juspay.in/jp-build-packages/hyper-sdk/"
        }
        // block:end:assets-plugin-maven-url
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.0"
 
        // block:start:assets-class-path
        classpath 'in.juspay:hypersdk.plugin:2.0.6'
        // block:end:assets-class-path

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        // block:start:hyper-sdk-maven-url
        maven {
            url "https://maven.juspay.in/jp-build-packages/hyper-sdk/"
        }
        // block:end:hyper-sdk-maven-url
    }
}


task clean(type: Delete) {
    delete rootProject.buildDir
}
```

### build.gradle

```
plugins {
    id 'com.android.application'
    
    // block:start:asset-plugin

    id 'hypersdk.plugin'

    //block:end:asset-plugin
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "in.juspay.devtools"
        minSdk 21
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

// block:start:add-sdk-implementation

hyperSdkPlugin {
    clientId = "<client_id>" // shared by Juspay Team
    sdkVersion = "2.2.6"
}

// block:end:add-sdk-implementation

dependencies {

    // block:start:add-shimmer

    implementation('com.facebook.shimmer:shimmer:0.5.0')

    // block:end:add-shimmer

    // block:start:scanner-sdk

    implementation "com.google.mlkit:barcode-scanning:17.3.0"
    implementation "androidx.camera:camera-core:1.4.2"
    implementation "androidx.camera:camera-camera2:1.4.2"
    implementation "androidx.camera:camera-lifecycle:1.4.2"
    implementation "androidx.camera:camera-view:1.4.2"

    //block:start:add-biometric-manager-dependency

    implementation "androidx.biometric:biometric:1.1.0"
    
    //block:end:add-biometric-manager-dependency

    // block:end:scanner-sdk

   // block:start:add-secure-component

    implementation'in.juspay:secure-component-uat:4.1.8'

    // block:end:add-secure-component

    // block:start:add-secure-component-prod

    implementation "in.juspay:secure-component-prod:4.1.8" 

    // block:end:add-secure-component-prod

}
```

### settings.gradle

```
// block:start:settings-plugin
pluginManagement {
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.juspay.in/jp-build-packages/hyper-sdk/" }
    }
}

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.juspay.in/jp-build-packages/hyper-sdk/" }
    }
}

rootProject.name = "YourProjectName"
include ':app'
// block:end:settings-plugin
```


---

## See Also

- [Installing the SDK](https://juspay.io/in/docs/upi-tpap-sdk/android/getting-the-sdk/getting-sdk)
- [Initiating the SDK](https://juspay.io/in/docs/upi-tpap-sdk/android/interaction-with-sdk/initiating-the-sdk)
