From 5429177ac13f63a441ee8b236e93696be239373f Mon Sep 17 00:00:00 2001 From: Vadym Date: Mon, 19 Apr 2021 10:52:46 +0300 Subject: [PATCH 1/9] 1. Kotlin version upgrade --- build.gradle | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index e1620ae..9d7d920 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.10' + ext.kotlin_version = '1.4.32' repositories { google() mavenCentral() - jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.android.tools.build:gradle:4.2.0-rc01' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -18,7 +17,6 @@ buildscript { allprojects { repositories { google() - jcenter() } } From ab6c28e5d1da6c42d8d4d3d8d09ce7e394a0ffad Mon Sep 17 00:00:00 2001 From: Vadym Date: Mon, 19 Apr 2021 10:57:07 +0300 Subject: [PATCH 2/9] 1. preparation for next release --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 39eebd9..1f7c3f7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip From 27791e3a9c9ddddcefbe53a40a4a34d1511862a8 Mon Sep 17 00:00:00 2001 From: Vadym Date: Mon, 19 Apr 2021 10:58:51 +0300 Subject: [PATCH 3/9] 1. preparation for next release --- build.gradle | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 7c95eb1..9d7d920 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.10' + ext.kotlin_version = '1.4.32' repositories { google() mavenCentral() - jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:4.2.0-rc01' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -18,7 +17,6 @@ buildscript { allprojects { repositories { google() - jcenter() } } From 5e3bc2f09fdab6f794ca1ffe975515fee191d06d Mon Sep 17 00:00:00 2001 From: vadym Date: Tue, 11 May 2021 12:16:36 +0300 Subject: [PATCH 4/9] 1. kotlin upgrade preparation --- app/build.gradle | 13 ++++++++----- build.gradle | 10 ++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 173378b..1725001 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,5 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 29 @@ -8,8 +7,8 @@ android { applicationId "io.github.chronosx88.yggdrasil" minSdkVersion 15 targetSdkVersion 29 - versionCode 18 - versionName "1.7" + versionCode 19 + versionName "1.8" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" setProperty("archivesBaseName", project.getParent().name+"-"+versionName) } @@ -46,6 +45,10 @@ android { exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' } + buildFeatures { + viewBinding true + } + } task ndkBuild(type: Exec) { @@ -67,8 +70,8 @@ dependencies { implementation "androidx.preference:preference-ktx:1.1.1" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7' - implementation 'com.google.android.material:material:1.3.0-alpha04' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8' + implementation 'com.google.android.material:material:1.4.0-beta01' implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.hbb20:ccp:2.4.0' implementation 'com.vincentbrison.openlibraries.android:dualcache:3.1.1' diff --git a/build.gradle b/build.gradle index 9d7d920..e460cbc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,14 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. - buildscript { - ext.kotlin_version = '1.4.32' + ext.kotlin_version = "1.5.0" repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.0-rc01' + classpath "com.android.tools.build:gradle:4.2.0" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -17,9 +17,11 @@ buildscript { allprojects { repositories { google() + mavenCentral() + jcenter() // Warning: this repository is going to shut down soon } } task clean(type: Delete) { delete rootProject.buildDir -} +} \ No newline at end of file From aaa69884354b97a041f17cd8a5e1176693fc73c9 Mon Sep 17 00:00:00 2001 From: vadym Date: Sun, 6 Jun 2021 13:28:59 +0300 Subject: [PATCH 5/9] 1. libs upgrade --- build.gradle | 4 ++-- yggdrasil/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index e460cbc..2f3d35b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.5.0" + ext.kotlin_version = "1.5.10" repositories { google() mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:4.2.0" + classpath "com.android.tools.build:gradle:4.2.1" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/yggdrasil/Makefile b/yggdrasil/Makefile index 46870d0..dbb47cd 100644 --- a/yggdrasil/Makefile +++ b/yggdrasil/Makefile @@ -4,7 +4,7 @@ all: -go get -u github.com/yggdrasil-network/yggdrasil-go; -cd $(GOPATH)/src/github.com/yggdrasil-network/yggdrasil-go; \ go get -v -d ./...; \ - go get -u github.com/yggdrasil-network/yggdrasil-extras@005d79c; \ + go get -u github.com/yggdrasil-network/yggdrasil-extras; \ ANDROID=true ./build; mv -f $(GOPATH)/src/github.com/yggdrasil-network/yggdrasil-go/yggdrasil.aar yggdrasil.aar; mv -f $(GOPATH)/src/github.com/yggdrasil-network/yggdrasil-go/yggdrasil-sources.jar yggdrasil-sources.jar; From 85db5de35826506bf3bbd2d42fa4cdead9418491 Mon Sep 17 00:00:00 2001 From: vadym Date: Sun, 13 Jun 2021 15:16:48 +0300 Subject: [PATCH 6/9] 1. GO111MODULE=off fix --- yggdrasil/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yggdrasil/Makefile b/yggdrasil/Makefile index dbb47cd..8745071 100644 --- a/yggdrasil/Makefile +++ b/yggdrasil/Makefile @@ -1,5 +1,5 @@ GOPATH=$(shell go env GOPATH) - +export GO111MODULE=off all: -go get -u github.com/yggdrasil-network/yggdrasil-go; -cd $(GOPATH)/src/github.com/yggdrasil-network/yggdrasil-go; \ From c0847e2eb30e07277f07f2435d9dd04fa9c3f392 Mon Sep 17 00:00:00 2001 From: vadym Date: Sun, 13 Jun 2021 20:41:33 +0300 Subject: [PATCH 7/9] 1. migration to v0.4 API changes --- .../yggdrasil/CopyLocalNodeInfoActivity.kt | 6 +-- .../chronosx88/yggdrasil/MainActivity.kt | 6 +-- .../io/github/chronosx88/yggdrasil/Utils.kt | 6 +-- .../yggdrasil/YggdrasilTunService.kt | 44 +++++++------------ .../yggdrasil/models/config/Config.kt | 36 +++++++-------- 5 files changed, 39 insertions(+), 59 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/CopyLocalNodeInfoActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/CopyLocalNodeInfoActivity.kt index 9652325..014bc0c 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/CopyLocalNodeInfoActivity.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/CopyLocalNodeInfoActivity.kt @@ -6,7 +6,6 @@ import androidx.appcompat.app.AppCompatActivity import androidx.preference.PreferenceManager import io.github.chronosx88.yggdrasil.models.NodeInfo import io.github.chronosx88.yggdrasil.models.config.CopyInfoAdapter -import io.github.chronosx88.yggdrasil.models.config.SelectDNSInfoListAdapter class CopyLocalNodeInfoActivity: AppCompatActivity() { @@ -17,10 +16,9 @@ class CopyLocalNodeInfoActivity: AppCompatActivity() { val preferences = PreferenceManager.getDefaultSharedPreferences(this.baseContext) val ipv6Address = intent.extras!!.getString(MainActivity.IPv6, "") - val signingPublicKey = preferences.getString(MainActivity.signingPublicKey, "") - val encryptionPublicKey = preferences.getString(MainActivity.encryptionPublicKey, "") + val publicKey = preferences.getString(MainActivity.publicKey, "") var nodeInfoListView = findViewById(R.id.nodeInfoList) - val nodeInfoList = listOf(NodeInfo("IP address", ipv6Address!!), NodeInfo("Encryption Public Key", encryptionPublicKey!!), NodeInfo("Signing Public Key", signingPublicKey!!)); + val nodeInfoList = listOf(NodeInfo("IP address", ipv6Address!!), NodeInfo("Public Key", publicKey!!)); var adapter = CopyInfoAdapter(this, nodeInfoList) nodeInfoListView.adapter = adapter } diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt index ef59fe1..9bf848e 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt @@ -34,10 +34,8 @@ class MainActivity : AppCompatActivity() { const val STATUS_PEERS_UPDATE = 12 const val MESH_PEERS = "MESH_PEERS" const val STATIC_IP = "STATIC_IP_FLAG" - const val signingPrivateKey = "signingPrivateKey" - const val signingPublicKey = "signingPublicKey" - const val encryptionPrivateKey = "encryptionPrivateKey" - const val encryptionPublicKey = "encryptionPublicKey" + const val privateKey = "privateKey" + const val publicKey = "publicKey" const val COMMAND = "COMMAND" const val STOP = "STOP" const val START = "START" diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/Utils.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/Utils.kt index 8603749..25b62ea 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/Utils.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/Utils.kt @@ -11,14 +11,12 @@ val gson = Gson() fun createNativeYggConfig(config: Config): NodeConfig { val nativeConfig = NodeConfig() nativeConfig.adminListen = config.adminListen - nativeConfig.encryptionPrivateKey = config.encryptionPrivateKey - nativeConfig.encryptionPublicKey = config.encryptionPublicKey + nativeConfig.privateKey = config.privateKey + nativeConfig.publicKey = config.publicKey //nativeConfig.ifMTU = config.ifMTU nativeConfig.ifName = config.ifName //nativeConfig.ifTAPMode = config.ifTAPMode nativeConfig.nodeInfoPrivacy = config.nodeInfoPrivacy - nativeConfig.signingPrivateKey = config.signingPrivateKey - nativeConfig.signingPublicKey = config.signingPublicKey return nativeConfig } diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilTunService.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilTunService.kt index 99072c5..f9a134e 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilTunService.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/YggdrasilTunService.kt @@ -14,7 +14,6 @@ import androidx.core.app.NotificationCompat import androidx.preference.PreferenceManager import com.google.gson.Gson import com.google.gson.reflect.TypeToken -import dummy.ConduitEndpoint import io.github.chronosx88.yggdrasil.models.DNSInfo import io.github.chronosx88.yggdrasil.models.PeerInfo import io.github.chronosx88.yggdrasil.models.config.Peer @@ -22,7 +21,6 @@ import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.convertPeer2 import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.convertPeerInfoSet2PeerIdSet import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.deserializeStringList2DNSInfoSet import io.github.chronosx88.yggdrasil.models.config.Utils.Companion.deserializeStringList2PeerInfoSet -import kotlinx.coroutines.* import mobile.Mobile import mobile.Yggdrasil import java.io.* @@ -119,19 +117,19 @@ class YggdrasilTunService : VpnService() { configJson = gson.toJson(config).toByteArray() - var yggConduitEndpoint = ygg.startJSON(configJson) + ygg.startJSON(configJson) setupIOStreams(dns) thread(start = true) { val buffer = ByteArray(MAX_PACKET_SIZE) while (!isClosed) { - readPacketsFromTun(yggConduitEndpoint, buffer) + readPacketsFromTun(buffer) } } thread(start = true) { while (!isClosed) { - writePacketsToTun(yggConduitEndpoint) + writePacketsToTun() } } val intent: Intent = Intent().putExtra(MainActivity.IPv6, address) @@ -168,37 +166,27 @@ class YggdrasilTunService : VpnService() { val preferences = PreferenceManager.getDefaultSharedPreferences(this.baseContext) if(preferences.getString(MainActivity.STATIC_IP, null)==null) { - val encryptionPublicKey = config["EncryptionPublicKey"].toString() - val encryptionPrivateKey = config["EncryptionPrivateKey"].toString() - val signingPublicKey = config["SigningPublicKey"].toString() - val signingPrivateKey = config["SigningPrivateKey"].toString() + val publicKey = config["PublicKey"].toString() + val privateKey = config["PrivateKey"].toString() preferences.edit() - .putString(MainActivity.signingPrivateKey, signingPrivateKey) - .putString(MainActivity.signingPublicKey, signingPublicKey) - .putString(MainActivity.encryptionPrivateKey, encryptionPrivateKey) - .putString(MainActivity.encryptionPublicKey, encryptionPublicKey) + .putString(MainActivity.privateKey, privateKey) + .putString(MainActivity.publicKey, publicKey) .putString(MainActivity.STATIC_IP, MainActivity.STATIC_IP).apply() } else { - val signingPrivateKey = preferences.getString(MainActivity.signingPrivateKey, null) - val signingPublicKey = preferences.getString(MainActivity.signingPublicKey, null) - val encryptionPrivateKey = preferences.getString(MainActivity.encryptionPrivateKey, null) - val encryptionPublicKey = preferences.getString(MainActivity.encryptionPublicKey, null) + val privateKey = preferences.getString(MainActivity.privateKey, null) + val publicKey = preferences.getString(MainActivity.publicKey, null) - config["SigningPrivateKey"] = signingPrivateKey - config["SigningPublicKey"] = signingPublicKey - config["EncryptionPrivateKey"] = encryptionPrivateKey - config["EncryptionPublicKey"] = encryptionPublicKey + config["PrivateKey"] = privateKey + config["PublicKey"] = publicKey } } - - (config["SessionFirewall"] as MutableMap)["Enable"] = false //(config["SessionFirewall"] as MutableMap)["AllowFromDirect"] = true //(config["SessionFirewall"] as MutableMap)["AllowFromRemote"] = true //(config["SessionFirewall"] as MutableMap)["AlwaysAllowOutbound"] = true //(config["SessionFirewall"] as MutableMap)["WhitelistEncryptionPublicKeys"] = whiteList //(config["SessionFirewall"] as MutableMap)["BlacklistEncryptionPublicKeys"] = blackList - (config["SwitchOptions"] as MutableMap)["MaxTotalQueueSize"] = 4194304 + //(config["SwitchOptions"] as MutableMap)["MaxTotalQueueSize"] = 4194304 if (config["AutoStart"] == null) { val tmpMap = emptyMap().toMutableMap() tmpMap["WiFi"] = false @@ -208,18 +196,18 @@ class YggdrasilTunService : VpnService() { return config } - private fun readPacketsFromTun(yggConduitEndpoint: ConduitEndpoint, buffer: ByteArray) { + private fun readPacketsFromTun(buffer: ByteArray) { try { // Read the outgoing packet from the input stream. val length = tunInputStream.read(buffer) - yggConduitEndpoint.send(buffer.sliceArray(IntRange(0, length - 1))) + ygg.send(buffer.sliceArray(IntRange(0, length - 1))) } catch (e: IOException) { e.printStackTrace() } } - private fun writePacketsToTun(yggConduitEndpoint: ConduitEndpoint) { - val buffer = yggConduitEndpoint.recv() + private fun writePacketsToTun() { + val buffer = ygg.recv() if(buffer!=null) { try { tunOutputStream.write(buffer) diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/Config.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/Config.kt index 085f1a9..6107b99 100644 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/Config.kt +++ b/app/src/main/java/io/github/chronosx88/yggdrasil/models/config/Config.kt @@ -4,23 +4,21 @@ import com.google.gson.annotations.SerializedName // FIXME This is old config scheme data class Config ( - @SerializedName("peers") var peers : List, - @SerializedName("interfacePeers") var interfacePeers : Map>, - @SerializedName("listen") var listen : List, - @SerializedName("adminListen") var adminListen : String, - @SerializedName("multicastInterfaces") var multicastInterfaces : List, - @SerializedName("allowedEncryptionPublicKeys") var allowedEncryptionPublicKeys : List, - @SerializedName("encryptionPublicKey") var encryptionPublicKey : String, - @SerializedName("encryptionPrivateKey") var encryptionPrivateKey : String, - @SerializedName("signingPublicKey") var signingPublicKey : String, - @SerializedName("signingPrivateKey") var signingPrivateKey : String, - @SerializedName("linkLocalTCPPort") var linkLocalTCPPort : Int, - @SerializedName("ifName") var ifName : String, - @SerializedName("ifTAPMode") var ifTAPMode : Boolean, - @SerializedName("ifMTU") var ifMTU : Long, - @SerializedName("sessionFirewall") var sessionFirewall : SessionFirewall, - @SerializedName("tunnelRouting") var tunnelRouting : TunnelRouting, - @SerializedName("switchOptions") var switchOptions : SwitchOptions, - @SerializedName("nodeInfoPrivacy") var nodeInfoPrivacy : Boolean, - @SerializedName("nodeInfo") var nodeInfo : Map + @SerializedName("peers") var peers : List, + @SerializedName("interfacePeers") var interfacePeers : Map>, + @SerializedName("listen") var listen : List, + @SerializedName("adminListen") var adminListen : String, + @SerializedName("multicastInterfaces") var multicastInterfaces : List, + @SerializedName("allowedEncryptionPublicKeys") var allowedEncryptionPublicKeys : List, + @SerializedName("publicKey") var publicKey : String, + @SerializedName("privateKey") var privateKey : String, + @SerializedName("linkLocalTCPPort") var linkLocalTCPPort : Int, + @SerializedName("ifName") var ifName : String, + @SerializedName("ifTAPMode") var ifTAPMode : Boolean, + @SerializedName("ifMTU") var ifMTU : Long, + @SerializedName("sessionFirewall") var sessionFirewall : SessionFirewall, + @SerializedName("tunnelRouting") var tunnelRouting : TunnelRouting, + @SerializedName("switchOptions") var switchOptions : SwitchOptions, + @SerializedName("nodeInfoPrivacy") var nodeInfoPrivacy : Boolean, + @SerializedName("nodeInfo") var nodeInfo : Map ) \ No newline at end of file From 41d498fdfe6fdda5d9347fb61c9d1f957fa02c2d Mon Sep 17 00:00:00 2001 From: vadym Date: Sun, 13 Jun 2021 20:43:38 +0300 Subject: [PATCH 8/9] 1. lib upgrade --- app/build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1725001..cd4d1ca 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "io.github.chronosx88.yggdrasil" minSdkVersion 15 targetSdkVersion 29 - versionCode 19 - versionName "1.8" + versionCode 20 + versionName "2.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" setProperty("archivesBaseName", project.getParent().name+"-"+versionName) } @@ -65,13 +65,13 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(path: ':yggdrasil') - implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.appcompat:appcompat:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation "androidx.preference:preference-ktx:1.1.1" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8' - implementation 'com.google.android.material:material:1.4.0-beta01' + implementation 'com.google.android.material:material:1.4.0-rc01' implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.hbb20:ccp:2.4.0' implementation 'com.vincentbrison.openlibraries.android:dualcache:3.1.1' From f60536a72bb2e61f443ec45220be18946de7da76 Mon Sep 17 00:00:00 2001 From: vadym Date: Tue, 15 Jun 2021 00:13:05 +0300 Subject: [PATCH 9/9] 1. Added ACRA lib for crash reports --- app/build.gradle | 9 ++-- app/src/main/AndroidManifest.xml | 1 + .../chronosx88/yggdrasil/YggApplication.kt | 46 +++++++++++++++++++ .../yggdrasil/YggdrasilTunService.kt | 1 - .../yggdrasil/models/config/Utils.kt | 2 + app/src/main/res/values/strings.xml | 2 + 6 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 app/src/main/java/io/github/chronosx88/yggdrasil/YggApplication.kt diff --git a/app/build.gradle b/app/build.gradle index cd4d1ca..22d1114 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "io.github.chronosx88.yggdrasil" minSdkVersion 15 targetSdkVersion 29 - versionCode 20 - versionName "2.0" + versionCode 23 + versionName "2.0.3" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" setProperty("archivesBaseName", project.getParent().name+"-"+versionName) } @@ -62,12 +62,15 @@ gradle.projectsEvaluated { } dependencies { + + implementation 'ch.acra:acra-http:5.8.3' + implementation 'ch.acra:acra-dialog:5.8.3' implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(path: ':yggdrasil') implementation 'androidx.appcompat:appcompat:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - implementation "androidx.preference:preference-ktx:1.1.1" + implementation 'androidx.preference:preference-ktx:1.1.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9f24941..08a84d9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -8,6 +8,7 @@ ?): MutableSet { var gson = Gson() + ACRA.errorReporter.putCustomData("Peer list", gson.toJson(list)) var out = mutableSetOf() if (list != null) { for(s in list) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5efec01..00fcd5e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -9,4 +9,6 @@ Schema Yggdrasil Node info + Sorry, the application crashed. + Please describe what were you doing when the app crashed: