# Setting up the SDK

### **1. Add the OfferWall Unity plugin to your Unity project**

[Download](https://github.com/GreedyGame/unity-offer_wall_plugin/releases/latest) and import the latest version of OfferWall Unity Plugin from GitHub.

### **2. Configuring Publishing Settings**

* Set the minimum API level to 24 or above and the target API level to 33 or above under Edit/ProjectSettings/Player/Other Settings
* Make sure you check the below-mentioned checkboxes under Edit/ProjectSettings/Player/Publishing Settings.
  * **Custom Main Manifest**
  * **Custom Main Gradle Template**
  * **Custom Gradle Settings Template**

<figure><img src="https://2425324002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhi3J82Irfk38cjMHFvTF%2Fuploads%2FbhnbN0kpLWTXZNUiquh6%2FScreenshot%202024-05-09%20at%201.06.50%E2%80%AFPM.png?alt=media&#x26;token=7f02e2a1-5b1b-414d-8e71-90035f1e1801" alt=""><figcaption><p>Player > Publishing settings</p></figcaption></figure>

### **3. Configuring dependencies**

Adding `mavenCentral()` as a repository in `settingsTemplate.gradle`

```groovy
pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        **ARTIFACTORYREPOSITORY**
        google()
        mavenCentral() //<----------------Add this line
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}
```

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

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

### **4. Force resolve dependencies**

**Force resolve** forces the Package Manager to resolve the project’s packages, reinstalling any altered or missing package and removing extraneous packages.

To Force resolve the dependencies, Goto Assets > External Dependency Manager > Android Resolver > Force Resolve (if the resolver did not open automatically)

<figure><img src="https://pubscale.gitbook.io/~gitbook/image?url=https%3A%2F%2F3371507213-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FaUVG0uxfukyc5xCdlEhZ%252Fuploads%252FUzYUObvgE35BpwNoljLm%252Fimage.png%3Falt%3Dmedia%26token%3Dbd15261f-4718-4073-ae62-8839fe558896&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=c95a673969eca060eea708c9fdc31002608f810ed2f72bebef304fa7c837926b" alt=""><figcaption><p>Assets > External Dependency Manager > Android Resolver > Force Resolve</p></figcaption></figure>
