Skip to content

Commit

Permalink
Add module dependencies to maven POM (FabricMC#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvverti authored Nov 15, 2020
1 parent f21864f commit 6a2618f
Show file tree
Hide file tree
Showing 33 changed files with 146 additions and 107 deletions.
25 changes: 25 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,31 @@ def getBranch() {
return branch.substring(branch.lastIndexOf("/") + 1)
}

def moduleDependencies(project, List<String> depNames) {
def deps = depNames.iterator().collect { project.dependencies.project(path: ":$it", configuration: 'dev') }
project.dependencies {
deps.each {
compile it
}
}
project.publishing {
publications {
mavenJava(MavenPublication) {
pom.withXml {
def depsNode = asNode().appendNode("dependencies")
deps.each {
def depNode = depsNode.appendNode("dependency")
depNode.appendNode("groupId", it.group)
depNode.appendNode("artifactId", it.name)
depNode.appendNode("version", it.version)
depNode.appendNode("scope", "compile")
}
}
}
}
}
}

allprojects {
apply plugin: "checkstyle"
apply plugin: "maven-publish"
Expand Down
6 changes: 3 additions & 3 deletions fabric-blockrenderlayer-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-blockrenderlayer-v1"
version = getSubprojectVersion(project, "1.1.4")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
6 changes: 4 additions & 2 deletions fabric-command-api-v1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ archivesBaseName = "fabric-command-api-v1"
version = getSubprojectVersion(project, "1.0.9")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')

testmodCompile project(path: ':fabric-lifecycle-events-v1', configuration: 'dev')
}

moduleDependencies(project, [
'fabric-api-base'
])
8 changes: 4 additions & 4 deletions fabric-commands-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-commands-v0"
version = getSubprojectVersion(project, "0.2.0")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-command-api-v1', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-command-api-v1'
])
8 changes: 4 additions & 4 deletions fabric-containers-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-containers-v0"
version = getSubprojectVersion(project, "0.1.8")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-networking-v0', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-networking-v0'
])
8 changes: 4 additions & 4 deletions fabric-content-registries-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-content-registries-v0"
version = getSubprojectVersion(project, "0.1.9")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-resource-loader-v0', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-resource-loader-v0'
])
10 changes: 6 additions & 4 deletions fabric-dimensions-v1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ archivesBaseName = "fabric-dimensions-v1"
version = getSubprojectVersion(project, "1.0.0")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-networking-v0', configuration: 'dev')
compile project(path: ':fabric-registry-sync-v0', configuration: 'dev')

testmodCompile project(path: ':fabric-command-api-v1', configuration: 'dev')
}

moduleDependencies(project, [
'fabric-api-base',
'fabric-networking-v0',
'fabric-registry-sync-v0'
])
6 changes: 3 additions & 3 deletions fabric-events-interaction-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-events-interaction-v0"
version = getSubprojectVersion(project, "0.4.1")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
10 changes: 5 additions & 5 deletions fabric-events-lifecycle-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
archivesBaseName = "fabric-events-lifecycle-v0"
version = getSubprojectVersion(project, "0.2.0")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-item-api-v1', configuration: 'dev')
compile project(path: ':fabric-lifecycle-events-v1', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-item-api-v1',
'fabric-lifecycle-events-v1'
])
6 changes: 3 additions & 3 deletions fabric-item-api-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-item-api-v1"
version = getSubprojectVersion(project, "1.2.0")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
8 changes: 4 additions & 4 deletions fabric-item-groups-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-item-groups-v0"
version = getSubprojectVersion(project, "0.2.1")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-resource-loader-v0', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-resource-loader-v0'
])
6 changes: 3 additions & 3 deletions fabric-keybindings-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-keybindings-v0"
version = getSubprojectVersion(project, "0.2.0")

dependencies {
compile project(path: ':fabric-key-binding-api-v1', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-key-binding-api-v1'
])
6 changes: 3 additions & 3 deletions fabric-lifecycle-events-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-lifecycle-events-v1"
version = getSubprojectVersion(project, "1.2.0")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
6 changes: 3 additions & 3 deletions fabric-loot-tables-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-loot-tables-v1"
version = getSubprojectVersion(project, "1.0.1")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
10 changes: 5 additions & 5 deletions fabric-mining-levels-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
archivesBaseName = "fabric-mining-levels-v0"
version = getSubprojectVersion(project, "0.1.2")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-tag-extensions-v0', configuration: 'dev')
compile project(path: ':fabric-tool-attribute-api-v1', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-tag-extensions-v0',
'fabric-tool-attribute-api-v1'
])
6 changes: 3 additions & 3 deletions fabric-models-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-models-v0"
version = getSubprojectVersion(project, "0.1.1")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
6 changes: 3 additions & 3 deletions fabric-networking-blockentity-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-networking-blockentity-v0"
version = getSubprojectVersion(project, "0.2.5")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])

