Use org.thebytearray.wireling:WireLing with google() and mavenCentral(). Pick a version from GitHub Releases or Maven Central.
Kotlin DSL (settings.gradle.kts / module build.gradle.kts):
repositories {
google()
mavenCentral()
}
dependencies {
implementation("org.thebytearray.wireling:WireLing:<version>")
}Groovy:
repositories {
google()
mavenCentral()
}
dependencies {
implementation 'org.thebytearray.wireling:WireLing:<version>'
}From a checkout of this repo:
// settings.gradle.kts
include(":app", ":wireling")
// app/build.gradle.kts
dependencies {
implementation(project(":wireling"))
}The wireling AAR merges:
- Permissions:
INTERNET,ACCESS_NETWORK_STATE,FOREGROUND_SERVICE,FOREGROUND_SERVICE_SPECIAL_USE,POST_NOTIFICATIONS - Service:
org.thebytearray.wireling.platform.TunnelService(not exported,specialUse+ propertyvpn)
The WireGuard Go backend VpnService comes from the wireguard-android dependency manifest; do not duplicate it in your app.
Your application still needs:
VpnServicepermission flow: useWireLingVpnhelpers andVpnService.prepare.- Notification channel:
WireLingVpn.createNotificationChannel(...)inApplication.onCreate(or before connect). - Notification icon:
WireLingVpn.setNotificationIcon(R.drawable....)beforestartVpnTunnel. - Optional:
POST_NOTIFICATIONSon API 33+:WireLingVpn.registerPostNotificationsLauncher/launchPostNotificationsRequest.
Next: Quick Start