diff --git a/build.gradle b/build.gradle index 4ea4d85b3b..0cca1999c7 100644 --- a/build.gradle +++ b/build.gradle @@ -60,6 +60,31 @@ def getBranch() { return branch.substring(branch.lastIndexOf("/") + 1) } +def moduleDependencies(project, List 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" diff --git a/fabric-blockrenderlayer-v1/build.gradle b/fabric-blockrenderlayer-v1/build.gradle index 2cc7337e5c..6ae11f16c3 100644 --- a/fabric-blockrenderlayer-v1/build.gradle +++ b/fabric-blockrenderlayer-v1/build.gradle @@ -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' +]) diff --git a/fabric-command-api-v1/build.gradle b/fabric-command-api-v1/build.gradle index b20a62fe8c..c41f3d0e30 100644 --- a/fabric-command-api-v1/build.gradle +++ b/fabric-command-api-v1/build.gradle @@ -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' +]) diff --git a/fabric-commands-v0/build.gradle b/fabric-commands-v0/build.gradle index a2b01b730b..61d3ee22cc 100644 --- a/fabric-commands-v0/build.gradle +++ b/fabric-commands-v0/build.gradle @@ -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' +]) diff --git a/fabric-containers-v0/build.gradle b/fabric-containers-v0/build.gradle index e79c36dac6..bfdfdf0944 100644 --- a/fabric-containers-v0/build.gradle +++ b/fabric-containers-v0/build.gradle @@ -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' +]) diff --git a/fabric-content-registries-v0/build.gradle b/fabric-content-registries-v0/build.gradle index 14ad3787ab..1f464942ea 100644 --- a/fabric-content-registries-v0/build.gradle +++ b/fabric-content-registries-v0/build.gradle @@ -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' +]) diff --git a/fabric-dimensions-v1/build.gradle b/fabric-dimensions-v1/build.gradle index a0a5490b05..d3533865b1 100644 --- a/fabric-dimensions-v1/build.gradle +++ b/fabric-dimensions-v1/build.gradle @@ -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' +]) diff --git a/fabric-events-interaction-v0/build.gradle b/fabric-events-interaction-v0/build.gradle index 1ed6234efb..a0c47edd84 100644 --- a/fabric-events-interaction-v0/build.gradle +++ b/fabric-events-interaction-v0/build.gradle @@ -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' +]) diff --git a/fabric-events-lifecycle-v0/build.gradle b/fabric-events-lifecycle-v0/build.gradle index 3d3226ccbc..3ae615282b 100644 --- a/fabric-events-lifecycle-v0/build.gradle +++ b/fabric-events-lifecycle-v0/build.gradle @@ -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' +]) diff --git a/fabric-item-api-v1/build.gradle b/fabric-item-api-v1/build.gradle index b4d10fdc93..2acd0c7c2c 100644 --- a/fabric-item-api-v1/build.gradle +++ b/fabric-item-api-v1/build.gradle @@ -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' +]) diff --git a/fabric-item-groups-v0/build.gradle b/fabric-item-groups-v0/build.gradle index cc0592ccdd..d0a4345a10 100644 --- a/fabric-item-groups-v0/build.gradle +++ b/fabric-item-groups-v0/build.gradle @@ -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' +]) diff --git a/fabric-keybindings-v0/build.gradle b/fabric-keybindings-v0/build.gradle index 4f1cb5061a..823dfd0dd6 100644 --- a/fabric-keybindings-v0/build.gradle +++ b/fabric-keybindings-v0/build.gradle @@ -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' +]) diff --git a/fabric-lifecycle-events-v1/build.gradle b/fabric-lifecycle-events-v1/build.gradle index 2b5a8b92d8..b309f21a8d 100644 --- a/fabric-lifecycle-events-v1/build.gradle +++ b/fabric-lifecycle-events-v1/build.gradle @@ -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' +]) diff --git a/fabric-loot-tables-v1/build.gradle b/fabric-loot-tables-v1/build.gradle index 8ff3a4f958..78cbdeffea 100644 --- a/fabric-loot-tables-v1/build.gradle +++ b/fabric-loot-tables-v1/build.gradle @@ -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' +]) diff --git a/fabric-mining-levels-v0/build.gradle b/fabric-mining-levels-v0/build.gradle index 7b1d897ac0..77eac17881 100644 --- a/fabric-mining-levels-v0/build.gradle +++ b/fabric-mining-levels-v0/build.gradle @@ -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' +]) diff --git a/fabric-models-v0/build.gradle b/fabric-models-v0/build.gradle index 074f3d1468..76a0e27cfe 100644 --- a/fabric-models-v0/build.gradle +++ b/fabric-models-v0/build.gradle @@ -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' +]) diff --git a/fabric-networking-blockentity-v0/build.gradle b/fabric-networking-blockentity-v0/build.gradle index be9d1ac55a..f801d27772 100644 --- a/fabric-networking-blockentity-v0/build.gradle +++ b/fabric-networking-blockentity-v0/build.gradle @@ -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' +]) diff --git a/fabric-networking-v0/build.gradle b/fabric-networking-v0/build.gradle index bf5a9a942a..68e3ea37ab 100644 --- a/fabric-networking-v0/build.gradle +++ b/fabric-networking-v0/build.gradle @@ -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' +]) diff --git a/fabric-object-builder-api-v1/build.gradle b/fabric-object-builder-api-v1/build.gradle index 25b1a3d311..bdba6af4d1 100644 --- a/fabric-object-builder-api-v1/build.gradle +++ b/fabric-object-builder-api-v1/build.gradle @@ -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") } diff --git a/fabric-object-builders-v0/build.gradle b/fabric-object-builders-v0/build.gradle index 59d6f1d73c..1bee6cb4cb 100644 --- a/fabric-object-builders-v0/build.gradle +++ b/fabric-object-builders-v0/build.gradle @@ -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' +]) diff --git a/fabric-particles-v1/build.gradle b/fabric-particles-v1/build.gradle index b5dd08d14f..39023ff9dd 100644 --- a/fabric-particles-v1/build.gradle +++ b/fabric-particles-v1/build.gradle @@ -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' +]) diff --git a/fabric-registry-sync-v0/build.gradle b/fabric-registry-sync-v0/build.gradle index 2bf1458e39..02fd497f69 100644 --- a/fabric-registry-sync-v0/build.gradle +++ b/fabric-registry-sync-v0/build.gradle @@ -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' +]) diff --git a/fabric-renderer-api-v1/build.gradle b/fabric-renderer-api-v1/build.gradle index 89452ee9df..728532c9a5 100644 --- a/fabric-renderer-api-v1/build.gradle +++ b/fabric-renderer-api-v1/build.gradle @@ -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' +]) diff --git a/fabric-renderer-indigo/build.gradle b/fabric-renderer-indigo/build.gradle index f6b0f0aa26..09a0a6d069 100644 --- a/fabric-renderer-indigo/build.gradle +++ b/fabric-renderer-indigo/build.gradle @@ -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' +]) diff --git a/fabric-renderer-registries-v1/build.gradle b/fabric-renderer-registries-v1/build.gradle index e9107159aa..bcef0614f9 100644 --- a/fabric-renderer-registries-v1/build.gradle +++ b/fabric-renderer-registries-v1/build.gradle @@ -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' +]) diff --git a/fabric-rendering-data-attachment-v1/build.gradle b/fabric-rendering-data-attachment-v1/build.gradle index fab023636e..24e5732576 100644 --- a/fabric-rendering-data-attachment-v1/build.gradle +++ b/fabric-rendering-data-attachment-v1/build.gradle @@ -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' +]) diff --git a/fabric-rendering-fluids-v1/build.gradle b/fabric-rendering-fluids-v1/build.gradle index c1a52e827e..e55df4c9fe 100644 --- a/fabric-rendering-fluids-v1/build.gradle +++ b/fabric-rendering-fluids-v1/build.gradle @@ -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' +]) diff --git a/fabric-rendering-v0/build.gradle b/fabric-rendering-v0/build.gradle index 028c5a67d0..fc2f5ae39d 100644 --- a/fabric-rendering-v0/build.gradle +++ b/fabric-rendering-v0/build.gradle @@ -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' +]) diff --git a/fabric-rendering-v1/build.gradle b/fabric-rendering-v1/build.gradle index ac1ae68672..9c7afb287e 100644 --- a/fabric-rendering-v1/build.gradle +++ b/fabric-rendering-v1/build.gradle @@ -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' +]) diff --git a/fabric-screen-handler-api-v1/build.gradle b/fabric-screen-handler-api-v1/build.gradle index a228f50490..37902b0b45 100644 --- a/fabric-screen-handler-api-v1/build.gradle +++ b/fabric-screen-handler-api-v1/build.gradle @@ -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' +]) diff --git a/fabric-tag-extensions-v0/build.gradle b/fabric-tag-extensions-v0/build.gradle index 094d5c13b1..dfef592b8c 100644 --- a/fabric-tag-extensions-v0/build.gradle +++ b/fabric-tag-extensions-v0/build.gradle @@ -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' +]) diff --git a/fabric-textures-v0/build.gradle b/fabric-textures-v0/build.gradle index 07878fdd98..02019539ec 100644 --- a/fabric-textures-v0/build.gradle +++ b/fabric-textures-v0/build.gradle @@ -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' +]) diff --git a/fabric-tool-attribute-api-v1/build.gradle b/fabric-tool-attribute-api-v1/build.gradle index cefe1139b7..202220d676 100644 --- a/fabric-tool-attribute-api-v1/build.gradle +++ b/fabric-tool-attribute-api-v1/build.gradle @@ -2,8 +2,11 @@ archivesBaseName = "fabric-tool-attribute-api-v1" version = getSubprojectVersion(project, "1.2.5") dependencies { - compile project(path: ':fabric-api-base', configuration: 'dev') - compile project(path: ':fabric-tag-extensions-v0', configuration: 'dev') testmodCompile project(path: ':fabric-object-builder-api-v1', configuration: 'dev') testmodCompile project(path: ':fabric-lifecycle-events-v1', configuration: 'dev') } + +moduleDependencies(project, [ + 'fabric-api-base', + 'fabric-tag-extensions-v0' +])