aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-10-14 17:53:21 +0800
committershedaniel <daniel@shedaniel.me>2021-10-14 18:31:38 +0800
commit81f07b79c7560c4b0aba0d6dd3c1cac781fad68a (patch)
tree01a163dea539410c45a6dc53bf346d5832330e63 /api
parent423f31a81e7c0933c8e5571efb748b8a11f1774b (diff)
downloadRoughlyEnoughItems-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 'api')
-rw-r--r--api/build.gradle37
1 files changed, 22 insertions, 15 deletions
diff --git a/api/build.gradle b/api/build.gradle
index 08252ab79..a38d48176 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -2,8 +2,8 @@ archivesBaseName = rootProject.name + "-" + project.name
dependencies {
modCompileOnly("net.fabricmc:fabric-loader:${project.fabricloader_version}")
- modCompileOnly("me.shedaniel.cloth:cloth-config:${cloth_config_version}")
- modCompileOnly("dev.architectury:architectury:${architectury_version}")
+ modApi("me.shedaniel.cloth:cloth-config:${cloth_config_version}")
+ modApi("dev.architectury:architectury:${architectury_version}")
}
architectury {
@@ -11,13 +11,15 @@ architectury {
}
remapJar {
- afterEvaluate {
- remapAccessWidener.set(false)
- }
+ remapAccessWidener = false
+}
+
+configurations {
+ dev
}
-java {
- withSourcesJar()
+remapJar {
+ classifier "raw"
}
task fakeJar(type: Jar, dependsOn: remapJar) {
@@ -25,20 +27,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
}
}
}