diff --git a/.gitignore b/.gitignore
index 95d8806..39f80a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,9 @@
# Ignore Gradle build output directory
build
+# Ignore Gradle configuration file
+shared-debug.keystore
+
# The destination for the Go Android archive.
android/libs
android_legacy/libs
diff --git a/android/build.gradle b/android/build.gradle
index 8724029..507962a 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -30,6 +30,9 @@ apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.plugin.serialization'
apply plugin: 'com.ncorti.ktfmt.gradle'
+def keystoreProperties = new Properties()
+file("local.properties").withInputStream { keystoreProperties.load(it) }
+
android {
ndkVersion "23.1.7779620"
compileSdkVersion 34
@@ -60,6 +63,21 @@ android {
}
}
namespace 'com.tailscale.ipn'
+
+ signingConfigs {
+ debug {
+ if (keystoreProperties.containsKey('debugKeystoreFile') &&
+ keystoreProperties.containsKey('debugKeystorePassword') &&
+ keystoreProperties.containsKey('debugKeyAlias') &&
+ keystoreProperties.containsKey('debugKeyPassword')) {
+ // Use the debug signing config if all required properties are present
+ keyAlias keystoreProperties['debugKeyAlias']
+ keyPassword keystoreProperties['debugKeyPassword']
+ storeFile file(keystoreProperties['debugKeystoreFile'])
+ storePassword keystoreProperties['debugKeystorePassword']
+ }
+ }
+ }
}
dependencies {
diff --git a/android/gradle.properties b/android/gradle.properties
index eb5eece..bb36c2f 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -3,3 +3,4 @@ android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
+
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index baaac9c..18de985 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -80,6 +80,14 @@
+
+
+
+
+
+