14

すべてのサブプロジェクトを sdi-xxx および sdi-yyy という名前にしたいので、gradle eclipse を実行すると、Eclipse プロジェクト名が .project に正しく生成され、ビルドすると、sdi-xxxx.jar および sid という名前の jar ファイルが作成されます。 -yyyy.jar. 私はこれをどこかで見たことがありますが、私の人生では、ドキュメントで見つけることができません(そのドキュメントは巨大で、どこかで見たことを知っています)。

ありがとう、ディーン

4

2 に答える 2

22

settings.gradle:

prefixProjectName(rootProject, "sdi-")

def prefixProjectName(project, prefix) {
  project.name = prefix + project.name
  project.children.each { prefixProjectName(it, prefix) }
}
于 2012-07-18T00:59:17.270 に答える
13

Based on suggestion of Peter N, I currently have the following in my parent settings.gradle

include 'xxx', 'yyy'
rootProject.children.each { it.name = "sdi-" + it.name }

If you want the name of the root parent used as prefix, you could do

include 'xxx', 'yyy'
rootProject.children.each { it.name = rootProject.name + it.name }
于 2013-01-11T00:05:15.020 に答える