Skip to content

Commit

Permalink
AmneziaWG release (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
albexk authored Mar 16, 2024
1 parent d6f973d commit 1f748dc
Show file tree
Hide file tree
Showing 180 changed files with 2,691 additions and 5,194 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/.gradle/
/.idea/*.xml
/.idea/caches/
/.idea/dictionaries/
/.idea/libraries/
/captures/
/local.properties
.DS_Store
.cxx/
Thumbs.db
build/
*.apk
*.class
*.dex
*.iml
*.jks
gradlew.bat
maint/
35 changes: 5 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,15 @@
# Android GUI for [WireGuard](https://www.wireguard.com/)
# Android GUI for [AmneziaWG](https://amnezia.org/learn-more/31_amneziawg)

**[Download from the Play Store](https://play.google.com/store/apps/details?id=com.wireguard.android)**
**[Download from the Play Store](https://play.google.com/store/apps/details?id=org.amnezia.awg)**

This is an Android GUI for [WireGuard](https://www.wireguard.com/). It [opportunistically uses the kernel implementation](https://git.zx2c4.com/android_kernel_wireguard/about/), and falls back to using the non-root [userspace implementation](https://git.zx2c4.com/wireguard-go/about/).
This is an Android GUI for [AmneziaWG](https://amnezia.org/learn-more/31_amneziawg).

## Building

```
$ git clone --recurse-submodules https://git.zx2c4.com/wireguard-android
$ cd wireguard-android
$ git clone --recurse-submodules https://github.com/amnezia-vpn/amneziawg-android
$ cd amneziawg-android
$ ./gradlew assembleRelease
```

macOS users may need [flock(1)](https://github.com/discoteq/flock).

## Embedding

The tunnel library is [on Maven Central](https://search.maven.org/artifact/com.wireguard.android/tunnel), alongside [extensive class library documentation](https://javadoc.io/doc/com.wireguard.android/tunnel).

```
implementation 'com.wireguard.android:tunnel:$wireguardTunnelVersion'
```

The library makes use of Java 8 features, so be sure to support those in your gradle configuration with [desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring):

```
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled = true
}
dependencies {
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.3"
}
```

## Translating

Please help us translate the app into several languages on [our translation platform](https://crowdin.com/project/WireGuard).
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
amneziawgVersionCode=1
amneziawgVersionName=1.0.0
amneziawgPackageName=org.amnezia.vpn
amneziawgVersionCode=3
amneziawgVersionName=1.1.0
amneziawgPackageName=org.amnezia.awg

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down
22 changes: 11 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[versions]
agp = "8.2.0"
agp = "8.3.0"
kotlin = "1.9.20"

[libraries]
androidx-activity-ktx = "androidx.activity:activity-ktx:1.7.2"
androidx-annotation = "androidx.annotation:annotation:1.6.0"
androidx-activity-ktx = "androidx.activity:activity-ktx:1.8.2"
androidx-annotation = "androidx.annotation:annotation:1.7.1"
androidx-appcompat = "androidx.appcompat:appcompat:1.6.1"
androidx-biometric = "androidx.biometric:biometric:1.1.0"
androidx-collection = "androidx.collection:collection:1.2.0"
androidx-collection = "androidx.collection:collection:1.4.0"
androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4"
androidx-coordinatorlayout = "androidx.coordinatorlayout:coordinatorlayout:1.2.0"
androidx-core-ktx = "androidx.core:core-ktx:1.10.1"
androidx-core-ktx = "androidx.core:core-ktx:1.12.0"
androidx-datastore-preferences = "androidx.datastore:datastore-preferences:1.0.0"
androidx-fragment-ktx = "androidx.fragment:fragment-ktx:1.5.7"
androidx-lifecycle-runtime-ktx = "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
androidx-preference-ktx = "androidx.preference:preference-ktx:1.2.0"
desugarJdkLibs = "com.android.tools:desugar_jdk_libs:2.0.3"
google-material = "com.google.android.material:material:1.9.0"
androidx-fragment-ktx = "androidx.fragment:fragment-ktx:1.6.2"
androidx-lifecycle-runtime-ktx = "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0"
androidx-preference-ktx = "androidx.preference:preference-ktx:1.2.1"
desugarJdkLibs = "com.android.tools:desugar_jdk_libs:2.0.4"
google-material = "com.google.android.material:material:1.11.0"
jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
junit = "junit:junit:4.13.2"
kotlinx-coroutines-android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.0"
kotlinx-coroutines-android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
zxing-android-embedded = "com.journeyapps:zxing-android-embedded:4.3.0"

[plugins]
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencyResolutionManagement {
}

plugins {
id("com.android.settings") version "8.2.0"
id("com.android.settings") version "8.3.0"
}

rootProject.name = "amneziawg-android"
Expand Down
4 changes: 0 additions & 4 deletions sync-crowdin.sh

This file was deleted.

69 changes: 3 additions & 66 deletions tunnel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent

val pkg: String = providers.gradleProperty("amneziawgPackageName").get()
val cmakeAndroidPackageName: String = providers.environmentVariable("ANDROID_PACKAGE_NAME").getOrElse(pkg)

plugins {
alias(libs.plugins.android.library)
`maven-publish`
signing
}

android {
Expand Down Expand Up @@ -36,14 +35,14 @@ android {
release {
externalNativeBuild {
cmake {
arguments("-DANDROID_PACKAGE_NAME=${pkg}")
arguments("-DANDROID_PACKAGE_NAME=${cmakeAndroidPackageName}")
}
}
}
debug {
externalNativeBuild {
cmake {
arguments("-DANDROID_PACKAGE_NAME=${pkg}.debug")
arguments("-DANDROID_PACKAGE_NAME=${cmakeAndroidPackageName}.debug")
}
}
}
Expand All @@ -52,12 +51,6 @@ android {
disable += "LongLogTag"
disable += "NewApi"
}
publishing {
singleVariant("release") {
withJavadocJar()
withSourcesJar()
}
}
}

dependencies {
Expand All @@ -66,59 +59,3 @@ dependencies {
compileOnly(libs.jsr305)
testImplementation(libs.junit)
}

publishing {
publications {
register<MavenPublication>("release") {
groupId = pkg
artifactId = "tunnel"
version = providers.gradleProperty("amneziawgVersionName").get()
afterEvaluate {
from(components["release"])
}
pom {
name.set("WireGuard Tunnel Library")
description.set("Embeddable tunnel library for WireGuard for Android")
url.set("https://www.wireguard.com/")

licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
scm {
connection.set("scm:git:https://git.zx2c4.com/wireguard-android")
developerConnection.set("scm:git:https://git.zx2c4.com/wireguard-android")
url.set("https://git.zx2c4.com/wireguard-android")
}
developers {
organization {
name.set("WireGuard")
url.set("https://www.wireguard.com/")
}
developer {
name.set("WireGuard")
email.set("[email protected]")
}
}
}
}
}
repositories {
maven {
name = "sonatype"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = providers.environmentVariable("SONATYPE_USER").orNull
password = providers.environmentVariable("SONATYPE_PASSWORD").orNull
}
}
}
}

signing {
useGpgCmd()
sign(publishing.publications)
}
2 changes: 1 addition & 1 deletion tunnel/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<application>
<service
android:name="com.wireguard.android.backend.GoBackend$VpnService"
android:name="org.amnezia.awg.backend.GoBackend$VpnService"
android:permission="android.permission.BIND_VPN_SERVICE"
android:exported="false">
<intent-filter>
Expand Down
Loading

0 comments on commit 1f748dc

Please sign in to comment.