blob: 25b8d9fed858e4e5a88dd3d3325915489a9b21d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
archivesBaseName = rootProject.name + "-" + project.name
architectury {
common(forgeEnabled.toBoolean())
}
repositories {
maven { url "https://mod-buildcraft.com/maven" }
}
loom {
accessWidenerPath = gradle.rootProject.project("fabric").file("src/main/resources/roughlyenoughitems.accessWidener")
}
dependencies {
modCompileOnly("net.fabricmc:fabric-loader:${project.fabricloader_version}")
modApi("me.shedaniel.cloth:cloth-config:${cloth_config_version}")
modApi("dev.architectury:architectury:${architectury_version}")
compileClasspath(annotationProcessor("org.projectlombok:lombok:1.18.22"))
compileClasspath(project(path: ":api", configuration: "namedElements"))
}
remapJar {
remapAccessWidener = false
}
remapJar {
classifier "raw"
}
task fakeJar(type: Jar, dependsOn: remapJar) {
from remapJar.archiveFile.map { zipTree(it) }
from(rootProject.file("fake/fabric.mod.json")) {
into ""
}
classifier null
}
artifacts {
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
from components.java
}
}
}
|