diff --git a/Android.bp b/Android.bp index b8d55b23..42a31721 100644 --- a/Android.bp +++ b/Android.bp @@ -24,20 +24,16 @@ android_app { "app/src/main/res", ], static_libs: [ - "com.google.android.material_material", - "androidx.core_core", + "kotlin-stdlib-jdk8", + "androidx.core_core-ktx", "androidx.preference_preference", - "androidx.lifecycle_lifecycle-extensions", + "androidx.lifecycle_lifecycle-viewmodel-ktx", + "androidx.lifecycle_lifecycle-livedata-ktx", "androidx-constraintlayout_constraintlayout", - "kotlinx-coroutines-android", - "kotlinx-coroutines-core", - "seedvault-lib-androidx-core-ktx", - "seedvault-lib-androidx-lifecycle-livedata-core-ktx", - "seedvault-lib-androidx-lifecycle-livedata-ktx", - "seedvault-lib-androidx-lifecycle-viewmodel-ktx", + "com.google.android.material_material", + "seedvault-lib-koin-core", "seedvault-lib-koin-android", "seedvault-lib-koin-androidx-viewmodel", - "seedvault-lib-koin-core", "seedvault-lib-novacrypto-bip39", "seedvault-lib-novacrypto-sha256", "seedvault-lib-novacrypto-toruntime" diff --git a/app/build.gradle b/app/build.gradle index d598e1cd..39df288c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -113,24 +113,52 @@ def aospDeps = fileTree(include: [ 'libcore.jar' ], dir: 'libs') +// We try to keep the dependencies in sync with what AOSP ships as Seedvault is meant to be built +// with the AOSP build system and gradle builds are just for more pleasant development. // If the dependencies below are updated please make sure to update the // prebuilt libraries and Android.bp in the top `libs` folder to reflect that. // You can copy these libraries from ~/.gradle/caches/modules-2 dependencies { compileOnly aospDeps + //noinspection GradleDependency implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation 'io.github.novacrypto:BIP39:2019.01.27' implementation 'org.koin:koin-androidx-viewmodel:2.0.1' - implementation 'androidx.core:core-ktx:1.1.0' - implementation 'androidx.preference:preference-ktx:1.1.0' - implementation 'com.google.android.material:material:1.0.0' - implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0' + // https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-11.0.0_r3/current/androidx/Android.bp#610 + //noinspection GradleDependency + implementation 'androidx.core:core-ktx:1.5.0-alpha01' + + // A newer version gets pulled in with AOSP via core, so we include this here explicitly + // https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-11.0.0_r3/current/androidx/Android.bp#930 + //noinspection GradleDependency + implementation 'androidx.fragment:fragment-ktx:1.3.0-alpha07' + + // https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-11.0.0_r3/current/androidx/Android.bp#2412 + //noinspection GradleDependency + implementation 'androidx.preference:preference:1.1.1' // 1.2.0-alpha01 is not even released + + // https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-11.0.0_r3/current/androidx/Android.bp#1553 + //noinspection GradleDependency + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0-alpha05' + + // https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-11.0.0_r3/current/androidx/Android.bp#1353 + //noinspection GradleDependency implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0-alpha05' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + + // https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-11.0.0_r3/current/extras/constraint-layout-x/Android.bp#30 + //noinspection GradleDependency + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta7' + + // https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-11.0.0_r3/current/extras/material-design-x/Android.bp#6 + //noinspection GradleDependency + implementation 'com.google.android.material:material:1.1.0-alpha05' + + // + // Dependencies below do not concern the AOSP build + // lintChecks 'com.github.thirdegg:lint-rules:0.0.5-alpha' diff --git a/libs/Android.bp b/libs/Android.bp index 669f0c15..21068b43 100644 --- a/libs/Android.bp +++ b/libs/Android.bp @@ -1,24 +1,7 @@ -android_library_import { - name: "seedvault-lib-androidx-core-ktx", - aars: ["core-ktx-1.1.0.aar"], - sdk_version: "current", -} - -android_library_import { - name: "seedvault-lib-androidx-lifecycle-livedata-core-ktx", - aars: ["lifecycle-livedata-core-ktx-2.3.0-alpha05.aar"], - sdk_version: "current", -} - -android_library_import { - name: "seedvault-lib-androidx-lifecycle-livedata-ktx", - aars: ["lifecycle-livedata-ktx-2.3.0-alpha05.aar"], - sdk_version: "current", -} - -android_library_import { - name: "seedvault-lib-androidx-lifecycle-viewmodel-ktx", - aars: ["lifecycle-viewmodel-ktx-2.1.0.aar"], +java_import { + name: "seedvault-lib-koin-core", + host_supported: true, + jars: ["koin-core-2.0.1.jar"], sdk_version: "current", } @@ -34,13 +17,6 @@ android_library_import { sdk_version: "current", } -java_import { - name: "seedvault-lib-koin-core", - host_supported: true, - jars: ["koin-core-2.0.1.jar"], - sdk_version: "current", -} - java_import { name: "seedvault-lib-novacrypto-bip39", host_supported: true, diff --git a/libs/core-ktx-1.1.0.aar b/libs/core-ktx-1.1.0.aar deleted file mode 100644 index a092757f..00000000 Binary files a/libs/core-ktx-1.1.0.aar and /dev/null differ diff --git a/libs/lifecycle-livedata-core-ktx-2.3.0-alpha05.aar b/libs/lifecycle-livedata-core-ktx-2.3.0-alpha05.aar deleted file mode 100644 index 8fee089e..00000000 Binary files a/libs/lifecycle-livedata-core-ktx-2.3.0-alpha05.aar and /dev/null differ diff --git a/libs/lifecycle-livedata-ktx-2.3.0-alpha05.aar b/libs/lifecycle-livedata-ktx-2.3.0-alpha05.aar deleted file mode 100644 index b1d5ebcf..00000000 Binary files a/libs/lifecycle-livedata-ktx-2.3.0-alpha05.aar and /dev/null differ diff --git a/libs/lifecycle-viewmodel-ktx-2.1.0.aar b/libs/lifecycle-viewmodel-ktx-2.1.0.aar deleted file mode 100644 index 0e832d24..00000000 Binary files a/libs/lifecycle-viewmodel-ktx-2.1.0.aar and /dev/null differ