authgear / authgear/authgear-sdk-android

Publish the OkHttp interceptor module (sdk-okhttp) to Maven Central alongside android-sdk 3.0.0

Open
#233 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
3
Forks
15
Avg merge
4h 43m
Merged PRs (30d)
2

Description

## Summary

Since `3.0.0`, the base SDK is published to **Maven Central** as `com.authgear:android-sdk:3.0.0`, but the **OkHttp interceptor module (`sdk-okhttp`) is not published there**. There's currently no Maven Central coordinate a developer can add to get `AuthgearInterceptor` alongside the Maven Central base SDK.

## Evidence

Base SDK is on Maven Central; the interceptor is not:

```
com.authgear:android-sdk -> HTTP 200 (repo1.maven.org)
com.authgear:android-sdk-okhttp -> HTTP 404
com.authgear:authgear-sdk-android-okhttp -> HTTP 404
```

In the source at tag `3.0.0`:

- `sdk/build.gradle.kts` uses the Vanniktech plugin with `publishToMavenCentral()` and `coordinates("com.authgear", "android-sdk", …)` → publishes to Central. ✅
- `sdk-okhttp/build.gradle.kts` uses only `id("maven-publish")` with `artifactId = "authgear-sdk-android-okhttp"` (no `publishToMavenCentral()` / Vanniktech config) → **not** published to Maven Central.

So the interceptor (`com.oursky.authgear.okhttp.AuthgearInterceptor`) has no Central release to pair with `android-sdk:3.0.0`.

## Impact

- The docs page [OkHttp interceptor extension](https://docs.authgear.com/get-started/native-mobile-app/android/okhttp-interceptor-extension) can't give a working Maven Central dependency line. (I updated the main Android SDK page to Maven Central in authgear/docs#47, but intentionally left the OkHttp page alone because there's no coordinate to document yet.)
- Developers who follow the (now Maven Central) base SDK setup and then want the OkHttp interceptor have no clean, consistent way to add it.

## Suggested fix

Publish `sdk-okhttp` to Maven Central with the same tooling/versioning as the base module — e.g. `com.authgear:android-sdk-okhttp:3.0.0` (Vanniktech `publishToMavenCentral()` + matching `coordinates(...)` and version), so the two artifacts stay in lockstep. Then the docs page can document the dependency.

## Related (minor, separate)

The OkHttp doc's code sample mixes Java/Kotlin syntax (`new OkHttpClient.Builder()....addInterceptor(AuthgearInterceptor(authgear))`) and reads as incomplete — worth a small docs cleanup once the coordinate exists.

---

Context: found while modernizing the [authgear-example-android](https://github.com/authgear/authgear-example-android) sample (PR #5) and reconciling the Android docs.

Contributor guide

Open the contributing guide

Research direction

Start with sdk-okhttp/build.gradle.kts and compare its maven-publish setup with sdk/build.gradle.kts, which uses the Vanniktech plugin and publishes com.authgear:android-sdk. Configure the interceptor module to publish as com.authgear:android-sdk-okhttp with the matching 3.0.0 version, then verify the Maven Central publication and coordinate alongside the base SDK.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
build-system, release
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.