diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-10-14 17:53:21 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-10-14 18:31:38 +0800 |
| commit | 81f07b79c7560c4b0aba0d6dd3c1cac781fad68a (patch) | |
| tree | 01a163dea539410c45a6dc53bf346d5832330e63 /default-plugin | |
| parent | 423f31a81e7c0933c8e5571efb748b8a11f1774b (diff) | |
| download | RoughlyEnoughItems-81f07b79c7560c4b0aba0d6dd3c1cac781fad68a.tar.gz RoughlyEnoughItems-81f07b79c7560c4b0aba0d6dd3c1cac781fad68a.tar.bz2 RoughlyEnoughItems-81f07b79c7560c4b0aba0d6dd3c1cac781fad68a.zip | |
Remove LBA compatibility, Add Fabric API compatibility
Update buildscripts and README
Update buildscripts and README
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 } } } |
