Remove the "lockbox" custom megazord.

The lockwise apps are on a very old version of appservices and I don't believe
we have a plan for updating them anytime soon. Continuing to build the lockbox
megazord does not seem like a good use of CI or local dev resources.

We understand how to bring this back if we need it, but also, if we do need
it again in future it's probably a good opportunity to revisit how we build
custom megazords in the first place.
This commit is contained in:
Ryan Kelly 2020-11-07 12:30:53 +11:00
Родитель dc1430537c
Коммит 006c1d659d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: FB70C973A037D258
14 изменённых файлов: 15 добавлений и 1453 удалений

Просмотреть файл

@ -78,16 +78,6 @@ projects:
- name: nimbus
type: aar
description: The Nimbus SDK, compiled to work with the Application Services full-megazord.
lockbox-megazord:
uploadSymbols: true
path: megazords/lockbox/android
artifactId: lockbox-megazord
publications:
- name: lockbox-megazord
type: aar
- name: lockbox-megazord-forUnitTests
type: jar
description: Megazord of [fxaclient, logins, logging].
full-megazord:
uploadSymbols: true
path: megazords/full/android

Просмотреть файл

@ -212,8 +212,6 @@ commands:
python3 ./tools/dependency_summary.py --all-ios-targets --package megazord_ios --check megazords/ios/DEPENDENCIES.md
python3 ./tools/dependency_summary.py --all-android-targets --package megazord --check megazords/full/DEPENDENCIES.md
python3 ./tools/dependency_summary.py --all-android-targets --package megazord --format pom --check megazords/full/android/dependency-licenses.xml
python3 ./tools/dependency_summary.py --all-android-targets --package lockbox --check megazords/lockbox/DEPENDENCIES.md
python3 ./tools/dependency_summary.py --all-android-targets --package lockbox --format pom --check megazords/lockbox/android/dependency-licenses.xml
sync-bugzilla-to-github:
steps:
- checkout

Просмотреть файл

