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

Fix #1547: Change 'correct_answer' field in GaeSolution.kt to 'Any?' #1548

Closed
wants to merge 154 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
d68f0a9
Working on having one module build with bazel
miaboloix Jun 29, 2020
3115352
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Jul 8, 2020
897bf6d
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Jul 16, 2020
37a13f8
Created initial app-level WORKSPACE file
miaboloix Jul 16, 2020
f522846
Added proto_library rule to build model app module
miaboloix Jul 16, 2020
372deae
Added newline at end of WORKSPACE file
miaboloix Jul 16, 2020
5c0b6f5
Created macro to process proto files
miaboloix Jul 17, 2020
9408e27
Both Bazel and Gradle now build /model successfully
miaboloix Jul 17, 2020
7d44fea
Fixed typo in BUILD
miaboloix Jul 17, 2020
5c44743
Added missing end of file empty lines
miaboloix Jul 17, 2020
0204754
Added Robolectric dependencies and general build rule
miaboloix Jul 17, 2020
cb11a09
Source files building in both systems - added a TODO for test files
miaboloix Jul 17, 2020
a8b989f
Turned two kt_android_library rules into one
miaboloix Jul 17, 2020
ad2cb36
Added dependencies for test files
miaboloix Jul 17, 2020
379990e
Created kt_android_library rule for source files
miaboloix Jul 17, 2020
6d9f244
Add TODO for android_local_test rule
miaboloix Jul 17, 2020
c45c72e
Added a test manifest for android_local_test()
miaboloix Jul 17, 2020
04d2281
Added Firebase dependencies and git_repository for tools_android
miaboloix Jul 17, 2020
f486024
Refactored google-services.json, imported new dependencies
miaboloix Jul 20, 2020
fa16eb4
Fixed Bens nits
miaboloix Jul 20, 2020
5d31b5c
Fixed space in WORKSPACE comment
miaboloix Jul 20, 2020
3f9ed65
Got a demo test working in both Java and Kotlin
miaboloix Jul 21, 2020
1c982a9
Added rules_java dependencies for protocol buffers
miaboloix Jul 21, 2020
a7346e1
Added java_proto_library rules, each proto file now has its own rule
miaboloix Jul 21, 2020
6fc021b
Remove unnecessary srcs attribute for android_library
miaboloix Jul 21, 2020
b3d55e8
Rename bzl file macro
miaboloix Jul 21, 2020
7030c83
Added Robolectric dependencies and general build rule
miaboloix Jul 17, 2020
7c35ecf
Source files building in both systems - added a TODO for test files
miaboloix Jul 17, 2020
dfd545a
Turned two kt_android_library rules into one
miaboloix Jul 17, 2020
866a00a
Added dependencies for test files
miaboloix Jul 17, 2020
c0a791a
Created kt_android_library rule for source files
miaboloix Jul 17, 2020
6975169
Add TODO for android_local_test rule
miaboloix Jul 17, 2020
e16ee96
Changed model visability, added model and util dependencies to testing
miaboloix Jul 21, 2020
11094d0
Added dependencies to testing_main_lib
miaboloix Jul 21, 2020
6a9058a
Testing source files now build
miaboloix Jul 21, 2020
12deabe
Test files are building
miaboloix Jul 21, 2020
a8fe758
Changed to java_lite
miaboloix Jul 21, 2020
3295c12
Fixed merge conflicts
miaboloix Jul 21, 2020
3f27b22
Added EOF newlines
miaboloix Jul 21, 2020
bb1b906
Each library now has its own build rule
miaboloix Jul 21, 2020
a1bd255
Merged with utility
miaboloix Jul 21, 2020
3c6b257
Utility is now one module again
miaboloix Jul 21, 2020
30a8ac2
Utility is now one rule
miaboloix Jul 21, 2020
a233e50
Merge branch 'stage1_bazel_utility' into stage1_bazel_testing
miaboloix Jul 21, 2020
4df473d
Resolved merge conflicts
miaboloix Jul 21, 2020
ef3e857
Changed visibility for utility_lib
miaboloix Jul 21, 2020
d107b07
Added duplicate google-services.json file to please Gradle
miaboloix Jul 21, 2020
560d2b9
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Jul 21, 2020
ae52338
Utility tests are building and passing (except in_memory_blocking_cac…
miaboloix Jul 21, 2020
782cae9
Added android_local_test() rules for testing, building but not passing
miaboloix Jul 21, 2020
1903609
Added a test manifest for testing module
miaboloix Jul 21, 2020
67deaa7
Oppia_android_test is working
miaboloix Jul 21, 2020
af82414
Utility_test is now working
miaboloix Jul 21, 2020
219ea6e
Testing_test.bzl is now working
miaboloix Jul 21, 2020
8562a4d
changed all android_local_test rules to utility_test rules
miaboloix Jul 21, 2020
5d6dd40
Named test rules correctly
miaboloix Jul 21, 2020
3d21443
Added missing dependency, all tests now pass
miaboloix Jul 22, 2020
761c0c5
Removed all unused dependencies
miaboloix Jul 22, 2020
d4d40c2
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
miaboloix Jul 22, 2020
94213cd
Changed event_logger.proto to oppia_logger.proto
miaboloix Jul 22, 2020
5aaf72f
Merge branch 'stage1_bazel' of https://github.com/oppia/oppia-android…
miaboloix Jul 22, 2020
b718dd1
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Jul 22, 2020
6d8740d
Merge branch 'stage1_bazel_testing' of https://github.com/oppia/oppia…
miaboloix Jul 22, 2020
24e8537
Added missing EOF newlines
miaboloix Jul 22, 2020
7c1ddf8
Fixed visibility
miaboloix Jul 22, 2020
33ff930
Initial BUILD file added
miaboloix Jul 22, 2020
08ed2dc
Remove addressed TODOs
miaboloix Jul 22, 2020
56227bf
Merge branch 'introduce-bazel-roboelectric-testing' of https://github…
miaboloix Jul 22, 2020
9505de2
Started writing build rule
miaboloix Jul 22, 2020
e1ce0d1
Fixed bug in import statements for exploration.proto, topic.proto, an…
miaboloix Jul 22, 2020
8f34cfe
Merge branch 'stage1_bazel' of https://github.com/oppia/oppia-android…
miaboloix Jul 22, 2020
1999cf1
Merged with stage1_bazel_utility
miaboloix Jul 22, 2020
23cd84a
Deleted DemoJava
miaboloix Jul 22, 2020
788bcf3
Merge branch 'stage1_bazel_utility' of https://github.com/oppia/oppia…
miaboloix Jul 22, 2020
1413ad1
Fixed merge conflicts
miaboloix Jul 22, 2020
052f3cd
Domain source files build
miaboloix Jul 22, 2020
2981277
Removed unused dependencies in domain_lib
miaboloix Jul 22, 2020
17dc39a
Working on building domain test files
miaboloix Jul 22, 2020
999b3f8
Added a test manifest
miaboloix Jul 23, 2020
47d4e0c
Test files now build
miaboloix Jul 23, 2020
89307b1
Added test rules, some tests not building or passing
miaboloix Jul 23, 2020
25e9c73
Added data attribute to test macros
miaboloix Jul 23, 2020
461d249
All tests now build, some do not pass
miaboloix Jul 23, 2020
67fee18
CHanged rules_kotlin version
miaboloix Jul 23, 2020
4865d01
All tests now pass
miaboloix Jul 23, 2020
ab9e295
Firebase dependency errors have been resolved
miaboloix Jul 24, 2020
c6bbbf4
Save firebase dependency fixes for new PR
miaboloix Jul 24, 2020
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
818440a
Started convertin correct_answer to interaction object
miaboloix Jul 29, 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
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO(#1532): Rename file to 'BUILD' post-Gradle.
143 changes: 143 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
'''
This file lists and imports all external dependencies needed to build Oppia Android.
'''

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

# Android SDK configuration. For more details, see:
# https://docs.bazel.build/versions/master/be/android.html#android_sdk_repository
android_sdk_repository(
name = "androidsdk",
api_level = 28,
)

# Add support for JVM rules: https://github.com/bazelbuild/rules_jvm_external
RULES_JVM_EXTERNAL_TAG = "2.9"
RULES_JVM_EXTERNAL_SHA = "e5b97a31a3e8feed91636f42e19b11c49487b85e5de2f387c999ea14d77c7f45"
http_archive(
name = "rules_jvm_external",
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
sha256 = RULES_JVM_EXTERNAL_SHA,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)

# Add support for Kotlin: https://github.com/bazelbuild/rules_kotlin.
RULES_KOTLIN_VERSION = "legacy-1.4.0-rcx-oppia-exclusive-rc01"
RULES_KOTLIN_SHA = "600f3d916eda5531dd70614ec96dc92b4ac24da0e1d815eb94559976e9bea8aa"
http_archive(
name = "io_bazel_rules_kotlin",
urls = ["https://github.com/oppia/rules_kotlin/archive/%s.zip" % RULES_KOTLIN_VERSION],
type = "zip",
strip_prefix = "rules_kotlin-%s" % RULES_KOTLIN_VERSION,
sha256 = RULES_KOTLIN_SHA,
)

# TODO(#1535): Remove once rules_kotlin is released because these lines become unnecessary
load("@io_bazel_rules_kotlin//kotlin:dependencies.bzl", "kt_download_local_dev_dependencies")
kt_download_local_dev_dependencies()

load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kotlin_repositories", "kt_register_toolchains")
kotlin_repositories()
kt_register_toolchains()

# rules_proto defines abstract rules for building Protocol Buffers.
http_archive(
name = "rules_proto",
sha256 = "2490dca4f249b8a9a3ab07bd1ba6eca085aaf8e45a734af92aad0c42d9dc7aaf",
strip_prefix = "rules_proto-218ffa7dfa5408492dc86c01ee637614f8695c45",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/218ffa7dfa5408492dc86c01ee637614f8695c45.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/218ffa7dfa5408492dc86c01ee637614f8695c45.tar.gz",
],
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()

# rules_java defines rules for generating Java code from Protocol Buffers.
http_archive(
name = "rules_java",
sha256 = "ccf00372878d141f7d5568cedc4c42ad4811ba367ea3e26bc7c43445bbc52895",
strip_prefix = "rules_java-d7bf804c8731edd232cb061cb2a9fe003a85d8ee",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/d7bf804c8731edd232cb061cb2a9fe003a85d8ee.tar.gz",
"https://github.com/bazelbuild/rules_java/archive/d7bf804c8731edd232cb061cb2a9fe003a85d8ee.tar.gz",
],
)

load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains")
rules_java_dependencies()
rules_java_toolchains()

# Add support for Dagger
DAGGER_TAG = "2.28.1"
DAGGER_SHA = "9e69ab2f9a47e0f74e71fe49098bea908c528aa02fa0c5995334447b310d0cdd"
http_archive(
name = "dagger",
strip_prefix = "dagger-dagger-%s" % DAGGER_TAG,
sha256 = DAGGER_SHA,
urls = ["https://github.com/google/dagger/archive/dagger-%s.zip" % DAGGER_TAG],
)

load("@dagger//:workspace_defs.bzl", "DAGGER_ARTIFACTS", "DAGGER_REPOSITORIES")

# Add support for Robolectric: https://github.com/robolectric/robolectric-bazel
http_archive(
name = "robolectric",
urls = ["https://github.com/oppia/robolectric-bazel/archive/4.x-oppia-exclusive-rc02.tar.gz"],
strip_prefix = "robolectric-bazel-4.x-oppia-exclusive-rc02",
)
load("@robolectric//bazel:robolectric.bzl", "robolectric_repositories")
robolectric_repositories()

# Add support for Firebase Crashlytics
git_repository(
name = "tools_android",
commit = "00e6f4b7bdd75911e33c618a9bc57bab7a6e8930",
remote = "https://github.com/bazelbuild/tools_android",
)

load("@tools_android//tools/googleservices:defs.bzl", "google_services_workspace_dependencies")
google_services_workspace_dependencies()

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

maven_install(
artifacts = DAGGER_ARTIFACTS + [
"org.robolectric:robolectric:4.3",
"org.robolectric:annotations:4.3",
"androidx.appcompat:appcompat:1.0.2",
"androidx.annotation:annotation:1.1.0",
"com.android.support:support-annotations:28.0.0",
"org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2",
"org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.8",
"androidx.core:core-ktx:1.0.1",
"junit:junit:4.12",
"com.google.truth:truth:0.43",
"com.github.bumptech.glide:glide:4.11.0",
"com.caverock:androidsvg-aar:1.4",
"androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03",
"org.mockito:mockito-core:2.19.0",
"androidx.test.ext:junit:1.1.1",
"android.arch.core:core-testing:1.1.1",
"androidx.arch.core:core-testing:2.1.0",
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.3.72",
"org.jetbrains.kotlin:kotlin-test-junit:1.3.72",
"org.robolectric:annotations:4.3",
"com.crashlytics.sdk.android:crashlytics:2.9.8",
"io.fabric.sdk.android:fabric:1.4.7",
"com.google.firebase:firebase-analytics:17.4.4",
"com.google.firebase:firebase-crashlytics:17.1.1",
"org.jetbrains.kotlin:kotlin-reflect:1.3.41",
],
repositories = DAGGER_REPOSITORIES + [
"https://maven.google.com",
"https://repo1.maven.org/maven2",
"https://jcenter.bintray.com/",
"https://bintray.com/bintray/jcenter",
"https://maven.fabric.io/public",
],
)
27 changes: 27 additions & 0 deletions data/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# TODO(#1532): Rename file to 'BUILD' post-Gradle.
'''
This library provides data to the rest of the application.
'''

load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library")
load("@rules_jvm_external//:defs.bzl", "artifact")
load("@dagger//:workspace_defs.bzl", "dagger_rules")

kt_android_library(
name = "cache_store",
custom_package = "org.oppia.data.persistence",
srcs = glob(["src/main/java/org/oppia/data/persistence/*.kt"]),
manifest = "src/main/AndroidManifest.xml",
deps = [
":dagger",
"//model",
"//utility",
artifact("androidx.appcompat:appcompat"),
artifact("com.github.bumptech.glide:glide"),
artifact("com.caverock:androidsvg-aar"),
artifact("androidx.lifecycle:lifecycle-livedata-ktx"),
],
visibility = ["//visibility:public"],
)

dagger_rules()
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data class GaeSolution(

@Json(name = "interaction_id") val interactionId: String?,
@Json(name = "answer_is_exclusive") val isAnswerExclusive: Boolean?,
@Json(name = "correct_answer") val correctAnswer: String?,
@Json(name = "correct_answer") val correctAnswer: Any?,
@Json(name = "explanation") val explanation: GaeSubtitledHtml?

)
Loading