Merge pull request #581 from grote/14-version-upgrades

Version upgrades of included libraries and test dependencies
This commit is contained in:
Torsten Grote 2023-10-17 11:04:42 -03:00 committed by GitHub
commit 28059a50bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 27 additions and 22 deletions

View file

@ -18,7 +18,7 @@ android {
compileSdk rootProject.ext.compileSdk compileSdk rootProject.ext.compileSdk
defaultConfig { defaultConfig {
minSdk 32 // leave at 32 for robolectric tests minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk targetSdk rootProject.ext.targetSdk
versionNameSuffix "-$gitDescribe" versionNameSuffix "-$gitDescribe"
testInstrumentationRunner "com.stevesoltys.seedvault.KoinInstrumentationTestRunner" testInstrumentationRunner "com.stevesoltys.seedvault.KoinInstrumentationTestRunner"
@ -52,6 +52,10 @@ android {
jvmTarget = JavaVersion.VERSION_17.toString() jvmTarget = JavaVersion.VERSION_17.toString()
languageVersion = "1.8" languageVersion = "1.8"
} }
packagingOptions {
exclude("META-INF/LICENSE.md")
exclude("META-INF/LICENSE-notice.md")
}
testOptions { testOptions {
unitTests.all { unitTests.all {
useJUnitPlatform() useJUnitPlatform()
@ -134,8 +138,8 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: "${rootProject.rootDir}/libs/koin-android") implementation fileTree(include: ['*.jar'], dir: "${rootProject.rootDir}/libs/koin-android")
implementation fileTree(include: ['*.aar'], dir: "${rootProject.rootDir}/libs/koin-android") implementation fileTree(include: ['*.aar'], dir: "${rootProject.rootDir}/libs/koin-android")
// implementation "cash.z.ecc.android:kotlin-bip39:1.0.4" // implementation "cash.z.ecc.android:kotlin-bip39:1.0.6"
implementation fileTree(include: ['kotlin-bip39-jvm-1.0.4.jar'], dir: "${rootProject.rootDir}/libs") implementation fileTree(include: ['kotlin-bip39-jvm-1.0.6.jar'], dir: "${rootProject.rootDir}/libs")
/** /**
* Test Dependencies (do not concern the AOSP build) * Test Dependencies (do not concern the AOSP build)
@ -144,16 +148,13 @@ dependencies {
// anything less than 'implementation' fails tests run with gradlew // anything less than 'implementation' fails tests run with gradlew
testImplementation rootProject.ext.aosp_libs testImplementation rootProject.ext.aosp_libs
testImplementation 'androidx.test.ext:junit:1.1.3' testImplementation 'androidx.test.ext:junit:1.1.5'
testImplementation('org.robolectric:robolectric:4.8.1') { testImplementation('org.robolectric:robolectric:4.10.3')
// https://github.com/robolectric/robolectric/issues/5245
exclude group: "com.google.auto.service", module: "auto-service"
}
testImplementation 'org.hamcrest:hamcrest:2.2' testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version"
testImplementation "io.mockk:mockk:$mockk_version" testImplementation "io.mockk:mockk:$mockk_version"
testImplementation 'org.bitcoinj:bitcoinj-core:0.15.10' testImplementation 'org.bitcoinj:bitcoinj-core:0.16.2'
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5_version" testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5_version"

View file

@ -1,7 +1,6 @@
package com.stevesoltys.seedvault.crypto package com.stevesoltys.seedvault.crypto
import cash.z.ecc.android.bip39.Mnemonics import cash.z.ecc.android.bip39.Mnemonics
import cash.z.ecc.android.bip39.WordList
import cash.z.ecc.android.bip39.toSeed import cash.z.ecc.android.bip39.toSeed
import com.stevesoltys.seedvault.toHexString import com.stevesoltys.seedvault.toHexString
import com.stevesoltys.seedvault.ui.recoverycode.toMnemonicChars import com.stevesoltys.seedvault.ui.recoverycode.toMnemonicChars
@ -2066,7 +2065,7 @@ class WordListTest {
@Test @Test
fun `word list of library did not change`() { fun `word list of library did not change`() {
val libWords = WordList().words val libWords = Mnemonics.getCachedWords("en")
for (i in words.indices) { for (i in words.indices) {
assertEquals(words[i], libWords[i]) assertEquals(words[i], libWords[i])
} }

View file

@ -41,7 +41,7 @@ import kotlin.random.Random
@Suppress("DEPRECATION") @Suppress("DEPRECATION")
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@Config( @Config(
sdk = [32], // robolectric does not support 33, yet sdk = [33], // robolectric does not support 34, yet
application = TestApp::class application = TestApp::class
) )
class MetadataManagerTest { class MetadataManagerTest {

View file

@ -19,7 +19,7 @@ import org.robolectric.annotation.Config
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@Config( @Config(
sdk = [32], // robolectric does not support 33, yet sdk = [33], // robolectric does not support 34, yet
application = TestApp::class application = TestApp::class
) )
internal class DocumentFileTest { internal class DocumentFileTest {

View file

@ -22,7 +22,7 @@ import kotlin.random.Random
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@Config( @Config(
sdk = [32], // robolectric does not support 33, yet sdk = [33], // robolectric does not support 34, yet
application = TestApp::class application = TestApp::class
) )
internal class DeviceInfoTest { internal class DeviceInfoTest {

View file

@ -22,7 +22,7 @@ plugins {
ext { ext {
compileSdk = 34 compileSdk = 34
minSdk = 32 minSdk = 33
targetSdk = 34 targetSdk = 34
} }

View file

@ -30,6 +30,11 @@ android {
jvmTarget = JavaVersion.VERSION_17.toString() jvmTarget = JavaVersion.VERSION_17.toString()
} }
packagingOptions {
exclude("META-INF/LICENSE.md")
exclude("META-INF/LICENSE-notice.md")
}
testOptions { testOptions {
unitTests.returnDefaultValues = true unitTests.returnDefaultValues = true
} }
@ -67,7 +72,7 @@ dependencies {
testImplementation "io.mockk:mockk:$mockk_version" testImplementation "io.mockk:mockk:$mockk_version"
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version" androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
androidTestImplementation "io.mockk:mockk-android:$mockk_version" androidTestImplementation "io.mockk:mockk-android:$mockk_version"
} }

View file

@ -6,8 +6,8 @@ ext {
// test dependencies below - these do not care about AOSP and can be freely updated // test dependencies below - these do not care about AOSP and can be freely updated
junit4_version = "4.13.2" junit4_version = "4.13.2"
junit5_version = "5.7.2" // careful, upgrading this can change a Cipher's IV size in tests!? junit5_version = "5.10.0" // careful, upgrading this can change a Cipher's IV size in tests!?
mockk_version = "1.12.3" mockk_version = "1.13.4" // newer versions require kotlin > 1.8.10
espresso_version = "3.4.0" espresso_version = "3.4.0"
} }
@ -108,6 +108,6 @@ ext.storage_libs = [
// https://github.com/google/tink/releases // https://github.com/google/tink/releases
com_google_crypto_tink_android: dependencies.create('com.google.crypto.tink:tink-android') { com_google_crypto_tink_android: dependencies.create('com.google.crypto.tink:tink-android') {
// careful with upgrading tink, so old backups continue to be decryptable // careful with upgrading tink, so old backups continue to be decryptable
version { strictly '1.7.0' } version { strictly '1.10.0' }
}, },
] ]

View file

@ -1,5 +1,5 @@
java_import { java_import {
name: "seedvault-lib-kotlin-bip39", name: "seedvault-lib-kotlin-bip39",
jars: ["kotlin-bip39-jvm-1.0.4.jar"], jars: ["kotlin-bip39-jvm-1.0.6.jar"],
sdk_version: "current", sdk_version: "current",
} }

Binary file not shown.

Binary file not shown.

View file

@ -46,6 +46,6 @@ android_library {
java_import { java_import {
name: "seedvault-lib-tink-android", name: "seedvault-lib-tink-android",
jars: ["libs/tink-android-1.7.0.jar"], jars: ["libs/tink-android-1.10.0.jar"],
sdk_version: "current", sdk_version: "current",
} }

View file

@ -99,7 +99,7 @@ dependencies {
testImplementation "io.mockk:mockk:$mockk_version" testImplementation "io.mockk:mockk:$mockk_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version" androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
} }

Binary file not shown.