# Setting up the SDK

#### 1. Add this to your settings.gradle file

{% tabs %}
{% tab title="Kotlin Script" %}

```kts
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        maven { url = uri("https://storage.googleapis.com/caterpillar-libs-bucket/") }
    }
} 
```

{% endtab %}

{% tab title="Groovy" %}

```groovy
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        maven { url "https://storage.googleapis.com/caterpillar-libs-bucket/" }
    }
}
```

{% endtab %}
{% endtabs %}

#### 2. Add this to your build.gradle file

Add the below line inside the **dependencies** block in your build.gradle file

{% tabs %}
{% tab title="Kotlin Script" %}

```kts
implementation('com.pubscale.sdkone:offerwall:1.0.5')
```

{% endtab %}

{% tab title="Groovy" %}

```groovy
implementation 'com.pubscale.sdkone:offerwall:1.0.5'
```

{% endtab %}
{% endtabs %}

#### 3. Clean build and Rebuild the project

#### 4. Configure proguard rules

For the SDK to work properly in release(obfuscated/minified) builds, add the following rules in your proguard-rules.pro file.

{% code title="proguard-rules.pro" %}

```properties
-keep class com.pubscale.sdkone.offerwall.** {*;}
#Supporting R8 full mode
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response

```

{% endcode %}

We have added the SDK to the project. Learn how to initialize the SDK in the next step

#### 5. Add native module files

Add the following files to your android app's module directory.

* [PubscaleOfferwallSdkModule.java](https://storage.googleapis.com/pubscale-offerwall/lib/PubscaleOfferwallSdkModule.java)
* [PubscaleOfferwallSdkPackage.java](https://pubscale.gitbook.io/offerwall-sdk/v1.0.5/welcome-to-pubscale-offerwall-sdk)

#### 6. Link the module

Add the following line inside the getPackages() method of MainApplication class.

`packages.add(new PubscaleOfferwallSdkPackage());`

<figure><img src="https://3371507213-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaUVG0uxfukyc5xCdlEhZ%2Fuploads%2FhAoOorjF5xpSyNG1TNBI%2Fimage.png?alt=media&#x26;token=1ce48a96-eb20-41f5-94bc-0071af1b05e9" alt=""><figcaption><p>Adding PubscaleOfferwallSdkPackage to React packages</p></figcaption></figure>

We have setup the SDK in the project. Learn how to initialize the SDK in the next step


---

# 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://pubscale.gitbook.io/offerwall-sdk/v1.0.5/react-native/setting-up-the-sdk.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.
