Skip to content

Commit

Permalink
Fix #3258 - Handling Removal of the CircularImageView dependency (#5350)
Browse files Browse the repository at this point in the history
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->
Fixes #3258 

The Pull Request
[#4155](#4155) substituted
`CircularImageView` with `ShapeableImageView`, yet the dependency
persists in the project. This PR addresses the final steps of removing
the remaining dependency.


**`add_shadow`** and **`shadow_radius`** were exclusive to
`CircularImageView`. Upon removing the dependencies, these attributes
became irrelevant, so they were omitted from the layouts. Their removal
had no impact on the functioning views as they were unrelated to the
actual attributes of the working views.
[Attached reference images below]

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
![Having
add_shadow](https://github.com/oppia/oppia-android/assets/122200035/6b5be06f-3ee2-4beb-abc7-e170e8794f67)


### Todo
Remove Dependency from Bazel and External libraries.!

---------

Co-authored-by: Ben Henning <[email protected]>
  • Loading branch information
Rd4dev and BenHenning authored Mar 20, 2024
1 parent 5963eaa commit d0c8b81
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 73 deletions.
6 changes: 0 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ load("@tools_android//tools/googleservices:defs.bzl", "google_services_workspace

google_services_workspace_dependencies()

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

# A custom version of Android SVG is needed since custom changes needed to be added to the library
# to correctly size in-line SVGs (such as those needed for LaTeX-based math expressions).
git_repository(
Expand Down
5 changes: 0 additions & 5 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,8 @@ android_library(
"//third_party:androidx_recyclerview_recyclerview",
"//third_party:androidx_viewpager2_viewpager2",
"//third_party:androidx_viewpager_viewpager",
"//third_party:circularimageview_circular_image_view",
"//third_party:com_google_android_flexbox_flexbox",
"//third_party:com_google_android_material_material",
"//third_party:de_hdodenhof_circleimageview",
"//third_party:javax_annotation_javax_annotation-api_jar",
"//third_party:nl_dionsegijn_konfetti",
"//utility/src/main/java/org/oppia/android/util/system:oppia_clock",
Expand Down Expand Up @@ -660,7 +658,6 @@ kt_android_library(
"//third_party:androidx_core_core-ktx",
"//third_party:androidx_databinding_databinding-common",
"//third_party:androidx_databinding_databinding-runtime",
"//third_party:circularimageview_circular_image_view",
"//utility/src/main/java/org/oppia/android/util/accessibility",
"//utility/src/main/java/org/oppia/android/util/parser/html:html_parser",
"//utility/src/main/java/org/oppia/android/util/parser/image:image_loader",
Expand Down Expand Up @@ -747,9 +744,7 @@ android_library(
"//third_party:androidx_constraintlayout_constraintlayout",
"//third_party:androidx_lifecycle_lifecycle-livedata-core",
"//third_party:androidx_lifecycle_lifecycle-livedata-ktx",
"//third_party:circularimageview_circular_image_view",
"//third_party:com_google_android_material_material",
"//third_party:de_hdodenhof_circleimageview",
"//utility",
"//utility/src/main/java/org/oppia/android/util/system:oppia_clock",
"//utility/src/main/java/org/oppia/android/util/system:oppia_clock_injector_provider",
Expand Down
2 changes: 0 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ dependencies {
'com.google.firebase:firebase-auth-ktx:19.3.1',
'com.google.guava:guava:28.1-android',
'com.google.protobuf:protobuf-javalite:3.17.3',
'com.github.oppia:CircularImageview:35d08ba88a',
'de.hdodenhof:circleimageview:3.0.1',
'nl.dionsegijn:konfetti:1.2.5',
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version",
'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1',
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout-land/profile_progress_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@
android:focusable="true"
android:onClick="@{() -> viewModel.clickOnProfilePicture()}"
android:elevation="4dp"
app:add_shadow="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shadow_radius="8"
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.RoundedShape"
profile:src="@{viewModel.profile.avatar}" />

Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout-sw600dp/profile_progress_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
android:elevation="4dp"
android:focusable="true"
android:onClick="@{() -> viewModel.clickOnProfilePicture()}"
app:add_shadow="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shadow_radius="8"
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.RoundedShape"
profile:src="@{viewModel.profile.avatar}" />

Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/add_profile_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@
android:contentDescription="@string/current_profile_picture_content_description"
android:elevation="4dp"
android:focusable="true"
app:add_shadow="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shadow_radius="8"
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.RoundedShape"
app:srcCompat="@{@drawable/ic_default_avatar}" />

Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/profile_progress_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@
android:elevation="4dp"
android:focusable="true"
android:onClick="@{() -> viewModel.clickOnProfilePicture()}"
app:add_shadow="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shadow_radius="8"
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.RoundedShape"
profile:src="@{viewModel.profile.avatar}" />

Expand Down
11 changes: 0 additions & 11 deletions scripts/assets/maven_dependencies.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -825,17 +825,6 @@ maven_dependency {
}
}
}
maven_dependency {
artifact_name: "de.hdodenhof:circleimageview:3.0.1"
artifact_version: "3.0.1"
license {
license_name: "The Apache Software License, Version 2.0"
original_link: "https://www.apache.org/licenses/LICENSE-2.0.txt"
scrapable_link {
url: "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
}
maven_dependency {
artifact_name: "io.fabric.sdk.android:fabric:1.4.7"
artifact_version: "1.4.7"
Expand Down
8 changes: 0 additions & 8 deletions third_party/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ load(":versions.bzl", "MAVEN_PRODUCTION_DEPENDENCY_VERSIONS", "MAVEN_TEST_DEPEND
],
) for name, version in MAVEN_TEST_DEPENDENCY_VERSIONS.items()]

android_library(
name = "circularimageview_circular_image_view",
visibility = ["//visibility:public"],
exports = [
"@circularimageview//circularimageview:circular_image_view",
],
)

# A wrapper dependency for the custom Git import of Android SVG (so that dependencies on this
# library still routes through //third_party).
android_library(
Expand Down
34 changes: 2 additions & 32 deletions third_party/maven_install.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dependency_tree": {
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
"__INPUT_ARTIFACTS_HASH": 928649579,
"__RESOLVED_ARTIFACTS_HASH": -1902356738,
"__INPUT_ARTIFACTS_HASH": 1734653011,
"__RESOLVED_ARTIFACTS_HASH": -433169088,
"conflict_resolution": {
"androidx.constraintlayout:constraintlayout:1.1.3": "androidx.constraintlayout:constraintlayout:2.0.1",
"androidx.core:core:1.0.1": "androidx.core:core:1.3.1",
Expand Down Expand Up @@ -8206,36 +8206,6 @@
"sha256": "d4635b348bbbf3f166d972b052bc4cac5b326c133beed7b8a1cab7ea22b61e01",
"url": "https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4-sources.jar"
},
{
"coord": "de.hdodenhof:circleimageview:3.0.1",
"dependencies": [],
"directDependencies": [],
"file": "v1/https/repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar",
"mirror_urls": [
"https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar",
"https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar",
"https://maven.fabric.io/public/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar",
"https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar",
"https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar"
],
"sha256": "7b0f088436ad4dcbb36d779fd09bf2192d9cc1e1a734bb6337904a7648f97617",
"url": "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1.aar"
},
{
"coord": "de.hdodenhof:circleimageview:jar:sources:3.0.1",
"dependencies": [],
"directDependencies": [],
"file": "v1/https/repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar",
"mirror_urls": [
"https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar",
"https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar",
"https://maven.fabric.io/public/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar",
"https://maven.google.com/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar",
"https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar"
],
"sha256": "41ac0df4f7bab17c56b075a0c802a6f0b6d9013831d409556fdcd56bdb8a460b",
"url": "https://repo1.maven.org/maven2/de/hdodenhof/circleimageview/3.0.1/circleimageview-3.0.1-sources.jar"
},
{
"coord": "io.fabric.sdk.android:fabric:1.4.7",
"dependencies": [],
Expand Down
1 change: 0 additions & 1 deletion third_party/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = {
"com.squareup.okhttp3:okhttp": "4.7.2",
"com.squareup.retrofit2:converter-moshi": "2.5.0",
"com.squareup.retrofit2:retrofit": "2.9.0",
"de.hdodenhof:circleimageview": "3.0.1",
"io.fabric.sdk.android:fabric": "1.4.7",
"javax.annotation:javax.annotation-api:jar": "1.3.2",
"javax.inject:javax.inject": "1",
Expand Down

0 comments on commit d0c8b81

Please sign in to comment.