6 changes: 3 additions & 3 deletions fabric-networking-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-networking-v0"
version = getSubprojectVersion(project, "0.1.10")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
8 changes: 5 additions & 3 deletions fabric-object-builder-api-v1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ archivesBaseName = "fabric-object-builder-api-v1"
version = getSubprojectVersion(project, "1.9.2")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-tool-attribute-api-v1', configuration: 'dev')

testmodCompile project(path: ':fabric-command-api-v1', configuration: 'dev')
}

moduleDependencies(project, [
'fabric-api-base',
'fabric-tool-attribute-api-v1'
])

minecraft {
accessWidener = file("src/main/resources/fabric-object-builder-api-v1.accesswidener")
}
8 changes: 4 additions & 4 deletions fabric-object-builders-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-object-builders"
version = getSubprojectVersion(project, "0.7.1")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-object-builder-api-v1', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-object-builder-api-v1'
])
8 changes: 4 additions & 4 deletions fabric-particles-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-particles-v1"
version = getSubprojectVersion(project, "0.2.2")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-textures-v0', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-textures-v0'
])
8 changes: 4 additions & 4 deletions fabric-registry-sync-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-registry-sync-v0"
version = getSubprojectVersion(project, "0.6.1")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-networking-v0', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-networking-v0'
])
6 changes: 3 additions & 3 deletions fabric-renderer-api-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-renderer-api-v1"
version = getSubprojectVersion(project, "0.3.3")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
8 changes: 4 additions & 4 deletions fabric-renderer-indigo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-renderer-indigo"
version = getSubprojectVersion(project, "0.4.3")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-renderer-api-v1', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-renderer-api-v1'
])
6 changes: 4 additions & 2 deletions fabric-renderer-registries-v1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ archivesBaseName = "fabric-renderer-registries-v1"
version = getSubprojectVersion(project, "2.2.0")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')

testmodCompile project(path: ':fabric-lifecycle-events-v1', configuration: 'dev')
}

moduleDependencies(project, [
'fabric-api-base'
])
6 changes: 3 additions & 3 deletions fabric-rendering-data-attachment-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-rendering-data-attachment-v1"
version = getSubprojectVersion(project, "0.1.4")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
6 changes: 3 additions & 3 deletions fabric-rendering-fluids-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-rendering-fluids-v1"
version = getSubprojectVersion(project, "0.1.12")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
8 changes: 4 additions & 4 deletions fabric-rendering-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-rendering-v0"
version = getSubprojectVersion(project, "1.1.1")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-rendering-v1', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-rendering-v1'
])
6 changes: 3 additions & 3 deletions fabric-rendering-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-rendering-v1"
version = getSubprojectVersion(project, "1.4.0")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
7 changes: 5 additions & 2 deletions fabric-screen-handler-api-v1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ minecraft {
}

dependencies {
compile(project(path: ':fabric-api-base', configuration: 'dev'))
compile(project(path: ':fabric-networking-v0', configuration: 'dev'))
testmodRuntimeOnly(project(path: ':fabric-resource-loader-v0', configuration: 'dev'))
}

moduleDependencies(project, [
'fabric-api-base',
'fabric-networking-v0'
])
8 changes: 4 additions & 4 deletions fabric-tag-extensions-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
archivesBaseName = "fabric-tag-extensions-v0"
version = getSubprojectVersion(project, "1.0.3")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
compile project(path: ':fabric-resource-loader-v0', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base',
'fabric-resource-loader-v0'
])
6 changes: 3 additions & 3 deletions fabric-textures-v0/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
archivesBaseName = "fabric-textures-v0"
version = getSubprojectVersion(project, "1.0.5")

dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')
}
moduleDependencies(project, [
'fabric-api-base'
])
Loading

0 comments on commit 6a2618f

Please sign in to comment.