Skip to content

Commit 0f8e8f4

Browse files
committed
Make dependencies compile scope (fixes #36)
1 parent 7923cdb commit 0f8e8f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ publishing {
143143
}
144144
}
145145
}
146+
// https://discuss.gradle.org/t/maven-publish-plugin-generated-pom-making-dependency-scope-runtime/7494/10
147+
asNode().dependencies.'*'.findAll() {
148+
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
149+
dep.name == it.artifactId.text()
150+
}
151+
}.each { it.scope*.value = 'compile'}
146152
}
147153
}
148154
}

0 commit comments

Comments
 (0)