Skip to content
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

Port location code from MAS #6

Merged
merged 4 commits into from
Oct 20, 2017
Merged

Port location code from MAS #6

merged 4 commits into from
Oct 20, 2017

Conversation

Guardiola31337
Copy link
Contributor

  • Ports location code from MAS
  • Implements a solution to generate libcore artifact out of libcore and liblocation modules

The interesting part to get ☝️ working is

sourceSets {
main {
java.srcDirs = ['src/main/java', '../liblocation/src/main/java']
}
}

We're telling Gradle to include the classes from the libcore (itself) and from the liblocation module. So we're telling it explicitly which classes form the artifact and because of that we don't need to include compile project(':liblocation') anymore. A drawback of doing it this way is that we need to include

provided 'com.mapbox.mapboxsdk:mapbox-java-services:2.2.6'
provided 'com.mapzen.android:lost:3.0.4'
provided 'com.google.android.gms:play-services-location:11.0.4'

in both libcore and liblocation modules because if not Gradle doesn't know to resolve liblocation classes and throws compile errors.

It's a bit hacky but it's working ¯\_(ツ)_/¯

What do you think? Any thoughts?

👀 @zugaldia @electrostat @cammace

…ore artifact out of libcore and liblocation modules
Copy link
Member

@zugaldia zugaldia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one change, otherwise let's :shipit:

}

dependencies {
compile project(':liblocation')
provided 'com.mapbox.mapboxsdk:mapbox-java-services:2.2.6'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Guardiola31337 Instead of hardcoding the library versions, could we add them to the dependencies.gradle file? Particularly if we're gonna use them in several build.gradle files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zugaldia done in 6ff9985

@Guardiola31337 Guardiola31337 merged commit e1a4466 into master Oct 20, 2017
@Guardiola31337 Guardiola31337 deleted the pg-location-port branch October 20, 2017 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants