Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Support 'android' as well as 'com.google.android' as group ids. #186

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -95,13 +95,18 @@ public List<String> getPlatformProvidedDependencies() {

private Dependency getAndroidDependency() {
for(Artifact artifact : mavenProject.getArtifacts()) {
if(artifact.getGroupId().equals("com.google.android") && artifact.getArtifactId().equals("android")) {
if(isAndroidGroupId(artifact) && artifact.getArtifactId().equals("android")) {
return new MavenDependency(artifact);
}
}
throw new ProjectConfigurationException("cannot find android dependency for project=[" + getName() + "]");
}

private boolean isAndroidGroupId(Artifact artifact) {
return artifact.getGroupId().equals("com.google.android") ||
artifact.getGroupId().equals("android");
}

public List<Dependency> getLibraryDependencies() {
List<Dependency> results = new ArrayList<Dependency>(mavenProject.getArtifacts().size());

Expand Down