aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-08-30 02:47:55 +0800
committershedaniel <daniel@shedaniel.me>2021-08-30 02:47:55 +0800
commit98a2964e5a77e454bb9993f6525351ba6a9591ba (patch)
tree81d6342398f3334b05ae66f08f4f3b6f5d09caf4
parent0c5c17eac93840158f9bf7187ab68edf3414024f (diff)
downloadRoughlyEnoughItems-98a2964e5a77e454bb9993f6525351ba6a9591ba.tar.gz
RoughlyEnoughItems-98a2964e5a77e454bb9993f6525351ba6a9591ba.tar.bz2
RoughlyEnoughItems-98a2964e5a77e454bb9993f6525351ba6a9591ba.zip
Fix JEI recipes add
-rw-r--r--forge/build.gradle60
1 files changed, 51 insertions, 9 deletions
diff --git a/forge/build.gradle b/forge/build.gradle
index 7fd30a2b6..0c825253f 100644
--- a/forge/build.gradle
+++ b/forge/build.gradle
@@ -42,26 +42,25 @@ loom {
}
}
+def depProjects = [":api", ":runtime", ":default-plugin"]
+
dependencies {
forge("net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}")
modApi("me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}")
modApi("me.shedaniel:architectury-forge:${architectury_version}")
- implementation(project(path: ":api")) { transitive = false }
- implementation(project(path: ":default-plugin")) { transitive = false }
- implementation(project(path: ":runtime")) { transitive = false }
implementation(project(path: ":jei-compatibility-layer")) { transitive = false }
implementation(project(path: ":jei-internals-workaround")) { transitive = false }
- developmentForge(project(path: ":api")) { transitive = false }
- developmentForge(project(path: ":default-plugin")) { transitive = false }
- developmentForge(project(path: ":runtime")) { transitive = false }
developmentForge(project(path: ":jei-compatibility-layer")) { transitive = false }
- shadowCommon(project(path: ":api", configuration: "transformProductionForge")) { transitive = false }
- shadowCommon(project(path: ":default-plugin", configuration: "transformProductionForge")) { transitive = false }
- shadowCommon(project(path: ":runtime", configuration: "transformProductionForge")) { transitive = false }
shadowCommon(project(path: ":jei-compatibility-layer")) { transitive = false }
+ depProjects.forEach {
+ implementation(project(path: it)) { transitive = false }
+ developmentForge(project(path: it)) { transitive = false }
+ shadowCommon(project(path: it, configuration: "transformProductionForge")) { transitive = false }
+ }
+
modRuntime("curse.maven:chiselsbits-231095:3176033")
modRuntime("curse.maven:jumbofurnace-390880:3120970")
modRuntime("curse.maven:cyclic-239286:3221427")
@@ -91,6 +90,49 @@ jar {
classifier "dev"
}
+java {
+ withSourcesJar()
+}
+
+sourcesJar {
+ afterEvaluate {
+ depProjects.forEach {
+ def depSources = project(it).sourcesJar
+ dependsOn depSources
+ from depSources.archiveFile.map { zipTree(it) }
+ }
+ }
+}
+
+publishing {
+ publications {
+ mavenFabric(MavenPublication) {
+ artifactId = rootProject.name + "-" + project.name
+ artifact(remapJar) { classifier null }
+ afterEvaluate {
+ artifact(remapSourcesJar.output) {
+ builtBy remapSourcesJar
+ classifier "sources"
+ }
+ }
+ }
+ ["api", "default-plugin"].forEach { projectName ->
+ create(projectName + "Fabric", MavenPublication.class) { publication ->
+ publication.artifactId = rootProject.name + "-" + projectName + "-forge"
+ project.afterEvaluate {
+ def project = project(":" + projectName)
+ publication.artifact(project.fakeJar) { classifier null }
+ def remapSourcesJarTask = project.remapSourcesJar
+ publication.artifact(remapSourcesJarTask.output) {
+ builtBy remapSourcesJarTask
+ classifier "sources"
+ }
+ }
+ }
+ }
+ }
+}
+
curseforge {
if (project.hasProperty('danielshe_curse_api_key') || System.getenv('danielshe_curse_api_key') != null) {
apiKey = project.hasProperty('danielshe_curse_api_key') ? project.property('danielshe_curse_api_key') : System.getenv('danielshe_curse_api_key')