-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
146 lines (126 loc) · 4.18 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
plugins {
id 'fabric-loom' version '1.3-SNAPSHOT'
id 'maven-publish'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id "com.modrinth.minotaur" version "2.+"
}
import groovy.json.JsonSlurper
import groovy.json.JsonOutput
import com.modrinth.minotaur.dependencies.ModDependency
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
base {
archivesName = project.modName
}
version = project.mod_version
group = project.maven_group
repositories {
maven { url "https://libs.azuredoom.com:4443/mods"}
maven { url "https://dl.cloudsmith.io/public/tslat/sbl/maven/" }
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://cfa2.cursemaven.com" }
maven { url "https://maven.shedaniel.me/" }
maven { url "https://api.modrinth.com/maven" }
maven { url "https://maven.terraformersmc.com" }
maven { url "https://maven.parchmentmc.org" }
maven { url "https://api.modrinth.com/maven" }
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabricVersion}"
modImplementation "net.tslat.smartbrainlib:SmartBrainLib-fabric-1.20:${project.sbl_version}"
modImplementation "net.tslat.smartbrainlib:SmartBrainLib-common-1.20:${project.sbl_version}"
modImplementation "mod.azure.azurelib:azurelib-fabric-${project.minecraft_version}:${project.azurelib_version}"
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
modApi "dev.architectury:architectury-fabric:${project.arch_version}"
modApi "me.shedaniel.cloth:cloth-config-fabric:${project.cloth_version}"
}
processResources {
inputs.property "version", project.mod_version
filesMatching("fabric.mod.json") {
expand "version": project.mod_version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
loom {
accessWidenerPath = file("src/main/resources/arachnids.accesswidener")
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}
repositories {
}
}
if (file('key.properties').exists()) {
curseforge {
def curseProp = new Properties()
File secretPropsFile = file("key.properties")
curseProp.load(secretPropsFile.newInputStream())
project {
apiKey = curseProp.getProperty('curseKey')
id = "${curse_id}"
releaseType = "${curse_release}"
changelogType = 'text'
changelog = file('CHANGELOG.txt')
addGameVersion("1.20.1")
addGameVersion("Fabric")
addGameVersion("Quilt")
addGameVersion("Java 17")
relations {
requiredDependency 'fabric-api'
requiredDependency 'azurelib'
requiredDependency 'smartbrainlib'
}
mainArtifact(remapJar)
afterEvaluate {
uploadTask.dependsOn("remapJar")
}
}
options {
forgeGradleIntegration = false
}
}
}
if (file('key.properties').exists()) {
modrinth {
def modrinthProp = new Properties()
File secretPropsFile = file("key.properties")
modrinthProp.load(secretPropsFile.newInputStream())
token = modrinthProp.getProperty('modrinthKey')
projectId = project.modrinth_id
versionNumber = project.mod_version
uploadFile = remapJar
changelog = rootProject.file("changelog.txt").text
gameVersions = ['1.20.1']
loaders = ['fabric','quilt']
dependencies {
required.project "azurelib"
required.project "smartbrainlib"
required.project "fabric-api"
optional.project "modmenu"
optional.project "rei"
}
}
}