Skip to content

Commit

Permalink
Support 16kb page size on android
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-garcia committed Jan 7, 2025
1 parent afac7e6 commit eff9106
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
7 changes: 7 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -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",
]
18 changes: 9 additions & 9 deletions crates/bitwarden-uniffi/kotlin/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-uniffi/kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions crates/bitwarden-uniffi/kotlin/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
}

0 comments on commit eff9106

Please sign in to comment.