Skip to content
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

Fixes part of #59: Build app module views + view models with Bazel #1581

Merged
merged 337 commits into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
337 commits
Select commit Hold shift + click to select a range
5c1b4dd
Fixed typo
miaboloix Jul 24, 2020
48eb9be
Added Firebase dependencies
miaboloix Jul 24, 2020
31eb543
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Jul 24, 2020
c466d3c
Removed AsyncResultTest example
miaboloix Jul 24, 2020
a5e9039
Removed AsynchResultTest example
miaboloix Jul 24, 2020
99d43f2
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Jul 24, 2020
75c7774
Resolved merge conflicts
miaboloix Jul 24, 2020
b6240df
Firebase dependencies added
miaboloix Jul 24, 2020
336237b
Resolve merge conflicts
miaboloix Jul 24, 2020
8d6b28f
Removed unnecessary comments in WORKSPACE and moved rules_kotlin
miaboloix Jul 27, 2020
d712b5e
Added re-naming TODOs
miaboloix Jul 27, 2020
3105144
Renamed java_proto rules java_proto_lite
miaboloix Jul 27, 2020
2f50207
Added doc comments to model/BUILD.bazel and format_import_proto_library
miaboloix Jul 27, 2020
323a0cb
Added comments to WORKSPACE file
miaboloix Jul 27, 2020
7ce51a9
Merge branch 'stage1_bazel' of https://github.com/oppia/oppia-android…
miaboloix Jul 27, 2020
d87c95c
Fixed nits
miaboloix Jul 27, 2020
20d2c5d
Added comment to kt_android_library() rule
miaboloix Jul 27, 2020
9857eaf
Fixed more nits
miaboloix Jul 27, 2020
1a35aad
Fixed merge conflicts
miaboloix Jul 27, 2020
522993f
Added Firebase comment
miaboloix Jul 27, 2020
f5abd8e
Fixed merge conflicts
miaboloix Jul 27, 2020
dfa8e0b
Fixed merge conflicts and nits
miaboloix Jul 27, 2020
9789204
Deleted unused dependencies from testing_main_lib
miaboloix Jul 27, 2020
41d5ed1
Fixed merge conflicts
miaboloix Jul 27, 2020
ec75eda
Fixed nits and error with testing lib dependencies
miaboloix Jul 27, 2020
d8f54a7
Merge branch 'introduce-bazel-roboelectric-testing' of https://github…
miaboloix Jul 27, 2020
f9ac84f
Removed printStackTrace()
miaboloix Jul 27, 2020
a7c6a53
Removed addressed TODOs, all tests pass
miaboloix Jul 27, 2020
b618e18
Removed redundant public modifier
miaboloix Jul 27, 2020
364435d
Changed library name to model
miaboloix Jul 28, 2020
7e61655
Formatted WORKSPACE comment
miaboloix Jul 28, 2020
9773e66
Formatted TODO statement
miaboloix Jul 28, 2020
9fc0d53
Changed format_import_proto_library comment
miaboloix Jul 28, 2020
fdcb154
Added EOF newline
miaboloix Jul 28, 2020
8185bdd
Created Issue and linked TODO in WORKSPACE
miaboloix Jul 28, 2020
3d21d6f
Edited model BUILD file top comment
miaboloix Jul 28, 2020
8e368b4
Addressed nits
miaboloix Jul 28, 2020
29f19dd
Fixed merge conflicts
miaboloix Jul 28, 2020
af7832b
Fixed nits and added comments
miaboloix Jul 28, 2020
8fb1541
Fixing nits
miaboloix Jul 28, 2020
2b9d7c6
Deleted unnecessary dependencies and testing example file
miaboloix Jul 28, 2020
980ca88
Fixed manifest issues
miaboloix Jul 28, 2020
a63ad7f
Move google json file
miaboloix Jul 28, 2020
fff3d89
Restore app version of json
miaboloix Jul 28, 2020
54a7728
Merge branch 'test-git-copy' into stage1_bazel_utility
miaboloix Jul 28, 2020
c7cad13
Edit TODO
miaboloix Jul 28, 2020
654328e
Deleted TODO
miaboloix Jul 28, 2020
a842aec
Changed Firebase comment
miaboloix Jul 28, 2020
146f48a
Fixed merge conflicts
miaboloix Jul 28, 2020
9360972
Added testing functionality from later PR
miaboloix Jul 29, 2020
705d195
Added comments to bzl files
miaboloix Jul 29, 2020
2b7be73
Added targetSDK to manifests
miaboloix Jul 29, 2020
0621744
Changed crashlytics_lib to crashlytics
miaboloix Jul 29, 2020
54ec7fb
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Jul 29, 2020
af931e9
Changed testing_tests visibility
miaboloix Jul 29, 2020
d5ae13c
Fixed merge conflicts
miaboloix Jul 29, 2020
4f8e77f
Added comment to utility_test.bzl
miaboloix Jul 29, 2020
0b9c14a
Changed type of comment ticks
miaboloix Jul 29, 2020
0291f7a
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Jul 29, 2020
17c92b3
Fixed typos and all tests pass
miaboloix Jul 29, 2020
fc7170f
Removed empty line
miaboloix Jul 29, 2020
acbd392
Fixed merge conflicts
miaboloix Jul 29, 2020
dc8ad13
Fixed errors from merge
miaboloix Jul 29, 2020
53828c0
Added comments to data and domain BUILD files
miaboloix Jul 29, 2020
578ef76
Fixed indentation in domain_test
miaboloix Jul 29, 2020
65eaa1d
Removed commented-out dependencies
miaboloix Jul 29, 2020
32ce87a
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Jul 29, 2020
65f13c1
Fixed nits and added TODOs
miaboloix Jul 29, 2020
b6dd154
Merge branch 'stage1_bazel' of https://github.com/oppia/oppia-android…
miaboloix Jul 29, 2020
a4ec778
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Jul 29, 2020
f466e8f
Added Args to document comment
miaboloix Jul 29, 2020
3638d43
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Jul 30, 2020
58752b4
Changed targetSDK to 29
miaboloix Jul 30, 2020
705355c
Merge branch 'stage1_bazel' of https://github.com/oppia/oppia-android…
miaboloix Jul 30, 2020
d152713
Formatted TODO
miaboloix Jul 30, 2020
fb515ec
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Jul 30, 2020
11d84f4
Fixed merge conflicts
miaboloix Jul 30, 2020
e252feb
Fixed merge conflicts
miaboloix Jul 30, 2020
01fd0c9
Added root BUILD file
miaboloix Jul 30, 2020
cc06b5a
Merge branch 'introduce-bazel-roboelectric-testing' of https://github…
miaboloix Jul 30, 2020
74e4e52
Moved google-services.json
miaboloix Jul 30, 2020
0c9d197
Added gogle-services.json back to app
miaboloix Jul 30, 2020
72e0acd
Trying to remove combined testing library
miaboloix Jul 31, 2020
0aa646d
Changed targetSDK to 29
miaboloix Aug 3, 2020
7660d7d
Tests pass now with deps passed in.
miaboloix Aug 3, 2020
8aa8c59
Created TEST_DEPS list to avoid duplicate list of dependencies
miaboloix Aug 3, 2020
d4f53c4
Removed unused resources and manifest
miaboloix Aug 3, 2020
a275d9c
Updated comments to reflect changes
miaboloix Aug 3, 2020
56f0232
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Aug 3, 2020
b2b4e62
Changed deps to be a parameter, changed targetSDK back to 28 because …
miaboloix Aug 3, 2020
7043491
Fixed indentation in utility/BUILD
miaboloix Aug 3, 2020
7fa41db
Updated comment for utility_test.bzl
miaboloix Aug 3, 2020
297cfa1
Updated comment for testing_test
miaboloix Aug 3, 2020
51bcc06
Formatted dependencies and removed unused dependency
miaboloix Aug 3, 2020
ab8ea0b
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Aug 3, 2020
f906dd6
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Aug 3, 2020
fd4386f
Updated dependency list
miaboloix Aug 3, 2020
0d1bd33
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Aug 3, 2020
33d8e2a
Header for oppia_android_test now fits on one line
miaboloix Aug 3, 2020
781fe7b
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Aug 3, 2020
47e1592
Merge branch 'introduce-bazel-roboelectric-testing' of https://github…
miaboloix Aug 3, 2020
02efdca
Simplifies comment on domain/BUILD file
miaboloix Aug 3, 2020
f02a1d7
Changed cache_store to persistent_cache_store
miaboloix Aug 3, 2020
b911cc2
Removed glob() from data BUILD file
miaboloix Aug 3, 2020
1294d08
Edited documentation for oppia_android_test
miaboloix Aug 3, 2020
b0637dc
Updated documentation for utility and testing BUILD files
miaboloix Aug 3, 2020
122f451
Changed src to srcs
miaboloix Aug 3, 2020
a019e5f
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Aug 3, 2020
c45f649
Changed src to srcs
miaboloix Aug 3, 2020
e236dac
Merge branch 'introduce-bazel-roboelectric-testing' of https://github…
miaboloix Aug 3, 2020
02db08d
All dragAndDrop tests now pass, stateRetreiverTest fails
miaboloix Aug 3, 2020
425049a
Created java files for binding adapters
miaboloix Aug 5, 2020
28de63e
Translated DrawableDinsingAdapter
miaboloix Aug 5, 2020
e0b83f8
Traslated EditTextBindingAdapter
miaboloix Aug 5, 2020
c2a278f
Translated ImageViewBindingAdapters
miaboloix Aug 5, 2020
e3da795
Translated MarginBindingAdapters
miaboloix Aug 5, 2020
6ed785b
Translated TextViewBindingAdapters
miaboloix Aug 5, 2020
b98fe78
Translated RecyclerViewBindingAdapter
miaboloix Aug 5, 2020
84037cb
Deleted kotlin binding adapters
miaboloix Aug 5, 2020
ce92d0a
Translated GuidelineBindingAdapter
miaboloix Aug 5, 2020
88c9492
Translated StateAssemblerMarginBindingAdapters
miaboloix Aug 5, 2020
d66af07
Translated StateAssemblerPaddingBindingAdapters
miaboloix Aug 5, 2020
fc51d3a
Almost finished translating ViewBindingAdapter
miaboloix Aug 5, 2020
84e5051
Fixed the duplicate google-services.json issue
miaboloix Aug 6, 2020
3c0932d
Created Issue and added TODO
miaboloix Aug 6, 2020
f1f7b1d
Translated ViewBindingAdapter
miaboloix Aug 6, 2020
b5b20f9
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Aug 6, 2020
714ffa2
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Aug 6, 2020
83747a1
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Aug 6, 2020
62a2fa7
Added minSDK back
miaboloix Aug 6, 2020
8eac40c
Alphabetized dependencies
miaboloix Aug 6, 2020
48e4593
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Aug 6, 2020
9578f27
Fixed firebase target
miaboloix Aug 6, 2020
75aca29
Merge branch 'introduce-bazel-roboelectric-testing' of https://github…
miaboloix Aug 6, 2020
e72b6ef
Trying to fix StateRetreiverTest
miaboloix Aug 6, 2020
3855305
Merge branch 'introduce-domain-bazel-build' of https://github.com/opp…
miaboloix Aug 6, 2020
1a51990
Binding Adapter files are building with Gradle!
miaboloix Aug 6, 2020
dbb08ab
Fixed ktlint violation
miaboloix Aug 6, 2020
bc504b2
Merge branch 'introduce-domain-bazel-build' of https://github.com/opp…
miaboloix Aug 6, 2020
3d1d42f
Revert "Deleted kotlin binding adapters"
miaboloix Aug 7, 2020
c6d34c7
Revert "Translated GuidelineBindingAdapter"
miaboloix Aug 7, 2020
2dadc50
Revert "Translated StateAssemblerMarginBindingAdapters"
miaboloix Aug 7, 2020
b9e1283
Revert "Translated StateAssemblerPaddingBindingAdapters"
miaboloix Aug 7, 2020
39d9bce
Git mv on DrawableBindingAdapters
miaboloix Aug 7, 2020
a3a852e
Translated DrawableBindingAdapters
miaboloix Aug 7, 2020
8f16ca7
Deleted java files
miaboloix Aug 7, 2020
5ba5d0f
Translated EditTextBA and GuidelineBA
miaboloix Aug 7, 2020
af81849
Translated ImageViewBA
miaboloix Aug 7, 2020
f5c4baa
Added missing semicolon
miaboloix Aug 7, 2020
85e279c
Translated MarginBindingAdapters
miaboloix Aug 7, 2020
7de67e3
Translated State AssemblerMarginBA
miaboloix Aug 7, 2020
48ecefc
Translated StateAssemblerPaddingBA
miaboloix Aug 7, 2020
849549d
Translated TextViewBA
miaboloix Aug 7, 2020
6cfa75d
Revert "Translated TextViewBA"
miaboloix Aug 7, 2020
a1843d2
Changed targetSdk to 28
miaboloix Aug 7, 2020
29a81df
Revert "Revert "Translated TextViewBA""
miaboloix Aug 9, 2020
8c9f4b2
Fixed formatting issues and changed NotNull to NonNull
miaboloix Aug 9, 2020
4a68e95
Refactored GuidelineBindingAdapter to be GuidelineBindingAdapters
miaboloix Aug 9, 2020
0090709
Fixed some double space errors and other typos
miaboloix Aug 9, 2020
5aa364f
Added missing ViewBindingAdapter
miaboloix Aug 9, 2020
3be3193
Deleted extra spaces and fixed more nit issues
miaboloix Aug 9, 2020
766d699
Made all classes final
miaboloix Aug 9, 2020
96fbade
Added top level documentation
miaboloix Aug 9, 2020
8881d0f
Reformatted some comments to fit java style
miaboloix Aug 9, 2020
0f4ef4f
Reformatted imports
miaboloix Aug 9, 2020
0cf3415
Merge branch 'develop' into stage1_bazel_utility
miaboloix Aug 9, 2020
5f90f7b
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Aug 9, 2020
44236da
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Aug 9, 2020
00b9fb4
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Aug 9, 2020
c400b2c
Merge branch 'introduce-bazel-roboelectric-testing' of https://github…
miaboloix Aug 9, 2020
7f5deea
Created Issue and added TODOs for re-restricitng access
miaboloix Aug 9, 2020
2b1db0d
Added min and target SDK to domain manifest
miaboloix Aug 9, 2020
d0ba983
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Aug 9, 2020
ea31be3
Merge branch 'introduce-domain-bazel-build' of https://github.com/opp…
miaboloix Aug 9, 2020
3129710
Added documentation comment
miaboloix Aug 9, 2020
65e71cc
Deleted unused domain_tests library
miaboloix Aug 9, 2020
67b467d
Revert "Deleted unused domain_tests library"
miaboloix Aug 9, 2020
8c3d0f0
Removed unused domain)tests library
miaboloix Aug 9, 2020
20aae5a
Merge branch 'introduce-domain-bazel-build' of https://github.com/opp…
miaboloix Aug 9, 2020
0aa57d7
Annotations and helpers library builds
miaboloix Aug 9, 2020
78c264c
Listeners library builds
miaboloix Aug 9, 2020
985f53b
View models build
miaboloix Aug 9, 2020
0418dd6
Views now build
miaboloix Aug 9, 2020
b12e502
Added documentation comments
miaboloix Aug 9, 2020
55f9480
Started removing binding dependencies from views
miaboloix Aug 9, 2020
79ce2b7
Removed fragment imports used only for comments in order to build vie…
miaboloix Aug 9, 2020
bb4caef
Pulled binding dependenvy out of ConceptCardViewModel
miaboloix Aug 9, 2020
48490f4
Edited R import statements for Bazel to build
miaboloix Aug 9, 2020
2d8f37b
Fixed more errors, view_model builds
miaboloix Aug 9, 2020
4a91e58
Worked through more errors
miaboloix Aug 10, 2020
93337b9
Added a dependency
miaboloix Aug 10, 2020
912412b
View library builds
miaboloix Aug 10, 2020
daaaece
Ordered BUILD file for better merging
miaboloix Aug 10, 2020
d3944ed
Removed unused listeners
miaboloix Aug 10, 2020
bd34d1d
Added missing comments
miaboloix Aug 10, 2020
84b6125
Formatted files and added missing @NonNull annotations
miaboloix Aug 10, 2020
96d1b9d
Fixed ktlint errors
miaboloix Aug 10, 2020
b99d771
Revert "Formatted files and added missing @NonNull annotations"
miaboloix Aug 10, 2020
f4cd83e
Added genrule for viewmodel files
miaboloix Aug 10, 2020
5173867
Added view genrule
miaboloix Aug 10, 2020
3ff4be0
Both Bazel and Gradle are building
miaboloix Aug 10, 2020
161c679
Fixed ktlint errors
miaboloix Aug 10, 2020
7a20fe1
Delete vcs.xml
miaboloix Aug 10, 2020
4d519ba
Renamed files, deleted unused files, and added some documentation
miaboloix Aug 11, 2020
e7f8835
Merge branch 'build-app-viewmodels-bazel' of https://github.com/oppia…
miaboloix Aug 11, 2020
1bd1bd7
Improved implementation of some functions in ViewBindingShimImpl and …
miaboloix Aug 11, 2020
554c531
Fixed ktlint errors
miaboloix Aug 11, 2020
73bf270
Put genrules in a loop, created issue to remove genrules post-gradle …
miaboloix Aug 11, 2020
f4c48cb
Added more documentation, created an issue to remove shim files, adde…
miaboloix Aug 11, 2020
57a1a0f
Fixed Gradle build error
miaboloix Aug 11, 2020
2d81db0
Added documentation, created an issue, added a TODO
miaboloix Aug 11, 2020
1d94b22
Merge branch 'introduce-domain-bazel-build' of https://github.com/opp…
miaboloix Aug 11, 2020
55daaec
Formatted single line comments
miaboloix Aug 11, 2020
dfb244e
Fixing more nits
miaboloix Aug 11, 2020
bd4c9c5
Fixed more nits.
miaboloix Aug 11, 2020
e3f02a8
Fixed getTimeAgo() function
miaboloix Aug 11, 2020
9558875
Suppressed warning in bindToRecyclerViewAdapter
miaboloix Aug 11, 2020
453670c
Merge branch 'traslate-binding-adapters-to-java' of https://github.co…
miaboloix Aug 11, 2020
0b4f01a
Simplified genrule
miaboloix Aug 11, 2020
78d44c5
Alphabetized lists in app module BUILD
miaboloix Aug 11, 2020
ed46bc3
Added genrule comments, simplified gnerule targets in lists
miaboloix Aug 12, 2020
8c3808f
Fixed QuestionPlayerFragmentPresenter and StateFragmentPresenter
miaboloix Aug 12, 2020
55d15f9
Fixed QuestionPlayerViewModel & FRagmentPresenter as well as StateVie…
miaboloix Aug 12, 2020
ff97590
Fixed some nits
miaboloix Aug 12, 2020
c7e80ac
Fixed ktlint errors
miaboloix Aug 12, 2020
b16f979
Added assets
miaboloix Aug 12, 2020
db4058b
Fixed DragDrop ViewBinding implementations, added modules to TestComp…
miaboloix Aug 12, 2020
192ca34
Fix ktlint errors
miaboloix Aug 12, 2020
4e4aed7
Fixed nits in TextViewBA
miaboloix Aug 12, 2020
9bd52af
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Aug 12, 2020
78ffb0b
Testing module tests now pass, all domain tests pass except StateRetr…
miaboloix Aug 13, 2020
16e1741
Merge branch 'introduce-domain-bazel-build' of https://github.com/opp…
miaboloix Aug 13, 2020
63c71da
Merge branch 'traslate-binding-adapters-to-java' of https://github.co…
miaboloix Aug 13, 2020
37ac33c
Removed unused dependencies, aplhabetized dependencies
miaboloix Aug 13, 2020
26284cb
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Aug 17, 2020
61f93cf
Merge branch 'traslate-binding-adapters-to-java' of https://github.co…
miaboloix Aug 17, 2020
45720f9
Fixed merge errors
miaboloix Aug 17, 2020
cb04b83
Fixed nits
miaboloix Aug 17, 2020
b1b5c58
Removed unnecessary field in StateFragmentAccessibilityTest
miaboloix Aug 17, 2020
9f0818a
Fixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityT…
miaboloix Aug 17, 2020
68693cc
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Aug 17, 2020
bd14b35
Injected context in AppVersionViewModel
miaboloix Aug 18, 2020
8ae16d4
Used lambda function to resolve issues with QuestionPlayerVM and Ques…
miaboloix Aug 18, 2020
bc7147e
Fixed small errors
miaboloix Aug 18, 2020
45e8b5f
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Aug 18, 2020
f4e033c
Fixed ktlint error
miaboloix Aug 18, 2020
f2b341b
Fixed StateFragmentPresenter and view model, fixed some nits
miaboloix Aug 19, 2020
47e0e36
Fixed ktlint errors
miaboloix Aug 19, 2020
3501e1a
Fixed nits
miaboloix Aug 19, 2020
4c345db
Fixed ktlint error
miaboloix Aug 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

