blob: 3061e2c0518ec1cd72a19d72efa2871e9240232f (
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
|
archivesBaseName = rootProject.name + "-" + project.name
architectury {
common(platforms.split(","))
}
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}")
compileOnly(annotationProcessor("org.projectlombok:lombok:1.18.22"))
compileOnly(project(path: ":api", configuration: "namedElements"))
testImplementation(project(path: ":api", configuration: "namedElements"))
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
}
test {
useJUnitPlatform()
}
remapJar {
archiveClassifier = "raw"
}
task fakeJar(type: Jar, dependsOn: remapJar) {
from remapJar.archiveFile.map { zipTree(it) }
from(rootProject.file("fake/fabric.mod.json")) {
into ""
}
archiveClassifier = 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
}
}
}
|