androidandroid-gradle-pluginmapzen

How to edit a gradle dependency


I'm working on an android project that uses the following dependency in my gradle file;

compile 'com.mapzen:on-the-road:1.1.1'

I would like to edit one of the files in order to add some missing features and contribute to the project.

How can I download this project and test edits in my android studio project?


Solution

  • I just found out that the project is open-source and is available in Github.

    Please follow these simple steps -

    1) Go to this page and click on "Clone or Download" and then click on "Download ZIP".

    2) This will give you the ZIP file which you need to extract to get the entire project.

    3) Now you are free to edit any files in the project you want to.

    4) To include this custom project into your parent project, you need to paste this project into your mail project, include it in the settings.gradle file like this,

    include ':app', ':customLibrary'
    

    and then you need to compile the library from your app's build.gradle file,

    compile project(':customLibrary')
    

    NOTE - Make sure you remove this from the build.gradle file,

    compile 'com.mapzen:on-the-road:1.1.1'