File tree Expand file tree Collapse file tree 1 file changed +31
-10
lines changed
Expand file tree Collapse file tree 1 file changed +31
-10
lines changed Original file line number Diff line number Diff line change @@ -47,19 +47,40 @@ subprojects {
4747
4848 from(components[" java" ])
4949
50- pom.withXml {
51- val dependenciesNode = asNode().appendNode(" dependencies" )
52-
53- // 遍历项目依赖并添加到 POM
54- project.configurations.implementation.get().allDependencies.forEach { dep ->
55- if (dep.group != null ) { // 过滤掉没有 group 的依赖(如本地项目)
56- val dependencyNode = dependenciesNode.appendNode(" dependency" )
57- dependencyNode.appendNode(" groupId" , dep.group)
58- dependencyNode.appendNode(" artifactId" , dep.name)
59- dependencyNode.appendNode(" version" , dep.version ? : " " )
50+ pom {
51+ name.set(" ${project.group} :${project.name} " )
52+ description.set(project.description ? : " " )
53+ url.set(" https://github.com/luiox/morpher-api" )
54+
55+ licenses {
56+ license {
57+ name.set(" MIT License" )
58+ url.set(" https://github.com/luiox/morpher-api/blob/main/LICENSE" )
59+ }
60+ }
61+
62+ developers {
63+ developer {
64+ id.set(" luiox" )
65+ name.set(" Canrad" )
66+ email.set(" 1517807724@qq.com" )
6067 }
6168 }
6269 }
70+
71+ // pom.withXml {
72+ // val dependenciesNode = asNode().appendNode("dependencies")
73+ //
74+ // // 遍历项目依赖并添加到 POM
75+ // project.configurations.implementation.get().allDependencies.forEach { dep ->
76+ // if (dep.group != null) { // 过滤掉没有 group 的依赖(如本地项目)
77+ // val dependencyNode = dependenciesNode.appendNode("dependency")
78+ // dependencyNode.appendNode("groupId", dep.group)
79+ // dependencyNode.appendNode("artifactId", dep.name)
80+ // dependencyNode.appendNode("version", dep.version ?: "")
81+ // }
82+ // }
83+ // }
6384 }
6485 }
6586 }
You can’t perform that action at this time.
0 commit comments