36 changes: 35 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,55 @@ git_repository(
load("@tools_android//tools/googleservices:defs.bzl", "google_services_workspace_dependencies")
google_services_workspace_dependencies()

git_repository(
name = "circularimageview",
commit = "6098dec76713b34eb8b10883cbe54189ddc08566",
remote = "https://github.com/oppia/CircularImageview",
)

bind(
name = "databinding_annotation_processor",
actual = "//tools/android:compiler_annotation_processor",
)

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = DAGGER_ARTIFACTS + [
"androidx.annotation:annotation:1.1.0",
"androidx.appcompat:appcompat:1.0.2",
"androidx.core:core-ktx:1.0.1",
"androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03",
"androidx.core:core:1.0.1",
"androidx.databinding:databinding-adapters:3.4.2",
"androidx.databinding:databinding-common:3.4.2",
"androidx.databinding:databinding-runtime:3.4.2",
"androidx.lifecycle:lifecycle-extensions:2.2.0",
"androidx.lifecycle:lifecycle-livedata-core:2.2.0",
"androidx.lifecycle:lifecycle-livedata-ktx:2.2.0",
"androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0",
"androidx.lifecycle:lifecycle-viewmodel-ktx:jar:2.2.0",
"androidx.multidex:multidex:2.0.1",
"androidx.multidex:multidex-instrumentation:2.0.0",
"androidx.test.ext:junit:1.1.1",
"android.arch.core:core-testing:1.1.1",
"androidx.arch.core:core-testing:2.1.0",
"androidx.constraintlayout:constraintlayout:1.1.3",
"androidx.recyclerview:recyclerview:1.0.0",
"androidx.viewpager:viewpager:1.0.0",
"com.android.support:support-annotations:28.0.0",
"com.caverock:androidsvg-aar:1.4",
"com.chaos.view:pinview:1.4.3",
"com.crashlytics.sdk.android:crashlytics:2.9.8",
"com.github.bumptech.glide:glide:4.11.0",
"com.google.firebase:firebase-analytics:17.4.4",
"com.google.firebase:firebase-crashlytics:17.1.1",
"com.google.android.material:material:1.2.0-alpha02",
"com.google.truth:truth:0.43",
"de.hdodenhof:circleimageview:3.0.1",
"io.fabric.sdk.android:fabric:1.4.7",
"javax.annotation:javax.annotation-api:jar:1.3.2",
"junit:junit:4.12",
"org.jetbrains:annotations:jar:13.0",
"org.jetbrains.kotlin:kotlin-reflect:1.3.41",
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.3.72",
"org.jetbrains.kotlin:kotlin-test-junit:1.3.72",
Expand All @@ -130,6 +161,9 @@ maven_install(
"org.mockito:mockito-core:2.19.0",
"org.robolectric:annotations:4.3",
"org.robolectric:robolectric:4.3",
"com.squareup.retrofit2:retrofit:2.9.0",
"com.squareup.retrofit2:converter-gson:2.5.0",
"com.google.gms:google-services:4.3.3",
],
repositories = DAGGER_REPOSITORIES + [
"https://bintray.com/bintray/jcenter",
Expand Down
349 changes: 345 additions & 4 deletions app/BUILD.bazel

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- TODO(#56): Reenable landscape support. -->
<uses-sdk android:minSdkVersion="19"
android:maxSdkVersion="28" />
<application
android:name=".application.OppiaApplication"
android:allowBackup="true"
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/ViewModelManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- TODO(#1632): Remove manifest post-Gradle -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.oppia.app.vm">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="28" />
</manifest>
7 changes: 7 additions & 0 deletions app/src/main/ViewsManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- TODO(#1632): Remove manifest post-Gradle -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
package="org.oppia.app.views">
<uses-sdk android:minSdkVersion="19"
android:targetSdkVersion="28" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import org.oppia.app.administratorcontrols.administratorcontrolsitemviewmodel.Ad
import org.oppia.app.fragment.FragmentScope
import org.oppia.app.model.DeviceSettings
import org.oppia.app.model.ProfileId
import org.oppia.app.shim.IntentFactoryShim
import org.oppia.app.viewmodel.ObservableViewModel
import org.oppia.domain.profile.ProfileManagementController
import org.oppia.util.data.AsyncResult
Expand All @@ -26,7 +27,8 @@ class AdministratorControlsViewModel @Inject constructor(
private val activity: AppCompatActivity,
private val fragment: Fragment,
private val logger: ConsoleLogger,
private val profileManagementController: ProfileManagementController
private val profileManagementController: ProfileManagementController,
private val IntentFactoryShim: IntentFactoryShim
) : ObservableViewModel() {
private val routeToProfileListListener = activity as RouteToProfileListListener
private lateinit var userProfileId: ProfileId
Expand Down Expand Up @@ -72,7 +74,12 @@ class AdministratorControlsViewModel @Inject constructor(
)
)
itemViewModelList.add(AdministratorControlsAppInformationViewModel(activity))
itemViewModelList.add(AdministratorControlsAccountActionsViewModel(fragment))
itemViewModelList.add(
AdministratorControlsAccountActionsViewModel(
fragment,
IntentFactoryShim
)
)

return itemViewModelList
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import android.content.Intent
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import org.oppia.app.R
import org.oppia.app.profile.ProfileActivity
import org.oppia.app.shim.IntentFactoryShim

/** [ViewModel] for the recycler view in [AdministratorControlsFragment]. */
class AdministratorControlsAccountActionsViewModel(
private val fragment: Fragment
private val fragment: Fragment,
private val intentFactoryShim: IntentFactoryShim
) : AdministratorControlsItemViewModel() {

fun onLogOutClicked() {
Expand All @@ -19,7 +20,7 @@ class AdministratorControlsAccountActionsViewModel(
}
.setPositiveButton(R.string.log_out_dialog_okay_button) { _, _ ->
// TODO(#762): Replace [ProfileChooserActivity] to [LoginActivity] once it is added.
val intent = Intent(fragment.activity, ProfileActivity::class.java)
val intent = intentFactoryShim.createProfileActivityIntent(fragment.activity!!)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
fragment.activity!!.startActivity(intent)
fragment.activity!!.finish()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.oppia.app.administratorcontrols.appversion

import android.content.Context
import androidx.databinding.ObservableField
import androidx.fragment.app.Fragment
import org.oppia.app.BuildConfig
import androidx.lifecycle.ViewModel
import org.oppia.app.fragment.FragmentScope
import org.oppia.app.viewmodel.ObservableViewModel
import org.oppia.util.system.OppiaDateTimeFormatter
Expand All @@ -16,7 +17,10 @@ class AppVersionViewModel @Inject constructor(
private val oppiaDateTimeFormatter: OppiaDateTimeFormatter
) : ObservableViewModel() {

val versionName = ObservableField<String>(BuildConfig.VERSION_NAME)
private val context: Context = fragment.activity!!.applicationContext
BenHenning marked this conversation as resolved.
Show resolved Hide resolved

val versionName: String = context.packageManager
.getPackageInfo(context.packageName, 0).versionName

private val lastUpdateDateTime =
fragment.activity!!.packageManager.getPackageInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import android.app.Application
import dagger.BindsInstance
import dagger.Component
import org.oppia.app.activity.ActivityComponent
import org.oppia.app.shim.IntentFactoryShimModule
import org.oppia.app.shim.ViewBindingShimModule
import org.oppia.data.backends.gae.NetworkModule
import org.oppia.domain.classify.InteractionsModule
import org.oppia.domain.classify.rules.continueinteraction.ContinueModule
Expand Down Expand Up @@ -44,7 +46,8 @@ import javax.inject.Singleton
HtmlParserEntityTypeModule::class, CachingModule::class,
QuestionModule::class, LogReportingModule::class,
AccessibilityModule::class, ImageClickInputModule::class,
LogStorageModule::class
LogStorageModule::class, IntentFactoryShimModule::class,
ViewBindingShimModule::class
]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package org.oppia.app.customview
import android.content.Context
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatImageView
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import org.oppia.app.R
import org.oppia.app.fragment.InjectableFragment
import org.oppia.app.model.LessonThumbnail
import org.oppia.app.model.LessonThumbnailGraphic
import org.oppia.app.shim.ViewComponentFactory
import org.oppia.util.gcsresource.DefaultResourceBucketName
import org.oppia.util.parser.DefaultGcsPrefix
import org.oppia.util.parser.ImageLoader
Expand Down Expand Up @@ -98,9 +99,8 @@ class LessonThumbnailImageView @JvmOverloads constructor(

override fun onAttachedToWindow() {
super.onAttachedToWindow()
FragmentManager.findFragment<InjectableFragment>(this)
.createViewComponent(this)
.inject(this)
(FragmentManager.findFragment<Fragment>(this) as ViewComponentFactory)
.createViewComponent(this).inject(this)
}

private fun getLessonDrawableResource(lessonThumbnail: LessonThumbnail): Int {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package org.oppia.app.databinding;

import android.graphics.drawable.GradientDrawable;
import android.view.View;
import android.widget.Button;
import androidx.annotation.ColorInt;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
import androidx.databinding.BindingAdapter;
import org.oppia.app.R;

/** Holds all custom binding adapters that set background drawables. */
public final class DrawableBindingAdapters {

/** Used to set a rounded-rect background drawable with a data-bound color. */
@BindingAdapter("app:roundedRectDrawableWithColor")
public static void setBackgroundDrawable(@NonNull View view, @ColorInt int colorRgb) {
view.setBackgroundResource(R.drawable.rounded_rect_background);
// The input color needs to have alpha channel prepended to it.
GradientDrawable background = (GradientDrawable) view.getBackground();
background.setColor(0xff000000 | colorRgb);
}

@BindingAdapter("app:topRoundedRectDrawableWithColor")
public static void setTopBackgroundDrawable(@NonNull View view, @ColorInt int colorRgb) {
view.setBackgroundResource(R.drawable.top_rounded_rect_background);
// The input color needs to have alpha channel prepended to it.
GradientDrawable background = (GradientDrawable) view.getBackground();
background.setColor(0xff000000 | colorRgb);
}

@BindingAdapter("app:bottomRoundedRectDrawableWithColor")
public static void setBottomBackgroundDrawable(@NonNull View view, @ColorInt int colorRgb) {
view.setBackgroundResource(R.drawable.bottom_rounded_rect_background);
// The input color needs to have alpha channel prepended to it.
GradientDrawable background = (GradientDrawable) view.getBackground();
background.setColor(0xff000000 | colorRgb);
}

@BindingAdapter("app:rectangleDrawableWithColor")
public static void setRectangleBackgroundDrawable(@NonNull View view, @ColorInt int colorRgb) {
view.setBackgroundResource(R.drawable.rectangle_background);
// The input color needs to have alpha channel prepended to it.
GradientDrawable background = (GradientDrawable) view.getBackground();
background.setColor(0xff000000 | colorRgb);
}

@BindingAdapter("android:button")
public static void setBackgroundResource(@NonNull Button button, @DrawableRes int resource) {
button.setBackgroundResource(resource);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.oppia.app.databinding;

import android.text.TextWatcher;
import android.widget.EditText;
import androidx.annotation.NonNull;
import androidx.databinding.BindingAdapter;

/** Holds all custom binding adapters that bind to [EditText]. */
public final class EditTextBindingAdapters {

/** Binding adapter for setting a [TextWatcher] as a change listener for an [EditText] */
@BindingAdapter("app:textChangedListener")
public static void bindTextWatcher(@NonNull EditText editText, TextWatcher textWatcher) {
editText.addTextChangedListener(textWatcher);
}
}

This file was deleted.

13 changes: 0 additions & 13 deletions app/src/main/java/org/oppia/app/databinding/GuidelineBinding.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.oppia.app.databinding;

import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Guideline;
import androidx.databinding.BindingAdapter;

/** Holds all custom binding adapters that bind to [Guideline]. */
public final class GuidelineBindingAdapters {

/** Binding adapter for setting the `guidePercent` for a [Guideline]. */
@BindingAdapter("app:layout_constraintGuide_percent")
public static void setGuidelinePercentage(@NonNull Guideline guideline, float percentage) {
ConstraintLayout.LayoutParams params =
(ConstraintLayout.LayoutParams) guideline.getLayoutParams();
params.guidePercent = percentage;
guideline.setLayoutParams(params);
}
}
Loading