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

feat: Use androidx namespace #44

Merged
merged 7 commits into from
Jun 22, 2022

Conversation

wzieba
Copy link
Collaborator

@wzieba wzieba commented Jun 16, 2022

Closes #43

@wzieba wzieba changed the title Use androidx feat: Use androidx namespace Jun 16, 2022
Comment on lines 21 to 22
- name: Android Lint
run: ./gradlew lint
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint errors has been fixed so we can add this check

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question (❓): Since for the Build library/example app steps you chose a debug build type, why did you chose both debug and release build type for the Android Lint step? Was that done by design? Maybe what you wanted was ./gradlew lintDebug instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, there's no reason to lint all build types!

Comment on lines -24 to -31
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'org.codehaus.jackson:jackson-mapper-lgpl:1.9.13'
implementation 'org.codehaus.jackson:jackson-core-lgpl:1.9.13'
implementation 'com.google.android.gms:play-services-ads:17.1.3'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused dependencies

Comment on lines -79 to -83
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The menu was not used

@wzieba wzieba marked this pull request as ready for review June 17, 2022 07:58
Base automatically changed from publishing_scripts to milestone-1/maven_central_repository June 21, 2022 12:51
Copy link
Collaborator

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @wzieba !

I reviewed and testing this PR. In doing so, I left a couple of questions (❓) for you to reply to. Let me know what you think and we can then progress with this work.

PS: This PR is about the usage and update to AndroidX. On that aspect everything looks okay. But, since you also made few other changes, Lint on CI and targetSdkVersion related, I took this opportunity to comment on those too. I hope my comments will help you! 🙏

Comment on lines 21 to 22
- name: Android Lint
run: ./gradlew lint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question (❓): Since for the Build library/example app steps you chose a debug build type, why did you chose both debug and release build type for the Android Lint step? Was that done by design? Maybe what you wanted was ./gradlew lintDebug instead?


defaultConfig {
applicationId "com.parsely.example.parselyexample"
minSdkVersion 21
targetSdkVersion 28
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question (❓): Why did you chose to completely remove the targetSdkVersion from both, the parsely library and the example app module?

I built and then run the example app. Then, on launching the HiParsely app, I got a permission screen first, and following that, a version dialog afterwards. I think this is done because of the fact that when targetSdkVersion is not set, the default value equals that given to minSdkVersion (see docs).

Permission Screen Version Dialog
before after

I then tried to point both, the parsely and example modules, both, their compileSdkVersion and targetSdkVersion values, to 32. Everything started working as expected. I also built the release build type (./gradlew assembleRelease) and it worked this time. Mind the fact, that this doesn't work as at its current state. Then, I triggered Lint for the release build type and it too worked okay (./gradlew lintRelease). 🎉

I wonder now... can't we use targetSdkVersion 32, is something blocking us to do so? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good point! Yes, let's specify targetSdkVersion to 32. I went too far with removing configuration code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, due to the permission issue you've pointed out, I've reverted my previous change of minSdk from 21 to 23 (as it was before).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, nicely done! 🥇

@wzieba wzieba merged commit 1ea570b into milestone-1/maven_central_repository Jun 22, 2022
@wzieba wzieba deleted the use_androidx branch June 22, 2022 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants