From 8034ccf037ac60f15ea8078f085c640660afed98 Mon Sep 17 00:00:00 2001 From: John Rosendahl Date: Tue, 3 Nov 2026 13:15:49 -0700 Subject: [PATCH] Update the README install and requirements sections Add a Requirements section (minSdk 23, compileSdk 34 and AGP 8.1.1 from the SDK's AndroidX dependencies, JDK 17, Kotlin 2.0, and the INTERNET permission, which the SDK doesn't declare). Show the JitPack repository in settings.gradle's dependencyResolutionManagement, fence Groovy as groovy with Kotlin DSL equivalents, and pin the dependency to v1.2.0. Replace the jitci badge, which shows a failure, with the JitPack release badge. Use na.edge.optable.co in the config example. Fix the demo section: the demos use tenant prebidtest and slug android-sdk, include a Prebid integration, and build the SDK from source unless useReleaseSdk=true. Co-Authored-By: Claude Opus 5.5 --- README.md | 70 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 2590d19..04e1c8d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -# Optable Android SDK [![](https://jitci.com/gh/Optable/optable-android-sdk/svg)](https://jitci.com/gh/Optable/optable-android-sdk) +# Optable Android SDK [![JitPack](https://jitpack.io/v/Optable/optable-android-sdk.svg)](https://jitpack.io/#Optable/optable-android-sdk) Kotlin SDK for integrating with an [Optable Data Connectivity Node (DCN)](https://docs.optable.co) from an Android application. ## Contents +- [Requirements](#requirements) - [Installing](#installing) - [Using](#using) - [Identify API](#identify-api) @@ -17,31 +18,66 @@ application. - [Demo Applications](#demo-applications) - [Building](#building) +## Requirements + +- Android 6.0 (API level 23) or later: the SDK's `minSdk` is 23. +- `compileSdk` 34 or later and Android Gradle Plugin 8.1.1 or later, as required by the SDK's AndroidX dependencies. +- JDK 17 or later to build your app: the SDK is compiled to Java 17 bytecode. +- Kotlin apps: Kotlin 2.0 or later, since the SDK's dependencies bring in `kotlin-stdlib` 2.1. +- The `android.permission.INTERNET` permission in your app's `AndroidManifest.xml`. The SDK doesn't declare it, so + your app must: + +```xml + +``` + ## Installing This SDK is published using [JitPack](https://jitpack.io/), so you need to add the repository to your application build. -Add the following in your root `build.gradle` at the end of `repositories`: +Add it to the `dependencyResolutionManagement` block of your `settings.gradle`: + +```groovy +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + maven { url 'https://jitpack.io' } + } +} +``` + +Or, in `settings.gradle.kts`: ```kotlin -allprojects { +dependencyResolutionManagement { repositories { - ... - maven { - url 'https://jitpack.io' - } + google() + mavenCentral() + maven("https://jitpack.io") } } ``` +Projects that still declare repositories in the root `build.gradle` can add the same `maven` line to +`allprojects { repositories { ... } }` instead. + Then add the dependency to the SDK in your app `build.gradle`: +```groovy +dependencies { + implementation 'com.github.Optable:optable-android-sdk:v1.2.0' +} +``` + +Or, in `build.gradle.kts`: + ```kotlin dependencies { - implementation 'com.github.Optable:optable-android-sdk:VERSION_TAG' + implementation("com.github.Optable:optable-android-sdk:v1.2.0") } ``` -Replace `VERSION_TAG` with the latest or desired [SDK release](https://github.com/Optable/optable-android-sdk/releases). +Replace `v1.2.0` with the latest or desired [SDK release](https://github.com/Optable/optable-android-sdk/releases). ## Using @@ -112,7 +148,7 @@ val config = OptableConfig( providedContext = this, tenant = "prebidtest", originSlug = "js-sdk", - host = "ca.edge.optable.co", + host = "na.edge.optable.co", path = "v2", insecure = false, apiKey = API_KEY, @@ -702,17 +738,19 @@ The Kotlin and Java demo applications show a working example of the APIs, as wel an integration with the [Google Ad Manager](https://admanager.google.com/home/) ad server, enabling the targeting of ads served by GAM to audiences activated in the [Optable](https://optable.co/) DCN. -By default, the demo applications will connect to the [Optable](https://optable.co/) demo DCN at `sandbox.optable.co`and -reference application slug `android-sdk-demo`. The demo apps depend on -the [GAM Mobile Ads SDK for Android](https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start) and -load ads from a GAM account operated by [Optable](https://optable.co/). +The demo applications connect to an [Optable](https://optable.co/) demo DCN, tenant `prebidtest`, with the source +slug `android-sdk`. They also show an integration with the +[Prebid Mobile SDK](https://docs.prebid.org/prebid-mobile/pbm-api/android/code-integration-android.html). The demo apps +depend on the [GAM Mobile Ads SDK for Android](https://developers.google.com/ad-manager/mobile-ads-sdk/android/quick-start) +and load ads from a GAM account operated by [Optable](https://optable.co/). ### Building To build the Kotlin demo app, from [Android Studio](https://developer.android.com/studio), navigate to `File > Open` and open the `DemoApp/DemoAppKotlin` directory. To build the Java demo app, open the `DemoApp/DemoAppJava` directory. In -both cases, you should be able to build and run the resulting project directly, since it will automatically download the -`co.optable.android_sdk` library from the [JitPack](https://jitpack.io/) Maven repository. +both cases, you should be able to build and run the resulting project directly. By default, the demo apps build the SDK +from the source in this repository (`useReleaseSdk=false` in the demo's `gradle.properties`). Set `useReleaseSdk=true` to +use a published release from [JitPack](https://jitpack.io/) instead. ### Development