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 #1833: Rename package to org.oppia.android (part 2/2) #1876

Merged
merged 22 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3a6898f
Move all source files to new org/oppia/android directory structure. No
BenHenning Sep 23, 2020
d80094f
Update Kotlin & XML references to match new package structure.
BenHenning Sep 23, 2020
301b92f
Migrate codepaths for Bazel builds to new package structure.
BenHenning Sep 23, 2020
601ae84
Fix package references in Gradle files for new package structure.
BenHenning Sep 23, 2020
06b9f1e
Update package & pathing references to new structure for proto files.
BenHenning Sep 23, 2020
392f090
Rename Android package to org.oppia.android.
BenHenning Sep 23, 2020
e683841
Fix Bazel builds for new package structure.
BenHenning Sep 24, 2020
7de40f5
Merge branch 'develop' into introduce-new-package-structure
BenHenning Sep 24, 2020
6e117b5
Resolve merge conflicts.
BenHenning Sep 24, 2020
6d590ef
Remove some merge conflict markers that were missed.
BenHenning Sep 24, 2020
3173bed
Remove redundant commits & other ktlint updates.
BenHenning Sep 24, 2020
95ed213
Fix incorrect references to new testing package location.
BenHenning Sep 24, 2020
eeb3cb7
Post-testing module cleanups via ktlint.
BenHenning Sep 24, 2020
e111259
More post-merge fixes.
BenHenning Sep 24, 2020
d820b8b
Move some missed files that only caused breakages in Bazel.
BenHenning Sep 24, 2020
0f5c224
Move all files to their correct new location.
BenHenning Sep 24, 2020
8681381
Merge branch 'move-files-to-prepare-for-new-app-package-structure' in…
BenHenning Sep 24, 2020
2330e76
Fix missed files from the migration after merging.
BenHenning Sep 24, 2020
5239cfe
Disable Firebase data collection.
BenHenning Sep 24, 2020
72fea55
Update BUILD.bazel
BenHenning Sep 24, 2020
91a779b
Merge branch 'develop' into move-files-to-prepare-for-new-app-package…
BenHenning Sep 24, 2020
5e17dec
Merge branch 'move-files-to-prepare-for-new-app-package-structure' in…
BenHenning Sep 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# TODO(#1640): Move binary manifest to top-level package post-Gradle.
android_binary(
name = "oppia",
custom_package = "org.oppia.app",
custom_package = "org.oppia.android",
enable_data_binding = True,
manifest = "//app:src/main/AndroidManifest.xml",
manifest_values = {
"applicationId": "org.oppia.app",
"applicationId": "org.oppia.android",
"versionCode": "0",
"versionName": "0.1-alpha",
"minSdkVersion": "19",
"targetSdkVersion": "29",
},
multidex = "legacy",
multidex = "native", # TODO(#1875): Re-enable legacy for optimized release builds.
deps = [
"//app",
],
Expand Down
51 changes: 35 additions & 16 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'''
"""
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")
Expand All @@ -16,60 +16,72 @@ android_sdk_repository(

# 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,
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
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,
name = "io_bazel_rules_kotlin",
sha256 = RULES_KOTLIN_SHA,
strip_prefix = "rules_kotlin-%s" % RULES_KOTLIN_VERSION,
type = "zip",
urls = ["https://github.com/oppia/rules_kotlin/archive/%s.zip" % RULES_KOTLIN_VERSION],
)

# 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()

'''
"""
The proto_compiler and proto_java_toolchain bindings load the protos rules needed for the model
module while helping us avoid the unnecessary compilation of protoc. Referecences:
- https://github.com/google/startup-os/blob/5f30a62/WORKSPACE#L179-L187
- https://github.com/bazelbuild/bazel/issues/7095
'''
"""

bind(
name = "proto_compiler",
actual = "//tools:protoc"
actual = "//tools:protoc",
)

bind(
name = "proto_java_toolchain",
actual = "//tools:java_toolchain"
actual = "//tools:java_toolchain",
)

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,
strip_prefix = "dagger-dagger-%s" % DAGGER_TAG,
urls = ["https://github.com/google/dagger/archive/dagger-%s.zip" % DAGGER_TAG],
)

Expand All @@ -78,10 +90,12 @@ 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",
urls = ["https://github.com/oppia/robolectric-bazel/archive/4.x-oppia-exclusive-rc02.tar.gz"],
)

load("@robolectric//bazel:robolectric.bzl", "robolectric_repositories")

robolectric_repositories()

# Add support for Firebase Crashlytics
Expand All @@ -92,6 +106,7 @@ git_repository(
)

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

google_services_workspace_dependencies()

git_repository(
Expand All @@ -101,8 +116,8 @@ git_repository(
)

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

load("@rules_jvm_external//:defs.bzl", "maven_install")
Expand Down Expand Up @@ -131,13 +146,16 @@ maven_install(
"androidx.navigation:navigation-ui:2.0.0",
"androidx.navigation:navigation-ui-ktx:2.0.0",
"androidx.recyclerview:recyclerview:1.0.0",
"androidx.room:room-runtime:2.2.5",
"androidx.test.espresso:espresso-contrib:3.1.0",
"androidx.test.espresso:espresso-core:3.2.0",
"androidx.test.espresso:espresso-intents:3.1.0",
"androidx.test.ext:junit:1.1.1",
"androidx.test:runner:1.2.0",
"androidx.viewpager:viewpager:1.0.0",
"androidx.work:work-runtime:2.4.0",
"androidx.work:work-runtime-ktx:2.4.0",
"androidx.work:work-testing:2.4.0",
"com.android.support:support-annotations:28.0.0",
"com.caverock:androidsvg-aar:1.4",
"com.chaos.view:pinview:1.4.3",
Expand All @@ -148,6 +166,7 @@ maven_install(
"com.google.firebase:firebase-analytics:17.5.0",
"com.google.firebase:firebase-crashlytics:17.1.1",
"com.google.gms:google-services:4.3.3",
"com.google.guava:guava:28.1-android",
"com.google.truth:truth:0.43",
"com.squareup.retrofit2:converter-gson:2.5.0",
"com.squareup.retrofit2:retrofit:2.9.0",
Expand Down
Loading