📱Custom Adapter Integration
This document will guide you through an easy-to-follow process of adding Adster.Tech as your third-party ad network mediation partner for your mobile banner, interstitial, and rewarded ads.
Configuration Steps
Setting Up Repository in Project
Open your Android Studio project and navigate to
settings.gradle
fileAdd the following Maven repository configuration inside the dependencyResolutionManagement block
gradle
repositories {
...
maven {
url = uri("https://maven.pkg.github.com/adster-tech/orchestration-sdk")
credentials {
username = GITHUB_USERNAME
password = GITHUB_TOKEN
}
}
}
Replace GITHUB_USERNAME and GITHUB_TOKEN with your GitHub username and personal access token (create a classic token with read only access from your personal GitHub profile OR reach out to us to get an Adster token)
Adding Dependency
Open the
build.gradle
(Module: app) file.Find the dependencies block and add the following SDK dependency.
Authentication
It's crucial not to hardcode GitHub credentials. Store credentials in
gradle.properties
or use environment variables.In
gradle.properties
, addproperties GITHUB_USERNAME=username GITHUB_TOKEN=token
In
settings.gradle
, reference these properties:gradle username = findProperty("GITHUB_USERNAME") ?: System.getenv("GITHUB_USERNAME") password = findProperty("GITHUB_TOKEN") ?: System.getenv("GITHUB_TOKEN")
This approach enhances security by keeping credentials out of source control.
Last updated