diff options
Diffstat (limited to 'default-plugin')
| -rw-r--r-- | default-plugin/build.gradle | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/default-plugin/build.gradle b/default-plugin/build.gradle index 9662dd803..c22da8b91 100644 --- a/default-plugin/build.gradle +++ b/default-plugin/build.gradle @@ -1,14 +1,14 @@ archivesBaseName = rootProject.name + "-" + project.name loom { - accessWidener = gradle.rootProject.project("fabric").file("src/main/resources/roughlyenoughitems.accessWidener") + accessWidenerPath = gradle.rootProject.project("fabric").file("src/main/resources/roughlyenoughitems.accessWidener") } dependencies { modCompileOnly("net.fabricmc:fabric-loader:${project.fabricloader_version}") - modCompileOnly("me.shedaniel.cloth:cloth-config:${cloth_config_version}") - modCompileOnly("dev.architectury:architectury:${architectury_version}") - compileOnly(project(path: ":api")) + modApi("me.shedaniel.cloth:cloth-config:${cloth_config_version}") + modApi("dev.architectury:architectury:${architectury_version}") + compileClasspath(project(path: ":api", configuration: "dev")) } architectury { @@ -16,13 +16,15 @@ architectury { } remapJar { - afterEvaluate { - remapAccessWidener.set(false) - } + remapAccessWidener = false +} + +configurations { + dev } -java { - withSourcesJar() +remapJar { + classifier "raw" } task fakeJar(type: Jar, dependsOn: remapJar) { @@ -30,20 +32,25 @@ task fakeJar(type: Jar, dependsOn: remapJar) { from(rootProject.file("fake/fabric.mod.json")) { into "" } - archiveClassifier.set "fake" + classifier null +} + +artifacts { + dev(jar) + apiElements(fakeJar) + runtimeElements(fakeJar) +} + +afterEvaluate { + configurations.apiElements.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.remapJar) } + configurations.runtimeElements.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(tasks.remapJar) } } publishing { publications { mavenCommon(MavenPublication) { artifactId = rootProject.name + "-" + project.name - artifact(fakeJar) { classifier null } - afterEvaluate { - artifact(remapSourcesJar.output) { - builtBy remapSourcesJar - classifier "sources" - } - } + from components.java } } } |
