Skip to content

Commit

Permalink
Fix local dependency check (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
fondesa authored Mar 29, 2020
1 parent 67c7a7c commit bd42479
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class DeployPlugin : Plugin<Project> {

configDependencies.values.forEach { dependency ->
val dependencyNode = dependenciesNode.appendNode("dependency")
if (dependency.isLocal) {
if (project.isDependencyLocal(dependency)) {
val dependencyProject = rootProject.project(dependency.name)
val dependencyDeployProperties = dependencyProject.readPropertiesOf("deploy.properties")
dependencyNode.appendNode("groupId", deployProperties.getProperty("group.id"))
Expand Down Expand Up @@ -250,7 +250,7 @@ class DeployPlugin : Plugin<Project> {
}
}

private val Dependency.isLocal: Boolean get() = version == "unspecified"
private fun Project.isDependencyLocal(dependency: Dependency): Boolean = dependency.group == rootProject.name

private val Project.versionName: String get() = version as String

Expand Down

0 comments on commit bd42479

Please sign in to comment.