-
Notifications
You must be signed in to change notification settings - Fork 739
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
Manually including im.dlg:android-dialer:1.2.5
#7142
Conversation
library/dialpad/build.gradle
Outdated
@@ -0,0 +1,20 @@ | |||
apply plugin: 'com.android.library' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a minimal build file for the module, technically it could apply the java plugin, for consistency it uses kotlin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no longer any dependency on the appcompat / legacy support library
@@ -58,5 +58,5 @@ dependencies { | |||
// Pref theme | |||
implementation libs.androidx.preferenceKtx | |||
// dialpad dimen | |||
implementation 'im.dlg:android-dialer:1.2.5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im.dlg:android-dialer:1.2.5
is now replaced by the local module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could avoid having this dependency now, but this is not really a big deal. Same for the String resource, they could be extracted from the module dialpad
module.
* to a larger default, for the dialpad we use this class to more precisely render characters | ||
* according to the precise amount of space they need. | ||
*/ | ||
public class DialpadTextView extends TextView { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has been changed from extends AppCompatTextView
import com.android.dialer.widget.ResizingTextEditText; | ||
|
||
/** EditText which suppresses IME show up. */ | ||
public class DigitsEditText extends ResizingTextEditText { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has been changed from extends AppCompatEditText
will exclude lint from this module as it's not our code |
9b56ee6
to
7abcdd4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work fine, so I'll trust the changes to the original library were minimal and say it LGTM 😅.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
When I do this type of import, I usually split into several commits for clarity.
First commit is importing the stuff, without editing anything. In this commit's comment, it's also good to link the original source location.
Next commit(s) are modification to fix issue, make the code compile, tweak the code, etc.
Doing like may also help in the future to investigate was has been changed from the original source.
@@ -58,5 +58,5 @@ dependencies { | |||
// Pref theme | |||
implementation libs.androidx.preferenceKtx | |||
// dialpad dimen | |||
implementation 'im.dlg:android-dialer:1.2.5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could avoid having this dependency now, but this is not really a big deal. Same for the String resource, they could be extracted from the module dialpad
module.
library/dialpad/build.gradle
Outdated
|
||
afterEvaluate { | ||
tasks.findAll { it.name.startsWith("lint") }.each { | ||
it.enabled = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint is disabled here, because there are too many issues reported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure on our stance, do we want to fix lint issues from external projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember the exact amount, but there were lots of lint issues about API versions, unused resources, etc. Since it's not really our code (we're just forking it to solve the mentioned issues) fixing all of those didn't seem to be worth the effort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is maybe not clear enough for everyone that this is external project, since it's in the library
folder. Maybe create another folder like library_external
, or a subfolder library/external
.
But I agree, that we do not want to spend time to fix issues on all our dep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good 👍 Should I move jsonviewer
as well? as I guess that technically originates from an external repository~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, please, and diff_match_patch
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a9298c7 moves the modules to library/external
7abcdd4
to
a9298c7
Compare
|
- avoids using appcompat - avoids using an artifact without a source repository
a9298c7
to
739a513
Compare
I need this to try to try to remove jetifier from the project. Currently on develop, using this plugin
|
…ary attribute compiliation issues
FYI @bmarty @jmartinesp I've had to include appcompat as a dependency 2168362 as some tasks (like sonar) were attempting to compile all variants of the module but |
SonarCloud Quality Gate failed. |
Type of change
Content
library/external/
directory (jsonview, dialpad and diff_match_patch)library/external/dialpad
. It turns out the classes we use are entirely AOSP.AppCompat
usages with stock Widgets, the build tools automatically convert these toandroidx
variantsMotivation and context
To allow us to avoid using the jetifier and enable Paparazzi screenshot tests within the
vector
moduleScreenshots / GIFs
No UI changes!
Tests
Tested devices