New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup & Structure #2
Comments
Likewise with the readme:
Which? |
The setup that this project uses is the stock IntelliJ Android project layout when one creates a new Android project. What's different about this from the main Mapbox Android SDK project is that it's using Gradle in multi module mode as opposed to single module / project. That's why there's one main In theory we could convert the main Mapbox Android SDK project to be multi module too so that we could include demo and testing projects in the same repo. That said it's probably more accessible for devs to have the demo project in a standalone repo. |
Why is that? Should there be other modules in the future? Since there's just one module right now, can we collapse the structure a bit? |
Also: which file do you import? |
Both IntelliJ and Android Studio (Google) create new projects in this style, primarily because it's just more future proof / flexible for most developers (i.e., it's easier to add new modules in the future should you choose / need to). IMHO we definitely should collapse the Mapbox Android SDK project codebase (which is one of the reasons I put it into PR 165). This isolates the SDK into it's own Gradle defined deliverable (.AAR). Another module (in the same repo) could be a test module (which needs to be it's own Android app), which would have the SDK as a dependency. FWIW, I've be looking at Android Unit and Functional testing lately and we're definitely going to need to go down a similar route to make this happen. |
Okay: so for now, what file do you import? Which gradle file? |
You'd import the root level |
GitHub Comment Tag! Ha! :-) |
@tmcw Hope you were able to get things setup and working this afternoon. To help things out a bit I've created a (local for now) branch of the main mapbox:master where I'm splitting things out into this multi-module approach. It'll make things a little more standard / consistent as well as help get us to a place were automated testing is easier and in the same project.. From there you and Francisco can kick the tires to see if this is a direction that you want the project to head in. I'll let you know more when I have something. |
Upon investigation into my maven With that out of the way, we should add that to the README :). |
Bummer. That does sound like a pain in the ass. That said, I'm a bit confused about your findings though as Maven only stores its cached dependencies via the following pattern: Are you saying that the path to the locally installed AAR file was: /Users/tom/.m2/repository/com/mapbox/mapboxsdk/mb-android-sdk/1.0.0-SNAPSHOT/mb-android-sdk-1.0.0-SNAPSHOT.aar instead of something like: /Users/brad/.m2/repository/com/mapbox/mapboxsdk/Mapbox-Android-SDK/1.0.0-SNAPSHOT/Mapbox-Android-SDK-1.0.0-SNAPSHOT.aar If so then this is an error with the Gradle Android Maven plugin / config in SDK project. Please confirm and I'll investigate. |
Yeah - that's the case, mine was named according to the parent directory. I guess Java takes directory structure Very Seriously |
Yeah... Java is VERY picky about names, capitalization, paths, etc when it comes to tracking down resources. It's universally referred to as Classpath Hell in Java circles. Anyway, thanks for confirming. I'll add this to my TODO list. |
This repo has 3 gradle files:
build.gradle
,settings.gradle
, andMapBoxAndroidDemo/build.gradle
Which of these should I import? What's the story on this directory structure - why isn't MapBoxAndroidDemo the root path?
The text was updated successfully, but these errors were encountered: