Repository navigation
[Modules Restructuring] Restructure Analytics Module - #16744
Conversation
This file and its inner properties seem to be unused and/or outdated.
The root level '.gitignore' file should be all that is needed from now on.
The inner 'build.gradle' file from the 'WordPressAnalytics' module should be all that is needed from now on.
This change removes all the outdated details from the 'README.md' file while still preserving the title and short description of what the module is for.
Everything within the 'WordPressAnalytics' module ('build.gradle' +
'src') is now moved to the new root 'analytics' module.
With this change the new 'analytics' module is effectively and
completely disassociated from the 'WordPress-Analytics-Android' repo.
URL: https://github.com/wordpress-mobile/WordPress-Analytics-Android
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
Found 1 violations: The PR caused the following dependency changes:+\--- project :libs:analytics
+ \--- com.automattic:Automattic-Tracks-Android:2.2.0 (*)
-\--- project :libs:analytics:WordPressAnalytics
- \--- com.automattic:Automattic-Tracks-Android:2.2.0 (*)
Please review and act accordingly
|
|
You can test the Jetpack changes on this Pull Request by downloading an installable build (jetpack-installable-build-pr16744-039001f.apk), or scanning this QR code: |
|
You can test the WordPress changes on this Pull Request by downloading an installable build (wordpress-installable-build-pr16744-039001f.apk), or scanning this QR code: |
| exclude group: 'org.wordpress', module: 'utils' | ||
| } | ||
| implementation (project(path:':libs:analytics:WordPressAnalytics')) { | ||
| implementation (project(path:':libs:analytics')) { |
There was a problem hiding this comment.
Should we use :libs:WordPressAnalytics instead, so it's consistent with :libs:WordPressProcessors, :libs:WordPressAnnotations etc?
There was a problem hiding this comment.
👋 @oguzkocer and thank you so much for the suggestion! 🙏
I actually considered that too while doing this change, but I ended up in favor of the plain analytics naming instead of WordPressAnalytics for the below two main reasons:
- We are already in the context of the
WordPressrepo, as such, having to add theWordPressprefix to every module seems unnecessary. - This repo, in addition to the
WordPressapp is also building theJetpackapp. As such, it might be better to remove the wordWordPressfrom every module so that to avoid anyJetpackrelated naming confusion.
To that end, I was thinking to also rename the WordPressProcessors and WordPressAnnotations modules to plain processors and annotations in order to have every module naming consistent from now on.
In the end, I am planning to end up with the below module names:
- analytics (from
WordPressAnalytics) - editor (from
WordPressEditor) - editor-example (from
editor/example) - image-editor (from
ImageEditor) - mocks (from
WordPressMocks) - networking (from
WordPressNetworking) - annotations (from
WordPressAnnotations) - processors (from
WordPressProcessors)
Let me know what you think. 🤔 🙇
PS: You will also notice the editor-example:
- I also want to have it build and be part of our active modules as it is currently not.
- I am thinking of moving it up to the same level as every other module for now, just for simplicity sake and until we figure out how modularization and the organization of it would look like as we progress forward with the main modularization project (TBD).
There was a problem hiding this comment.
Sounds good to me. As long as we are consistent, I don't mind either naming and your reasoning makes sense to me for going with the shorter version.
There was a problem hiding this comment.
Great, yes, consistency matters, thanks for giving me the 👍 on it @oguzkocer ! 🙇
| ```shell | ||
| $ ./gradlew assemble publishToMavenLocal bintrayUpload -PbintrayUser=FIXME -PbintrayKey=FIXME -PdryRun=false | ||
| ``` | ||
| Library for handling Analytics tracking. |
There was a problem hiding this comment.
This is not a library anymore. I vote for removing the README alltogether, but if we are keeping, I think we should call it a module instead.
There was a problem hiding this comment.
👋 @oguzkocer and thanks!
I was thinking the same, I was in favor of removing this README.md file altogether too. The only reason that I kept that there is in case we might want to have a README.md, file per module, just as a general rule, so that to allow engineers to contribute to it by describing what the module does, why it is needed or any other FAQ.
...but if we are keeping, I think we should call it a module instead.
💯 Let me know what you think of the above and if you still think we should remove the README.md anyway I'll just remove it. Else, I'll just rename Library to Module, good call. 👍
There was a problem hiding this comment.
I don't feel strongly about having a README or not. Now that you renamed Library to Module, it's all good from my side 👍
There was a problem hiding this comment.
Great, thank you @oguzkocer ! 🙇
PS: I'll keep the basic structure of the README for now (title + short description), add that to every module as I will be progressing with this restructuring, that is, if such file is missing, and maybe come back to it later by adding some more details on them, most probably with some additional help from WP engineers!
… into build/restructure-analytics-module
|
@ParaskP7 🥳 |
zwarm
left a comment
There was a problem hiding this comment.
Form a testing perspective, all is working as expected. Thanks!
Parent #16562
Fixes #16563
This PR restructures the
analyticsmodule by disassociating the WordPress-Analytics-Android repo and removing the extraWordPressAnalyticslevel from it. This effectively makesanalyticsa pure module, without any extra inner levels or unnecessary build files lying around (likesettings.gradle,.gitignore, etc).PS: @zwarm I added you as the main reviewer, that is, in addition to the @wordpress-mobile/owl-team team itself, since I have been seeing you handling data coverage for WPAndroid for the past few weeks/months, adding/updating track events, etc. As such, I think you might be the best person to sign-off on that change for WPAndroid. 🥇
Question (❓): I wasn't sure about the
LICENCEfile, which point toMITand as such I chose to keep it. The root levelLICENCEthat WPAndroid is using isGPLv2. Should we keep the additionalMITlicence or remove it in favor ofGPLv2? 🤔To test:
App Settings->Privacy settingsand enableCollect information.Logcatand verify that track events are being fired as expected (you can search by🔵 Tracked:).Regression Notes
N/A
See
To testsection above.N/A
PR submission checklist:
RELEASE-NOTES.txtif necessary.