Skip to content

Commit

Permalink
make sure that we only try to have assemble depend on a non-null arch…
Browse files Browse the repository at this point in the history
…ive task
  • Loading branch information
Greg Henry committed Jun 18, 2014
1 parent fdebe6b commit 8be34d1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,20 @@ class ExtendedPublication {
private void setJarTaskIfNotSet() {
if (archiveTask == null) {
archiveTask = findOrCreateJarTask()
assembleDependsOnArchiveTaskIfNotNull(archiveTask)
}
}

private void assembleDependsOnArchiveTaskIfNotNull(Jar archiveTask) {
if (archiveTask != null) {
project.getTasks().getByName(BasePlugin.ASSEMBLE_TASK_NAME).dependsOn(archiveTask);
}
}

private void setSourceJarTaskIfNotSet() {
if (sourcesArchiveTask == null) {
sourcesArchiveTask = findOrCreateSourcesJarTask()
project.getTasks().getByName(BasePlugin.ASSEMBLE_TASK_NAME).dependsOn(sourcesArchiveTask);
assembleDependsOnArchiveTaskIfNotNull(sourcesArchiveTask)
}
}

Expand Down

0 comments on commit 8be34d1

Please sign in to comment.