зеркало из https://github.com/mozilla/glean.git
Enable native building & testing on Apple M1 machines
Updating robolectric to 4.7, which brings M1 support (by providing its own SQLite). Updating rust-android-gradle to 0.9.1, which supports the difference between Darwin x86_64 and Darwin aarch64.
This commit is contained in:
Родитель
d6fcde322a
Коммит
f0c6eef879
|
@ -19,8 +19,8 @@ buildscript {
|
|||
mockito: '3.11.2', // This is different than a-c, but we're fine, it's only tests.
|
||||
mockwebserver: '4.9.1', // This is different than a-c, but we're fine, it's only tests.
|
||||
kotlin: '1.5.20',
|
||||
robolectric: '4.5.1', // This is different than a-c, but we're fine, it's only tests.
|
||||
rust_android_plugin: '0.9.0',
|
||||
robolectric: '4.7.3', // This is different than a-c, but we're fine, it's only tests.
|
||||
rust_android_plugin: '0.9.1',
|
||||
|
||||
// Android X dependencies
|
||||
androidx_annotation: '1.1.0',
|
||||
|
@ -128,8 +128,10 @@ ext.rustTargets = [
|
|||
switch (DefaultPlatform.RESOURCE_PREFIX) {
|
||||
case 'darwin':
|
||||
case 'darwin-x86-64':
|
||||
ext.nativeRustTarget = 'darwin-x86-64'
|
||||
break
|
||||
case 'darwin-aarch64':
|
||||
ext.nativeRustTarget = 'darwin'
|
||||
ext.nativeRustTarget = 'darwin-aarch64'
|
||||
break
|
||||
case 'linux-x86-64':
|
||||
ext.nativeRustTarget = 'linux-x86-64'
|
||||
|
|
|
@ -201,8 +201,7 @@ afterEvaluate {
|
|||
}
|
||||
|
||||
def buildType = "${variant.buildType.name.capitalize()}"
|
||||
def nativeCargoBuildTask = "cargoBuild${rootProject.ext.nativeRustTarget.capitalize()}"
|
||||
tasks["process${productFlavor}${buildType}UnitTestJavaRes"].dependsOn(project(':glean-native').tasks[nativeCargoBuildTask])
|
||||
tasks["process${productFlavor}${buildType}UnitTestJavaRes"].dependsOn(project(':glean-native').tasks["cargoBuild"])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче