-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
115 lines (101 loc) · 3.83 KB
/
build.gradle
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import net.darkhax.curseforgegradle.TaskPublishCurseForge
plugins {
id 'multiloader-loader'
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'com.modrinth.minotaur' version '2.+'
id 'net.darkhax.curseforgegradle' version '1.+'
}
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings(loom.layered {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${parchment_mc}:${parchment_version}@zip")
})
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
modImplementation "dev.emi:trinkets:${trinkets_version}"
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-base:${cca_version}"
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${cca_version}"
modImplementation group: 'com.illusivesoulworks.spectrelib', name: 'spectrelib-fabric', version: "${spectrelib_version}"
modCompileOnly "curse.maven:reinforced-shulker-boxes-529874:5683674"
modCompileOnly "atonkish.reinfcore:reinforced-core:3.1.2+1.20"
modCompileOnly "curse.maven:elytra-slot-317716:5778732"
// modRuntimeOnly "curse.maven:reinforced-shulker-boxes-529874:4713841"
// modRuntimeOnly "atonkish.reinfcore:reinforced-core:3.1.2+1.20"
modRuntimeOnly("com.terraformersmc:modmenu:${mod_menu_version}") {
transitive = false
}
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
include group: 'com.illusivesoulworks.spectrelib', name: 'spectrelib-fabric', version: "${spectrelib_version}"
}
sourceSets {
main {
resources {
srcDirs += '../licenses'
}
}
}
fabricApi {
configureDataGeneration()
}
loom {
def aw = project(":common").file("src/main/resources/${mod_id}.accesswidener")
if (aw.exists()) {
accessWidenerPath.set(aw)
}
mixin {
defaultRefmapName.set("${mod_id}.refmap.json")
}
runs {
client {
client()
setConfigName("Fabric Client")
ideConfigGenerated(true)
runDir("runs/client")
}
server {
server()
setConfigName("Fabric Server")
ideConfigGenerated(true)
runDir("runs/server")
}
}
}
tasks.register('publishCurseForge', TaskPublishCurseForge) {
apiToken = findProperty('curseKey')
def projectId = "${cf_id}".toString()
def mainFile = upload(projectId, file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar"))
mainFile.changelogType = 'markdown'
mainFile.changelog = file('../CHANGELOG_LATEST.md')
mainFile.releaseType = "${release_type}"
"${release_versions}".split(',').each {
mainFile.addGameVersion("${it}")
}
mainFile.addRequirement("fabric-api")
mainFile.addRequirement("trinkets")
mainFile.withAdditionalFile(sourcesJar)
doLast {
if (project.hasProperty('cf_page') && mainFile.curseFileId != null) {
project.ext.curse_link = "${cf_page}/files/${mainFile.curseFileId}"
}
}
}
modrinth {
token = findProperty('modrinthKey') ?: 0
projectId = "${modrinth_id}"
versionName = getArchivesBaseName() + "-" + getVersion()
versionType = "${release_type}"
changelog = file('../CHANGELOG_LATEST.md').text
uploadFile = file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")
additionalFiles = [sourcesJar]
gameVersions = "${release_versions}".split(",") as List<String>
dependencies {
required.project 'fabric-api'
required.project 'trinkets'
}
}
tasks.modrinth.doLast {
if (project.hasProperty('modrinth_page') && tasks.modrinth.newVersion != null) {
project.ext.modrinth_link = "${modrinth_page}/version/${tasks.modrinth.newVersion.id}"
}
}