@ -4,6 +4,16 @@
[Full Changelog](https://github.com/mozilla/application-services/compare/v66.0.0...main)
## General
### ⚠️ Breaking changes ⚠️
- The custom "Lockbox Megazord" package (`org.mozilla.appservices:lockbox-megazord`) has been removed.
Existing consumers of this package who wish to update to the latest release of application-services
should migrate to using the default `appservices:full-megazord` package, or contact the development
team to discuss an alternate approach.
([#3702](https://github.com/mozilla/application-services/pull/3702))
## iOS
## What's Changed

10
Cargo.lock сгенерированный
Просмотреть файл

@ -1561,16 +1561,6 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "lockbox"
version = "0.1.0"
dependencies = [
"fxaclient_ffi",
"logins_ffi",
"rc_log_ffi",
"viaduct",
]
[[package]]
name = "log"
version = "0.3.9"

Просмотреть файл

@ -38,7 +38,6 @@ members = [
"components/webext-storage/ffi",
"megazords/full",
"megazords/ios/rust",
"megazords/lockbox",
"testing/sync-test",
"tools/protobuf-gen",

Просмотреть файл

@ -52,10 +52,11 @@ to replace the "full-megazord" AAR with a custom-built megazord AAR containing o
Such an AAR can be built in the same way as the "full-megazord", and simply avoid depending on the rust
crates for components that are not required.
To help ensure this replacement is done safely at runtime, the `mozilla.appservices.support.native` provides
helper functions for loading the correct megazord `.so` file. The Kotlin wrapper for each component should
load its shared library by calling `mozilla.appservices.support.native.loadIndirect`, specifying both the
name of the component and the expected version number of the shared library.
To help ensure this replacement is done safely at runtime, the `mozilla.appservices.support.native` package
provides helper functions for loading the correct megazord `.so` file. The Kotlin wrapper for each component
should load its shared library by calling `mozilla.appservices.support.native.loadIndirect`, specifying both
the name of the component and the expected version number of the shared library.
## Unit Tests

Просмотреть файл

@ -1,15 +0,0 @@
[package]
name = "lockbox"
edition = "2018"
version = "0.1.0"
authors = ["application-services <application-services@mozilla.com>"]
license = "MPL-2.0"
[lib]
crate-type = ["cdylib"]
[dependencies]
fxaclient_ffi = { path = "../../components/fxa-client/ffi" }
logins_ffi = { path = "../../components/logins/ffi" }
rc_log_ffi = { path = "../../components/rc_log" }
viaduct = { path = "../../components/viaduct", default-features = false }

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,110 +0,0 @@
apply plugin: 'com.android.library'
apply plugin: 'org.mozilla.rust-android-gradle.rust-android'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
ndkVersion rootProject.ext.build.ndkVersion
compileSdkVersion rootProject.ext.build.compileSdkVersion
defaultConfig {
minSdkVersion rootProject.ext.build['minSdkVersion']
targetSdkVersion rootProject.ext.build['targetSdkVersion']
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField("String", "LIBRARY_VERSION", "\"${rootProject.ext.library.version}\"")
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
consumerProguardFiles "$rootDir/proguard-rules-consumer-jna.pro"
}
}
sourceSets {
test.jniLibs.srcDirs += "$buildDir/rustJniLibs/desktop"
}
// Uncomment to include debug symbols in native library builds.
// packagingOptions { doNotStrip "**/*.so" }
// This is required to support new AndroidX support libraries.
// See mozilla-mobile/android-components#842
compileOptions {
sourceCompatibility rootProject.ext.build.jvmTargetCompatibility
targetCompatibility rootProject.ext.build.jvmTargetCompatibility
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = rootProject.ext.build.jvmTargetCompatibility
}
}
}
configurations {
// There's an interaction between Gradle's resolution of dependencies with different types
// (@jar, @aar) for `implementation` and `testImplementation` and with Android Studio's built-in
// JUnit test runner. The runtime classpath in the built-in JUnit test runner gets the
// dependency from the `implementation`, which is type @aar, and therefore the JNA dependency
// doesn't provide the JNI dispatch libraries in the correct Java resource directories. I think
// what's happening is that @aar type in `implementation` resolves to the @jar type in
// `testImplementation`, and that it wins the dependency resolution battle.
//
// A workaround is to add a new configuration which depends on the @jar type and to reference
// the underlying JAR file directly in `testImplementation`. This JAR file doesn't resolve to
// the @aar type in `implementation`. This works when invoked via `gradle`, but also sets the
// correct runtime classpath when invoked with Android Studio's built-in JUnit test runner.
// Success!
jnaForTest
}
cargo {
// The directory of the Cargo.toml to build.
module = '..'
// The Android NDK API level to target.
apiLevel = 21
// Where Cargo writes its outputs.
targetDirectory = '../../../target'
libname = 'lockbox'
// The Cargo targets to invoke. The mapping from short name to target
// triple is defined by the `rust-android-gradle` plugin.
targets = rootProject.ext.rustTargets
// Perform release builds (which should have debug info, due to
// `debug = true` in Cargo.toml).
profile = "release"
exec = rootProject.ext.cargoExecWithSQLCipher
extraCargoBuildArguments = rootProject.ext.extraCargoBuildArguments
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
jnaForTest "net.java.dev.jna:jna:$jna_version@jar"
}
afterEvaluate {
// The `cargoBuild` task isn't available until after evaluation.
android.libraryVariants.all { variant ->
def productFlavor = ""
variant.productFlavors.each {
productFlavor += "${it.name.capitalize()}"
}
def buildType = "${variant.buildType.name.capitalize()}"
tasks["merge${productFlavor}${buildType}JniLibFolders"].dependsOn(tasks["cargoBuild"])
}
}
apply from: "$rootDir/publish.gradle"
ext.configurePublish(
/* jnaForTestConfiguration= */ configurations.jnaForTest,
)

Просмотреть файл

@ -1,247 +0,0 @@
<licenses>
<!--
Binary distributions of this software incorporate code from a number of third-party dependencies.
These dependencies are available under a variety of free and open source licenses,
the details of which are reproduced below.
-->
<license>
<name>Mozilla Public License 2.0: NSPR</name>
<url>https://hg.mozilla.org/projects/nspr/raw-file/tip/LICENSE</url>
</license>
<license>
<name>Mozilla Public License 2.0: NSS</name>
<url>https://hg.mozilla.org/projects/nss/raw-file/tip/COPYING</url>
</license>
<license>
<name>Mozilla Public License 2.0: ece</name>
<url>https://github.com/mozilla/rust-ece/blob/master/LICENSE</url>
</license>
<license>
<name>Mozilla Public License 2.0: hawk</name>
<url>https://github.com/taskcluster/rust-hawk/blob/master/LICENSE</url>
</license>
<license>
<name>Apache License 2.0: ahash</name>
<url>https://github.com/tkaitchuck/ahash/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: anyhow</name>
<url>https://github.com/dtolnay/anyhow/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: base64</name>
<url>https://github.com/marshallpierce/rust-base64/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: bitflags</name>
<url>https://github.com/bitflags/bitflags/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: cc</name>
<url>https://github.com/alexcrichton/cc-rs/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: cfg-if</name>
<url>https://github.com/alexcrichton/cfg-if/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: either</name>
<url>https://github.com/bluss/either/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: fallible-iterator</name>
<url>https://github.com/sfackler/rust-fallible-iterator/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: fallible-streaming-iterator</name>
<url>https://github.com/sfackler/fallible-streaming-iterator/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: ffi-support</name>
<url>https://raw.githubusercontent.com/mozilla/application-services/main/components/support/ffi/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: getrandom</name>
<url>https://github.com/rust-random/getrandom/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: hashbrown</name>
<url>https://github.com/rust-lang/hashbrown/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: hashlink</name>
<url>https://github.com/kyren/hashlink/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: hex</name>
<url>https://github.com/KokaKiwi/rust-hex/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: idna</name>
<url>https://github.com/servo/rust-url/blob//master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: itertools</name>
<url>https://github.com/bluss/rust-itertools/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: itoa</name>
<url>https://github.com/dtolnay/itoa/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: jna</name>
<url>https://github.com/java-native-access/jna/blob/master/AL2.0</url>
</license>
<license>
<name>Apache License 2.0: lazy_static</name>
<url>https://github.com/rust-lang-nursery/lazy-static.rs/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: libc</name>
<url>https://github.com/rust-lang/libc/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: log</name>
<url>https://github.com/rust-lang/log/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: once_cell</name>
<url>https://github.com/matklad/once_cell/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: percent-encoding</name>
<url>https://github.com/servo/rust-url/blob//master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: pkg-config</name>
<url>https://github.com/rust-lang/pkg-config-rs/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: ppv-lite86</name>
<url>https://github.com/cryptocorrosion/cryptocorrosion/blob/master/utils-simd/ppv-lite86/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: proc-macro2</name>
<url>https://github.com/alexcrichton/proc-macro2/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: prost</name>
<url>https://github.com/danburkert/prost/blob/master/LICENSE</url>
</license>
<license>
<name>Apache License 2.0: prost-derive</name>
<url>https://github.com/danburkert/prost/blob/master/LICENSE</url>
</license>
<license>
<name>Apache License 2.0: quote</name>
<url>https://github.com/dtolnay/quote/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: rand</name>
<url>https://github.com/rust-random/rand/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: rand_chacha</name>
<url>https://github.com/rust-random/rand/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: rand_core</name>
<url>https://github.com/rust-random/rand/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: ryu</name>
<url>https://github.com/dtolnay/ryu/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: serde</name>
<url>https://github.com/serde-rs/serde/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: serde_derive</name>
<url>https://github.com/serde-rs/serde/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: serde_json</name>
<url>https://github.com/serde-rs/json/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: smallvec</name>
<url>https://github.com/servo/rust-smallvec/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: syn</name>
<url>https://github.com/dtolnay/syn/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: thiserror</name>
<url>https://github.com/dtolnay/thiserror/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: thiserror-impl</name>
<url>https://github.com/dtolnay/thiserror/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: tinyvec</name>
<url>https://github.com/Lokathor/tinyvec/blob/main/LICENSE-ZLIB.md</url>
</license>
<license>
<name>Apache License 2.0: unicode-bidi</name>
<url>https://github.com/servo/unicode-bidi/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: unicode-normalization</name>
<url>https://github.com/unicode-rs/unicode-normalization/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: unicode-xid</name>
<url>https://github.com/unicode-rs/unicode-xid/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: url</name>
<url>https://github.com/servo/rust-url/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>MIT License: byteorder</name>
<url>https://github.com/BurntSushi/byteorder/blob/master/LICENSE-MIT</url>
</license>
<license>
<name>MIT License: memchr</name>
<url>https://github.com/BurntSushi/rust-memchr/blob/master/LICENSE-MIT</url>
</license>
<license>
<name>MIT License: bytes</name>
<url>https://github.com/tokio-rs/bytes/blob/master/LICENSE</url>
</license>
<license>
<name>MIT License: libsqlite3-sys</name>
<url>https://github.com/rusqlite/rusqlite/blob/master/LICENSE</url>
</license>
<license>
<name>MIT License: rusqlite</name>
<url>https://github.com/rusqlite/rusqlite/blob/master/LICENSE</url>
</license>
<license>
<name>MIT License: matches</name>
<url>https://github.com/SimonSapin/rust-std-candidates/blob/master/LICENSE</url>
</license>
<license>
<name>CC0-1.0 License: base16</name>
<url>https://github.com/thomcc/rust-base16/blob/master/LICENSE-CC0</url>
</license>
<license>
<name>ISC License: ring</name>
<url>https://github.com/briansmith/ring/blob/master/LICENSE</url>
</license>
<license>
<name>BSD-3-Clause License: protobuf</name>
<url>https://github.com/protocolbuffers/protobuf/blob/master/LICENSE</url>
</license>
<license>
<name>BSD-3-Clause License: sqlcipher</name>
<url>https://github.com/sqlcipher/sqlcipher/blob/master/LICENSE</url>
</license>
<license>
<name>Optional Notice: SQLite</name>
<url>https://sqlite.org/copyright.html</url>
</license>
</licenses>

Просмотреть файл

@ -1,2 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mozilla.appservices.lockbox_megazord" />

Просмотреть файл

@ -1,17 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package mozilla.appservices
import org.mozilla.appservices.lockbox_megazord.BuildConfig
class Megazord {
companion object {
@JvmStatic
fun init() {
System.setProperty("mozilla.appservices.megazord.library", "lockbox")
System.setProperty("mozilla.appservices.megazord.version", BuildConfig.LIBRARY_VERSION)
}
}
}

Просмотреть файл

@ -1,11 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![allow(unknown_lints)]
#![warn(rust_2018_idioms)]
pub use fxaclient_ffi;
pub use logins_ffi;
pub use rc_log_ffi;
pub use viaduct;

Просмотреть файл

@ -8,6 +8,3 @@ python3 ./tools/dependency_summary.py --all-ios-targets --package megazord_ios >
python3 ./tools/dependency_summary.py --all-android-targets --package megazord > megazords/full/DEPENDENCIES.md
python3 ./tools/dependency_summary.py --all-android-targets --package megazord --format pom > megazords/full/android/dependency-licenses.xml
python3 ./tools/dependency_summary.py --all-android-targets --package lockbox > megazords/lockbox/DEPENDENCIES.md
python3 ./tools/dependency_summary.py --all-android-targets --package lockbox --format pom > megazords/lockbox/android/dependency-licenses.xml