-
Notifications
You must be signed in to change notification settings - Fork 521
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
Prototype Multiple Classrooms UI #5424
Prototype Multiple Classrooms UI #5424
Conversation
This moves the codebase to using the recommended single top-level Dagger library rather than replicating it in a bunch of different places.
This is needed for downstream work. It also includes ensuring that Guava JRE can never be used (since only Android should ever be referenced by the production app build).
There's some cleanup work needed beyond this, but this is the core change to introduce Kotlin 1.6 support (at least for dev builds). Moshi needed to be upgraded due to a metadata incompatibility when moving over to Kotlin 1.6.
rules_kotlin moved its imports into more structured bzl files to load, so this updates all references in the codebase to point to the correct locations (which removes debug warnings that show up on the CLI).
Moshi 1.14 pulls in kotlin-reflect 1.7.0 which isn't compatible with the rules_kotlin version we need for Bazel 4.x. Relatedly, this downgrades rules_kotlin to 1.5.0, but it fortunately keeps all other changes needed for 1.7.1 (which will be used in a later PR). Some code fixes were needed, too, for unknown reasons (since the build should've been using Kotlin 1.6 before). Either way, these fixes seem reasonable.
Fixed all warnings that the compiler warned about. Removed ViewModelProvider & fixed state leaking entirely by moving away from Jetpack's ViewModel as a base class (since we aren't correctly using that correctly).
Enables Java warnings-as-errors, though this doesn't yet apply to kapt-generated code (such as the code from Dagger), but those warnings were still manually fixed. This also fixes a small import warning in a proto file, and warnings when building oppia_dev_kitkat (by updating the main dex list, but it's likely the build doesn't work anymore, anyway, and it's hard to test locally).
There's a race condition when building large numbers of app tests simultaneously that can lead to build failures. While the CI runs are resilient now to this failure, it'd be better to try and fix it. This removes the last non-AndroidX dependency from the codebase with hopes that it helps reduce the likelihood of the error (though there are no dependencies on it, so it's unlikely).
Conflicts: WORKSPACE app/build.gradle app/src/main/java/org/oppia/android/app/viewmodel/ViewModelBridgeFactory.kt config/proguard/kotlin-proguard-rules.pro domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/AnalyticsController.kt scripts/assets/maven_dependencies.textproto scripts/src/java/org/oppia/android/scripts/common/BUILD.bazel scripts/src/java/org/oppia/android/scripts/common/CommandExecutorImpl.kt scripts/src/java/org/oppia/android/scripts/license/MavenDependenciesRetriever.kt scripts/src/java/org/oppia/android/scripts/maven/model/MavenListDependencies.kt scripts/src/java/org/oppia/android/scripts/maven/model/MavenListDependency.kt scripts/src/java/org/oppia/android/scripts/maven/model/MavenListDependencyTree.kt third_party/BUILD.bazel third_party/maven_install.json third_party/versions.bzl tools/kotlin/BUILD.bazel utility/build.gradle utility/src/main/java/org/oppia/android/util/parser/image/UrlImageParser.kt
Conflicts: build.gradle data/build.gradle domain/build.gradle third_party/maven_install.json
…l-and-kotlin Conflicts: WORKSPACE app/BUILD.bazel app/src/main/java/org/oppia/android/app/activity/route/BUILD.bazel app/src/main/java/org/oppia/android/app/application/BUILD.bazel app/src/main/java/org/oppia/android/app/application/alpha/BUILD.bazel app/src/main/java/org/oppia/android/app/application/alphakenya/BUILD.bazel app/src/main/java/org/oppia/android/app/application/beta/BUILD.bazel app/src/main/java/org/oppia/android/app/application/dev/BUILD.bazel app/src/main/java/org/oppia/android/app/application/ga/BUILD.bazel app/src/main/java/org/oppia/android/app/application/testing/BUILD.bazel app/src/main/java/org/oppia/android/app/notice/testing/BUILD.bazel app/src/main/java/org/oppia/android/app/player/exploration/testing/BUILD.bazel app/src/main/java/org/oppia/android/app/shim/BUILD.bazel app/src/main/java/org/oppia/android/app/translation/BUILD.bazel app/src/main/java/org/oppia/android/app/translation/testing/BUILD.bazel app/src/main/java/org/oppia/android/app/utility/datetime/BUILD.bazel app/src/main/java/org/oppia/android/app/utility/lifecycle/BUILD.bazel app/src/main/java/org/oppia/android/app/utility/math/BUILD.bazel app/src/sharedTest/java/org/oppia/android/app/administratorcontrols/learneranalytics/BUILD.bazel app/src/sharedTest/java/org/oppia/android/app/customview/interaction/BUILD.bazel app/src/sharedTest/java/org/oppia/android/app/databinding/BUILD.bazel app/src/sharedTest/java/org/oppia/android/app/devoptions/mathexpressionparser/BUILD.bazel app/src/sharedTest/java/org/oppia/android/app/notice/BUILD.bazel app/src/sharedTest/java/org/oppia/android/app/player/exploration/BUILD.bazel app/src/sharedTest/java/org/oppia/android/app/player/state/BUILD.bazel app/src/sharedTest/java/org/oppia/android/app/splash/BUILD.bazel app/src/test/java/org/oppia/android/app/activity/BUILD.bazel app/src/test/java/org/oppia/android/app/activity/route/BUILD.bazel app/src/test/java/org/oppia/android/app/application/alpha/BUILD.bazel app/src/test/java/org/oppia/android/app/application/beta/BUILD.bazel app/src/test/java/org/oppia/android/app/application/dev/BUILD.bazel app/src/test/java/org/oppia/android/app/application/ga/BUILD.bazel app/src/test/java/org/oppia/android/app/application/testing/BUILD.bazel app/src/test/java/org/oppia/android/app/testing/activity/BUILD.bazel app/src/test/java/org/oppia/android/app/translation/BUILD.bazel app/src/test/java/org/oppia/android/app/translation/testing/BUILD.bazel app/src/test/java/org/oppia/android/app/utility/math/BUILD.bazel config/proguard/kotlin-proguard-rules.pro data/BUILD.bazel data/build.gradle data/src/main/java/org/oppia/android/data/backends/gae/BUILD.bazel data/src/main/java/org/oppia/android/data/backends/gae/api/BUILD.bazel data/src/main/java/org/oppia/android/data/backends/gae/model/BUILD.bazel data/src/main/java/org/oppia/android/data/persistence/BUILD.bazel data/src/test/java/org/oppia/android/data/persistence/BUILD.bazel domain/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/algebraicexpressioninput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/continueinteraction/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/dragAndDropSortInput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/fractioninput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/imageClickInput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/itemselectioninput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/mathequationinput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/multiplechoiceinput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/numberwithunits/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/numericexpressioninput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/numericinput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/ratioinput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/classify/rules/textinput/BUILD.bazel domain/src/main/java/org/oppia/android/domain/clipboard/BUILD.bazel domain/src/main/java/org/oppia/android/domain/exploration/testing/BUILD.bazel domain/src/main/java/org/oppia/android/domain/feedbackreporting/BUILD.bazel domain/src/main/java/org/oppia/android/domain/locale/BUILD.bazel domain/src/main/java/org/oppia/android/domain/onboarding/BUILD.bazel domain/src/main/java/org/oppia/android/domain/onboarding/testing/BUILD.bazel domain/src/main/java/org/oppia/android/domain/oppialogger/BUILD.bazel domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/testing/BUILD.bazel domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions/BUILD.bazel domain/src/main/java/org/oppia/android/domain/oppialogger/logscheduler/BUILD.bazel domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/BUILD.bazel domain/src/main/java/org/oppia/android/domain/profile/BUILD.bazel domain/src/main/java/org/oppia/android/domain/spotlight/BUILD.bazel domain/src/main/java/org/oppia/android/domain/testing/oppialogger/loguploader/BUILD.bazel domain/src/main/java/org/oppia/android/domain/translation/BUILD.bazel domain/src/test/java/org/oppia/android/domain/classify/rules/algebraicexpressioninput/BUILD.bazel domain/src/test/java/org/oppia/android/domain/classify/rules/mathequationinput/BUILD.bazel domain/src/test/java/org/oppia/android/domain/classify/rules/numericexpressioninput/BUILD.bazel domain/src/test/java/org/oppia/android/domain/clipboard/BUILD.bazel domain/src/test/java/org/oppia/android/domain/exploration/BUILD.bazel domain/src/test/java/org/oppia/android/domain/exploration/lightweightcheckpointing/BUILD.bazel domain/src/test/java/org/oppia/android/domain/exploration/testing/BUILD.bazel domain/src/test/java/org/oppia/android/domain/hintsandsolution/BUILD.bazel domain/src/test/java/org/oppia/android/domain/locale/BUILD.bazel domain/src/test/java/org/oppia/android/domain/onboarding/BUILD.bazel domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel domain/src/test/java/org/oppia/android/domain/oppialogger/analytics/testing/BUILD.bazel domain/src/test/java/org/oppia/android/domain/oppialogger/loguploader/BUILD.bazel domain/src/test/java/org/oppia/android/domain/question/BUILD.bazel domain/src/test/java/org/oppia/android/domain/translation/BUILD.bazel instrumentation/src/java/org/oppia/android/instrumentation/application/BUILD.bazel instrumentation/src/javatests/org/oppia/android/instrumentation/application/BUILD.bazel scripts/assets/maven_dependencies.textproto scripts/src/java/org/oppia/android/scripts/ci/ComputeAffectedTests.kt scripts/src/java/org/oppia/android/scripts/common/BUILD.bazel scripts/src/java/org/oppia/android/scripts/common/CommandExecutorImpl.kt scripts/src/java/org/oppia/android/scripts/common/GitClient.kt testing/BUILD.bazel testing/src/main/java/org/oppia/android/testing/data/BUILD.bazel testing/src/main/java/org/oppia/android/testing/espresso/BUILD.bazel testing/src/main/java/org/oppia/android/testing/logging/BUILD.bazel testing/src/main/java/org/oppia/android/testing/network/BUILD.bazel testing/src/main/java/org/oppia/android/testing/platformparameter/BUILD.bazel testing/src/main/java/org/oppia/android/testing/robolectric/BUILD.bazel testing/src/main/java/org/oppia/android/testing/threading/BUILD.bazel testing/src/main/java/org/oppia/android/testing/time/BUILD.bazel testing/src/test/java/org/oppia/android/testing/data/BUILD.bazel testing/src/test/java/org/oppia/android/testing/junit/BUILD.bazel testing/src/test/java/org/oppia/android/testing/logging/BUILD.bazel testing/src/test/java/org/oppia/android/testing/networking/BUILD.bazel testing/src/test/java/org/oppia/android/testing/threading/BUILD.bazel third_party/BUILD.bazel third_party/maven_install.json third_party/versions.bzl utility/BUILD.bazel utility/src/main/java/org/oppia/android/util/accessibility/BUILD.bazel utility/src/main/java/org/oppia/android/util/caching/BUILD.bazel utility/src/main/java/org/oppia/android/util/caching/testing/BUILD.bazel utility/src/main/java/org/oppia/android/util/data/BUILD.bazel utility/src/main/java/org/oppia/android/util/gcsresource/BUILD.bazel utility/src/main/java/org/oppia/android/util/locale/BUILD.bazel utility/src/main/java/org/oppia/android/util/locale/testing/BUILD.bazel utility/src/main/java/org/oppia/android/util/logging/BUILD.bazel utility/src/main/java/org/oppia/android/util/logging/firebase/BUILD.bazel utility/src/main/java/org/oppia/android/util/logging/performancemetrics/BUILD.bazel utility/src/main/java/org/oppia/android/util/networking/BUILD.bazel utility/src/main/java/org/oppia/android/util/parser/html/BUILD.bazel utility/src/main/java/org/oppia/android/util/parser/image/BUILD.bazel utility/src/main/java/org/oppia/android/util/profile/BUILD.bazel utility/src/main/java/org/oppia/android/util/system/BUILD.bazel utility/src/main/java/org/oppia/android/util/threading/BUILD.bazel utility/src/test/java/org/oppia/android/util/caching/BUILD.bazel utility/src/test/java/org/oppia/android/util/caching/testing/BUILD.bazel utility/src/test/java/org/oppia/android/util/data/BUILD.bazel utility/src/test/java/org/oppia/android/util/locale/BUILD.bazel utility/src/test/java/org/oppia/android/util/locale/testing/BUILD.bazel utility/src/test/java/org/oppia/android/util/logging/BUILD.bazel utility/src/test/java/org/oppia/android/util/logging/firebase/BUILD.bazel utility/src/test/java/org/oppia/android/util/logging/performancemetrics/BUILD.bazel utility/src/test/java/org/oppia/android/util/networking/BUILD.bazel utility/src/test/java/org/oppia/android/util/profile/BUILD.bazel
Specifically: - The TODO check was fixed by reformatting a TODO comment. - The Proguard build was fixed by upgrading kotlinx.coroutines to use a version compatible with Kotlin 1.6, as well as adding a Proguard dontwarn directive for one class that can't execute on Android.
Conflicts: WORKSPACE config/proguard/kotlin-proguard-rules.pro third_party/BUILD.bazel third_party/maven_install.json third_party/versions.bzl
For some reason, the old kotlinx-coroutines-test was causing a codebase-wide incompatibility with the 1.6.x kotlinx-coroutines-core library, so this updates that version. It also updates Gradle dependencies for consistency, and to fix the Gradle builds. And, this fixes the IntelliJ Bazel plugin syncing issue when using kt_jvm_import (for kotlinx-coroutines-core-jvm).
This is to ensure Jetpack Compose compatibility.
Conflicts: third_party/maven_install.json
…l-and-kotlin Conflicts: third_party/maven_install.json
Aliases are cleaner and possibly more performant, but also more semantically correct than using wrapper libraries. Wrappers are now only used when actually needed (due to additional functionality or multiple targets being combined together).
…se-bazel-kt1.6 Conflicts: third_party/maven_install.json
…port' into feat/multiple-classrooms-ui-support Pull the model and domain related code
… into feat/multiple-classrooms-ui-support Fetch compose prototype on bazel
…port' into feat/multiple-classrooms-ui-support Merge controller changes
…port' into feat/multiple-classrooms-ui-support
…port' into feat/multiple-classrooms-ui-support
…port' into feat/multiple-classrooms-ui-support
APK & AAB differences analysisNote that this is a summarized snapshot. See the CI artifacts for detailed differences. DevExpand to see flavor specificsUniversal APKAPK file size: 16 MiB (old), 18 MiB (new), 2536 KiB (Added) APK download size (estimated): 14 MiB (old), 17 MiB (new), 2540 KiB (Added) Method count: 222364 (old), 252688 (new), 30324 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 6550 (old), 6549 (new), 1 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 15 MiB (old), 18 MiB (new), 2593 KiB (Added)
Configuration hdpiAPK file size: 59 KiB (old), 49 KiB (new), 10 KiB (Removed)
Configuration ldpiAPK file size: 56 KiB (old), 48 KiB (new), 8868 bytes (Removed)
Configuration mdpiAPK file size: 53 KiB (old), 45 KiB (new), 8832 bytes (Removed)
Configuration tvdpiAPK file size: 102 KiB (old), 84 KiB (new), 18 KiB (Removed)
Configuration xhdpiAPK file size: 67 KiB (old), 56 KiB (new), 11 KiB (Removed)
Configuration xxhdpiAPK file size: 76 KiB (old), 62 KiB (new), 14 KiB (Removed)
Configuration xxxhdpiAPK file size: 79 KiB (old), 62 KiB (new), 16 KiB (Removed)
AlphaExpand to see flavor specificsUniversal APKAPK file size: 10 MiB (old), 10 MiB (new), 852 KiB (Added) APK download size (estimated): 9153 KiB (old), 9 MiB (new), 859 KiB (Added) Method count: 99462 (old), 112334 (new), 12872 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5503 (new), 1 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 10 MiB (new), 909 KiB (Added)
Configuration hdpiAPK file size: 52 KiB (old), 42 KiB (new), 10 KiB (Removed)
Configuration ldpiAPK file size: 52 KiB (old), 43 KiB (new), 8900 bytes (Removed)
Configuration mdpiAPK file size: 46 KiB (old), 37 KiB (new), 8828 bytes (Removed)
Configuration tvdpiAPK file size: 90 KiB (old), 72 KiB (new), 18 KiB (Removed)
Configuration xhdpiAPK file size: 60 KiB (old), 49 KiB (new), 11 KiB (Removed)
Configuration xxhdpiAPK file size: 69 KiB (old), 54 KiB (new), 14 KiB (Removed)
Configuration xxxhdpiAPK file size: 71 KiB (old), 55 KiB (new), 16 KiB (Removed)
BetaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 10 MiB (new), 850 KiB (Added) APK download size (estimated): 9140 KiB (old), 9 MiB (new), 858 KiB (Added) Method count: 99462 (old), 112340 (new), 12878 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5503 (new), 1 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 10 MiB (new), 907 KiB (Added)
Configuration hdpiAPK file size: 52 KiB (old), 42 KiB (new), 10 KiB (Removed)
Configuration ldpiAPK file size: 52 KiB (old), 43 KiB (new), 8900 bytes (Removed)
Configuration mdpiAPK file size: 46 KiB (old), 37 KiB (new), 8828 bytes (Removed)
Configuration tvdpiAPK file size: 90 KiB (old), 72 KiB (new), 18 KiB (Removed)
Configuration xhdpiAPK file size: 60 KiB (old), 49 KiB (new), 11 KiB (Removed)
Configuration xxhdpiAPK file size: 69 KiB (old), 54 KiB (new), 14 KiB (Removed)
Configuration xxxhdpiAPK file size: 71 KiB (old), 55 KiB (new), 16 KiB (Removed)
GaExpand to see flavor specificsUniversal APKAPK file size: 9 MiB (old), 10 MiB (new), 850 KiB (Added) APK download size (estimated): 9139 KiB (old), 9 MiB (new), 858 KiB (Added) Method count: 99462 (old), 112340 (new), 12878 (Added) Features: 2 (old), 2 (new), 0 (No change) Permissions: 6 (old), 6 (new), 0 (No change) Resources: 5504 (old), 5503 (new), 1 (Removed)
Lesson assets: 111 (old), 111 (new), 0 (No change) AAB differencesExpand to see AAB specificsSupported configurations:
Base APKAPK file size: 9 MiB (old), 10 MiB (new), 907 KiB (Added)
Configuration hdpiAPK file size: 52 KiB (old), 42 KiB (new), 10 KiB (Removed)
Configuration ldpiAPK file size: 52 KiB (old), 43 KiB (new), 8900 bytes (Removed)
Configuration mdpiAPK file size: 46 KiB (old), 37 KiB (new), 8828 bytes (Removed)
Configuration tvdpiAPK file size: 90 KiB (old), 72 KiB (new), 18 KiB (Removed)
Configuration xhdpiAPK file size: 60 KiB (old), 49 KiB (new), 11 KiB (Removed)
Configuration xxhdpiAPK file size: 69 KiB (old), 54 KiB (new), 14 KiB (Removed)
Configuration xxxhdpiAPK file size: 71 KiB (old), 55 KiB (new), 16 KiB (Removed)
|
Explanation
Essential Checklist
For UI-specific PRs only
If your PR includes UI-related changes, then: