From 19ae8c609233368f7aadeff36dc9e384d4cd5c10 Mon Sep 17 00:00:00 2001 From: Hardcore Sushi Date: Sat, 14 May 2022 20:34:19 +0200 Subject: [PATCH] Update dependencies --- README.md | 10 +- app/build.gradle | 27 +-- app/src/main/AndroidManifest.xml | 2 - app/src/main/native/Cargo.lock | 204 ++++++++++++++--------- app/src/main/native/Cargo.toml | 17 +- app/src/main/native/build.sh | 13 +- app/src/main/native/src/crypto.rs | 4 +- build.gradle | 4 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 9 files changed, 170 insertions(+), 113 deletions(-) diff --git a/README.md b/README.md index 45c8bd7..cae5b44 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ AIRA is still under developement and is not ready for production usage yet. Not # Download AIRA releases are availables in the "Release" section. All APKs are signed with my PGP key available on keyservers. To download it: -`gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 007F84120107191E` \ -Fingerprint: `BD56 2147 9E7B 74D3 6A40 5BE8 007F 8412 0107 191E` \ +`gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys AFE384344A45E13A` \ +Fingerprint: `B64E FE86 CEE1 D054 F082 1711 AFE3 8434 4A45 E13A` \ Email: `Hardcore Sushi ` Then, verify APK: `gpg --verify AIRA.apk.asc AIRA.apk` @@ -39,12 +39,12 @@ __Don't install the APK if the verification fails!__ AIRA android uses some code from the desktop version which is written in Rust. Therefore, you need to compile this Rust code first. ``` curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh -rustup target add aarch64-linux-android armv7-linux-androideabi +rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android ``` ### Install NDK -The Rust code uses a crate called "rusqlite" to store data in SQLite databases. This crates uses the original SQLite3 library written in C. Therefore, to compile it you need the Android NDK. You can find instructions to install the NDK here: https://developer.android.com/ndk/guides +We also need the Android NDK to cross-compile the rust code to Android. Currently, only versions up to __r22b__ are supported. You can find instructions to install the NDK here: https://developer.android.com/ndk/guides -Once installed, you need to define the $ANDROID_NDK_HOME environment variable (if not already set): +Once installed, you need to define the `$ANDROID_NDK_HOME` environment variable (if not already set): ``` export ANDROID_NDK_HOME=/home//Android/SDK/ndk/" ``` diff --git a/app/build.gradle b/app/build.gradle index 5cf1965..107d830 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,20 +4,20 @@ plugins { } android { - compileSdkVersion 30 - buildToolsVersion "30.0.3" + compileSdkVersion 32 + buildToolsVersion "32.0.0" defaultConfig { applicationId "sushi.hardcore.aira" minSdkVersion 19 - targetSdkVersion 30 - versionCode 2 - versionName "0.1.0" + targetSdkVersion 32 + versionCode 3 + versionName "0.1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ndk { - abiFilters "x86", "armeabi-v7a", "arm64-v8a" + abiFilters "x86", "x86_64", "armeabi-v7a", "arm64-v8a" } } @@ -31,7 +31,7 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled false // curve25519-android doesn't seem to support minification proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } @@ -42,19 +42,20 @@ android { kotlinOptions { jvmTarget = '1.8' } + namespace 'sushi.hardcore.aira' } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.6.0' - implementation 'androidx.appcompat:appcompat:1.3.1' - implementation "androidx.fragment:fragment-ktx:1.3.6" - implementation "androidx.preference:preference-ktx:1.1.1" - implementation 'com.google.android.material:material:1.4.0' + implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.appcompat:appcompat:1.4.1' + implementation "androidx.fragment:fragment-ktx:1.4.1" + implementation "androidx.preference:preference-ktx:1.2.0" + implementation 'com.google.android.material:material:1.6.0' implementation 'net.i2p.crypto:eddsa:0.3.0' implementation "org.whispersystems:curve25519-android:0.5.0" - implementation 'androidx.constraintlayout:constraintlayout:2.1.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.3' implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" implementation 'com.github.bumptech.glide:glide:4.12.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b1e5e53..883ae51 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ @@ -10,7 +9,6 @@ - ::new_from_slice(&peer_finished_key).unwrap(); hmac.update(&handshake_hash); - hmac.verify(&peer_handshake_finished).is_ok() + hmac.verify_slice(&peer_handshake_finished).is_ok() } diff --git a/build.gradle b/build.gradle index 8163557..3b4c5e0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,11 @@ buildscript { - ext.kotlin_version = "1.5.21" + ext.kotlin_version = "1.6.21" repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a41902b..bacd395 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Sep 02 16:55:14 UTC 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME