3

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?

Kenneth Breugelmans
  • 501
  • 1
  • 8
  • 22
  • Is the project open-source and available on Github, BitBucket or somewhere else? – Aritra Roy Feb 12 '17 at 14:42
  • https://github.com/mapzen/on-the-road_android, I think this is it, and as every body says, you need to search for the project if it is open source – Atef Hares Feb 12 '17 at 14:43

3 Answers3

7

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'
Aritra Roy
  • 15,355
  • 10
  • 73
  • 107
0

When you use dependency, when you build, it downloads the library to :

build -> intermediates -> exploded-aar -> THE_LIBRARY.

If THE_LIBRARY isn't obfuscated, you can take it from there, copy it, and import it as a module to your project(and then edit the class)

Dus
  • 4,052
  • 5
  • 30
  • 49
0

On The Road is indeed open source and available on GitHub at https://github.com/mapzen/on-the-road_android. I am a maintainer for the project. Contributions are always welcome!

Some tips for getting started:

  • Make a fork of the project using your GitHub account.
  • Clone the project to your local machine using git clone git@github.com:[YOUR_GITHUB_USERNAME]/on-the-road_android.git.
  • Open the project in Android Studio and make local edits (please try to adhere to the code style used by the rest of the library).
  • The project includes a sample application you can use to test your changes.
  • You can also deploy a SNAPSHOT to your local Maven repo using ./gradlew install. This will allow you to test in your app by updating the dependency to compile 'com.mapzen:on-the-road:1.2.0-SNAPSHOT. If you do this also make sure your app includes the mavenLocal() repository in your the repositories section of the build.gradle file for your app.
  • Commit your changes and push to your fork on GitHub. Then create a pull request to the upstream repository.
ecgreb
  • 31
  • 4