-
Notifications
You must be signed in to change notification settings - Fork 258
Update android dependencies [ci full] #4345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,22 +3,27 @@ | |
| buildscript { | ||
|
|
||
| ext { | ||
| kotlin_version = '1.3.71' | ||
| kotlin_coroutines_version = '1.4.2' | ||
| jna_version = '5.6.0' | ||
| android_gradle_plugin_version = '4.0.1' | ||
| android_components_version = '75.0.0' | ||
| kotlin_version = '1.5.20' | ||
| kotlin_coroutines_version = '1.5.0' | ||
| jna_version = '5.8.0' | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By the way, this version of JNA seems to fix the struct-padding bug from mozilla/uniffi-rs#334 \o/ |
||
| android_gradle_plugin_version = '4.2.2' | ||
| android_components_version = '91.0.3' | ||
| androidx_annotation_version = '1.2.0' | ||
| androidx_core_version = '1.3.2' | ||
| androidx_test_core_version = '1.3.0' | ||
| androidx_test_junit_version = '1.1.2' | ||
| androidx_work_testing_version = '2.5.0' | ||
| androidx_test_runner_version = '1.3.0' | ||
| detekt_version = '1.17.1' | ||
| gradle_download_task_version = '3.4.3' | ||
| junit_version = '4.13' | ||
| maven_publish_version = '3.6.2' | ||
| mockito_core_version = '2.24.5' | ||
| roboelectric_core_version = '4.3.1' | ||
| android_test_runner_version = '1.0.2' | ||
| espresso_core_version = '3.0.2' | ||
| rust_android_gradle_version = '0.8.3' | ||
| espresso_core_version = '3.3.0' | ||
| protobuf_version = '3.11.4' | ||
| gradle_protobuf_version = '0.8.14' | ||
| } | ||
|
|
||
| ext.build = [ | ||
|
|
@@ -49,20 +54,21 @@ buildscript { | |
|
|
||
| dependencies { | ||
| classpath "com.android.tools.build:gradle:$android_gradle_plugin_version" | ||
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH I'm not sure why things were working without this on our classpath, maybe we were just always using the "system" version of kotlin? |
||
|
|
||
| // Publish. | ||
| classpath 'digital.wup:android-maven-publish:3.6.2' | ||
| classpath "digital.wup:android-maven-publish:$maven_publish_version" | ||
|
|
||
| classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3' | ||
| classpath "gradle.plugin.org.mozilla.rust-android-gradle:plugin:$rust_android_gradle_version" | ||
|
|
||
| // Yes, this is unusual. We want to access some host-specific | ||
| // computation at build time. | ||
| classpath "net.java.dev.jna:jna:$jna_version" | ||
|
|
||
| // Downloading libs/ archives from Taskcluster. | ||
| classpath 'de.undercouch:gradle-download-task:3.4.3' | ||
| classpath "de.undercouch:gradle-download-task:$gradle_download_task_version" | ||
|
|
||
| classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.14' | ||
| classpath "com.google.protobuf:protobuf-gradle-plugin:$gradle_protobuf_version" | ||
|
|
||
| // Since the Glean version depends on the Android components version, | ||
| // it is very important to use a modern version of Glean and, ideally, | ||
|
|
@@ -75,7 +81,7 @@ buildscript { | |
| } | ||
|
|
||
| plugins { | ||
| id "io.gitlab.arturbosch.detekt" version "1.7.4" | ||
| id "io.gitlab.arturbosch.detekt" version "$detekt_version" | ||
| } | ||
|
|
||
| apply plugin: 'de.undercouch.download' | ||
|
|
@@ -138,6 +144,7 @@ if (useDownloadedLibs) { | |
| src { | ||
| switch (DefaultPlatform.RESOURCE_PREFIX) { | ||
| case 'darwin': | ||
| case 'darwin-x86-64': | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name of the platform has changed in the latest release of JNA, for reasons to do with the M1 arm64 silicon stuff. |
||
| return "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.application-services.build.libs.desktop.macos.${rootProject.ext.libsGitSha}/artifacts/public/build/macos.tar.gz" | ||
| case 'linux-x86-64': | ||
| return "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.application-services.build.libs.desktop.linux.${rootProject.ext.libsGitSha}/artifacts/public/build/linux.tar.gz" | ||
|
|
@@ -154,6 +161,7 @@ if (useDownloadedLibs) { | |
| dest { | ||
| switch (DefaultPlatform.RESOURCE_PREFIX) { | ||
| case 'darwin': | ||
| case 'darwin-x86-64': | ||
| return new File(buildDir, "libs.desktop.macos.${rootProject.ext.libsGitSha}.tar.gz") | ||
| case 'linux-x86-64': | ||
| return new File(buildDir, "libs.desktop.linux.${rootProject.ext.libsGitSha}.tar.gz") | ||
|
|
@@ -220,6 +228,7 @@ ext.rustTargets = [ | |
| // Generate libs for our current platform so we can run unit tests. | ||
| switch (DefaultPlatform.RESOURCE_PREFIX) { | ||
| case 'darwin': | ||
| case 'darwin-x86-64': | ||
| ext.nativeRustTarget = 'darwin' | ||
| break | ||
| case 'linux-x86-64': | ||
|
|
@@ -277,7 +286,7 @@ ext.cargoExecWithSQLCipher = { spec, toolchain -> | |
| } | ||
|
|
||
| detekt { | ||
| toolVersion = "1.7.4" | ||
| toolVersion = "$detekt_version" | ||
| input = files( | ||
| fileTree(dir: "${projectDir}/components", excludes: ["external", "**/generated"]), | ||
| "${projectDir}/gradle-plugin", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,7 +126,7 @@ interface VariablesWithContext : Variables { | |
| // defaults from manifest information. | ||
| fun asText(res: Int) = context.getString(res) | ||
| fun asDrawable(res: Int) = context.getDrawable(res) | ||
| fun asText(string: String) = asStringResource(string)?.let(this::asText) ?: string | ||
| fun asText(string: String): String? = asStringResource(string)?.let(this::asText) ?: string | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the magic sauce necessary to avoid a recursion error in Kotlin's type resolution. |
||
| fun asStringResource(string: String) = context.getResource(string, "string") | ||
| fun asDrawableResource(string: String) = context.getResource(string, "drawable") | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -540,24 +540,24 @@ open class Nimbus( | |
| enrollmentChangeEvents.forEach { event -> | ||
| when (event.change) { | ||
| EnrollmentChangeEventType.ENROLLMENT -> { | ||
| NimbusEvents.enrollment.record(mapOf( | ||
| NimbusEvents.enrollmentKeys.experiment to event.experimentSlug, | ||
| NimbusEvents.enrollmentKeys.branch to event.branchSlug, | ||
| NimbusEvents.enrollmentKeys.enrollmentId to event.enrollmentId | ||
| NimbusEvents.enrollment.record(NimbusEvents.EnrollmentExtra( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The previous Glean recording API is deprecated, and there's a new more strongly-typed one documented here. |
||
| experiment = event.experimentSlug, | ||
| branch = event.branchSlug, | ||
| enrollmentId = event.enrollmentId | ||
| )) | ||
| } | ||
| EnrollmentChangeEventType.DISQUALIFICATION -> { | ||
| NimbusEvents.disqualification.record(mapOf( | ||
| NimbusEvents.disqualificationKeys.experiment to event.experimentSlug, | ||
| NimbusEvents.disqualificationKeys.branch to event.branchSlug, | ||
| NimbusEvents.disqualificationKeys.enrollmentId to event.enrollmentId | ||
| NimbusEvents.disqualification.record(NimbusEvents.DisqualificationExtra( | ||
| experiment = event.experimentSlug, | ||
| branch = event.branchSlug, | ||
| enrollmentId = event.enrollmentId | ||
| )) | ||
| } | ||
| EnrollmentChangeEventType.UNENROLLMENT -> { | ||
| NimbusEvents.unenrollment.record(mapOf( | ||
| NimbusEvents.unenrollmentKeys.experiment to event.experimentSlug, | ||
| NimbusEvents.unenrollmentKeys.branch to event.branchSlug, | ||
| NimbusEvents.unenrollmentKeys.enrollmentId to event.enrollmentId | ||
| NimbusEvents.unenrollment.record(NimbusEvents.UnenrollmentExtra( | ||
| experiment = event.experimentSlug, | ||
| branch = event.branchSlug, | ||
| enrollmentId = event.enrollmentId | ||
| )) | ||
| } | ||
| } | ||
|
|
@@ -578,10 +578,10 @@ open class Nimbus( | |
| internal fun recordExposureOnThisThread(featureId: String) = withCatchAll { | ||
| val activeExperiments = getActiveExperiments() | ||
| activeExperiments.find { it.featureIds.contains(featureId) }?.also { experiment -> | ||
| NimbusEvents.exposure.record(mapOf( | ||
| NimbusEvents.exposureKeys.experiment to experiment.slug, | ||
| NimbusEvents.exposureKeys.branch to experiment.branchSlug, | ||
| NimbusEvents.exposureKeys.enrollmentId to experiment.enrollmentId | ||
| NimbusEvents.exposure.record(NimbusEvents.ExposureExtra( | ||
| experiment = experiment.slug, | ||
| branch = experiment.branchSlug, | ||
| enrollmentId = experiment.enrollmentId | ||
| )) | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were newly triggering some
detektfailures. I've disabled the ones that are disabled in a-c, and fixed the others.