Skip to content

How to debug UI Kit locally

Gabriel Aumala edited this page Jan 12, 2017 · 4 revisions

MonkeyChat has 2 main dependencies. The SDK and the UI Kit. The SDK is included in this repo, however, the UI Kit is not. if issues with the SDK appear, you can easily debug it because the source code is right there, but if the issues are with the UI Kit, things get more complicated.

To modify UI Kit classes while debugging MonkeyChat, the easiest approach is to use symlinks. To do this, you need to have the UI Kit repository somewhere in your computer.

Creating the symlinks

Open a terminal in the root directory of Monkey-Chat-Android and execute the following

ln -s <path/to/UIKit>/monkeykitui/ monkeykitui

These two commands create symbolic links to the monkeykitui module.

Use the symbolic links in gradle

For gradle to be able to find the modules in the symlink and compile them, first add them to your settings.gradle file. It should look like this:

include ':app', ':monkeyKit', ':monkeykitui'

Then, in the sample app's build.gradle file replace the line that pulls the UI Kit from jitpack with this one:

compile project(':monkeykitui')

Now after cleaning your project you should be able to sync with gradle and run the project. If you modify any UI Kit classes you have to go to the UI Kit directory to commit your changes.

Clone this wiki locally