From eff910600dde960568764fb66f0abcdfedb3df2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garci=CC=81a?= Date: Tue, 7 Jan 2025 15:06:09 +0100 Subject: [PATCH] Support 16kb page size on android --- .cargo/config.toml | 7 +++++++ .../bitwarden-uniffi/kotlin/app/build.gradle | 18 +++++++++--------- crates/bitwarden-uniffi/kotlin/build.gradle | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../bitwarden-uniffi/kotlin/sdk/build.gradle | 12 ++++++------ 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index d7945d08..95c2f30b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,9 @@ [target.'cfg(target_arch="aarch64")'] rustflags = ["--cfg", "aes_armv8"] + +# Enable support for 16k pages on Android +# https://android-developers.googleblog.com/2024/08/adding-16-kb-page-size-to-android.html +[target.'cfg(target_os = "android")'] +rustflags = [ + "-C", "link-arg=-Wl,-z,max-page-size=16384", +] diff --git a/crates/bitwarden-uniffi/kotlin/app/build.gradle b/crates/bitwarden-uniffi/kotlin/app/build.gradle index 188d984a..58a6b840 100644 --- a/crates/bitwarden-uniffi/kotlin/app/build.gradle +++ b/crates/bitwarden-uniffi/kotlin/app/build.gradle @@ -6,12 +6,12 @@ plugins { android { namespace 'com.bitwarden.myapplication' - compileSdk 34 + compileSdk 35 defaultConfig { applicationId "com.bitwarden.myapplication" minSdk 28 - targetSdk 34 + targetSdk 35 versionCode 1 versionName "1.0" @@ -51,11 +51,11 @@ dependencies { // implementation 'com.bitwarden.sdk-android' implementation project(':sdk') - implementation 'androidx.core:core-ktx:1.8.0' + implementation 'androidx.core:core-ktx:1.15.0' implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0') - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1' - implementation 'androidx.activity:activity-compose:1.5.1' - implementation platform('androidx.compose:compose-bom:2022.10.00') + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.7' + implementation 'androidx.activity:activity-compose:1.9.3' + implementation platform('androidx.compose:compose-bom:2024.12.01') implementation 'androidx.compose.ui:ui' implementation 'androidx.compose.ui:ui-graphics' implementation 'androidx.compose.ui:ui-tooling-preview' @@ -66,9 +66,9 @@ dependencies { implementation "io.ktor:ktor-client-content-negotiation:2.3.3" implementation "io.ktor:ktor-serialization-kotlinx-json:2.3.3" testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' - androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00') + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' + androidTestImplementation platform('androidx.compose:compose-bom:2024.12.01') androidTestImplementation 'androidx.compose.ui:ui-test-junit4' debugImplementation 'androidx.compose.ui:ui-tooling' debugImplementation 'androidx.compose.ui:ui-test-manifest' diff --git a/crates/bitwarden-uniffi/kotlin/build.gradle b/crates/bitwarden-uniffi/kotlin/build.gradle index 11da2e13..917be548 100644 --- a/crates/bitwarden-uniffi/kotlin/build.gradle +++ b/crates/bitwarden-uniffi/kotlin/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.4.0' apply false - id 'com.android.library' version '8.4.0' apply false + id 'com.android.application' version '8.7.3' apply false + id 'com.android.library' version '8.7.3' apply false id 'org.jetbrains.kotlin.android' version '1.9.23' apply false id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.23' apply false } diff --git a/crates/bitwarden-uniffi/kotlin/gradle/wrapper/gradle-wrapper.properties b/crates/bitwarden-uniffi/kotlin/gradle/wrapper/gradle-wrapper.properties index 9d590697..035ba24e 100644 --- a/crates/bitwarden-uniffi/kotlin/gradle/wrapper/gradle-wrapper.properties +++ b/crates/bitwarden-uniffi/kotlin/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Mon Jul 24 14:16:42 CEST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/crates/bitwarden-uniffi/kotlin/sdk/build.gradle b/crates/bitwarden-uniffi/kotlin/sdk/build.gradle index 1d2e4de4..e30527e1 100644 --- a/crates/bitwarden-uniffi/kotlin/sdk/build.gradle +++ b/crates/bitwarden-uniffi/kotlin/sdk/build.gradle @@ -6,11 +6,11 @@ plugins { android { namespace 'com.bitwarden.sdk' - compileSdk 34 + compileSdk 35 defaultConfig { minSdk 28 - targetSdk 34 + targetSdk 35 testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' consumerProguardFiles 'consumer-rules.pro' @@ -107,13 +107,13 @@ File findRustlsPlatformVerifierClassesJar() { } dependencies { - implementation 'net.java.dev.jna:jna:5.14.0@aar' + implementation 'net.java.dev.jna:jna:5.16.0@aar' implementation files(findRustlsPlatformVerifierClassesJar()) - implementation 'androidx.core:core-ktx:1.13.0' + implementation 'androidx.core:core-ktx:1.15.0' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' }