WordPress for Android is an Open Source project released under the GNU GPL. The app’s complexity lies somewhere between simple and advanced, which makes it interesting to contribute to. This makes the learning curve not very hard and at the same time, one can learn a lot on Android development when you peek under the hood. You can find the source of the WordPress for Android app here: https://github.com/wordpress-mobile/WordPress-Android WordPress for Android uses Gradle as its build system. If you are not familiar with Gradle or any build system at all, this link useful might help you: http://tools.android.com/tech-docs/new-build-system/user-guide
Android default files and directories:
Some of these directories and files are present in any Android project, by default. You would want to read this official documentation on Android projects before proceeding below. I will not be explaining them, unless necessary.
There seems to be more than one release version of this app: main, release, debug and zbetagroup.
Let us look at the root level of the project in this blog post. I will try to explain (or point to links that explain) some basic Android concepts along the way, as well.
- assets (Android default)
- build (Android default)
- gradle (Android default)
- libs (Android default)
- res (Android default)
- res-zbetagroup – Seems to be related to the zbetagroup version of the app.
- src (Android default)
- tests – Official Android documentation on Test Projects
- tools – Contains some shell, python and ruby scripts. Not sure of its significance, yet.
- .classpath – Tells the java compiler where to look for user-defined classes and packages
- .gitattributes – A simple text file that gives attributes to pathnames
- .gitignore – Files matching the pattern mentioned here are not tracked by Git
- .project – Contains project description. Not sure of its significance, yet.
- AndroidManifest.xml (Android default)
- AndroidManifestBetaGroup.xml – Seems to be related to the zbetagroup version of the app.
- AndroidManifestReleaseAndDebug.xml – Seems to be related to the release and debug version of the app.
- build.gradle – Gradle build script. This is where the Gradle project is defined.
- build.xml (Android default)
- custom_rules.xml – Defines custom rules for Ant. Not sure why it is present here (maybe the project was migrated from Ant to Gradle).
- default.properties – Some default properties. Not sure of its significance, yet.
- gradlew – The Gradle Wrapper file for Unix-based systems
- gradlew.bat – The Gradle Wrapper file for Windows systems
- lint.xml – Improving your code with lint
- local.properties-example – Rename this to local.properties (Android default) and add the SDK path as instructed in the README file
- proguard-project.txt – ProGuard
- project.properties (Android default)
- readme.md – README files generally provide instructions on how to get started with the project. It is now very common for any project in Github, as Github displays the contents of the root-level readme.md at the project home page itself.
I will keep this post updated as I understand the significance of some files. Watch out for future posts in this series.
Update: The second post in this series is now available here: https://anirudh24seven.wordpress.com/2014/03/02/understanding-wordpress-for-android-part-2/