forked from InnovativeOnlineIndustries/Titanium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
171 lines (155 loc) · 4.61 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
plugins {
id 'java'
id 'maven-publish'
id 'fabric-loom' version '0.12-SNAPSHOT' apply false
}
if (rootProject == project){
apply plugin: "fabric-loom";
}
//apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle'
version = "${minecraft_version}-${project.api_version}"
if (System.getenv('BUILD_NUMBER') != null) {
version += "-" + System.getenv('BUILD_NUMBER')
}
group = 'com.hrznstudio'
archivesBaseName = 'titanium'
def isReleaseBranch = System.getenv("GIT_BRANCH") == "1.18-fabric";
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
/*license {
header = project.file('HEADER')
ext {
year = Calendar.getInstance().get(Calendar.YEAR)
name = 'Horizon Studio'
email = '[email protected]'
mod = 'Titanium'
}
}*/
loom {
accessWidenerPath = file("src/main/resources/titanium.accesswidener")
runs {
datagen {
server()
name = "Data Generation"
runDir = "build/datagen"
vmArg("-Dfabric-api.datagen")
vmArg("-Dfabric-api.datagen.output-dir=${file("src/main/generated")}")
}
}
}
repositories {
mavenCentral()
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
maven {
url "https://maven.tterrag.com/"
}
maven {
url 'https://www.dogforce-games.com/maven/'
}
maven {
name = 'parchment'
url = 'https://maven.parchmentmc.org'
}
maven {
url = uri("https://storage.googleapis.com/devan-maven/")
}
maven { url "https://maven.shedaniel.me/" }
maven {
url "https://maven.terraformersmc.com"
content {
includeGroup "com.terraformersmc"
}
}
maven {
name = "Fuzs Mod Resources"
url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/"
}
maven {
url "https://repo.repsy.io/mvn/distant/feltmc"
}
maven { url = "https://mvn.devos.one/snapshots/" }
maven { url 'https://jitpack.io' }
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${project.minecraft_version}:${project.mappings_version}@zip")
}
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
include modApi("teamreborn:energy:${project.tr_energy_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
modImplementation(include("net.minecraftforge:forgeconfigapiport-fabric:3.2.4"))
implementation("com.github.LlamaLad7:MixinExtras:0.1.1")
//modImplementation(include("com.github.FeltMC:ForgeFelt-EventBus:${rootProject.event_bus_hash}")) { transitive(false) }
include("io.github.fabricators_of_create:Porting-Lib:${project.port_lib_version}-beta+1.18.2-stable"){ transitive(false) }
modImplementation("io.github.fabricators_of_create:Porting-Lib:${project.port_lib_version}-beta+1.18.2-stable"){
exclude(group: "net.fabricmc.fabric-api")
exclude(group: "com.github.LlamaLad7")
}
modCompileOnly("mezz.jei:jei-${project.minecraft_version}-fabric-api:10.1.0.223")
modImplementation(include("io.github.feltmc:felt-screen-api:1.0.0"))
//modImplementation(include("io.github.feltmc:fabricated-forge-recipe-api:0.1.1"))
modApi("me.shedaniel.cloth:cloth-config-fabric:6.4.90") {
exclude(group: "net.fabricmc.fabric-api")
}
include("me.shedaniel.cloth:cloth-config-fabric:6.4.90")
modApi "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
}
processResources {
def toReplace = [
"version" : project.version
]
inputs.properties toReplace
filesMatching("fabric.mod.json") {
expand toReplace
}
}
java {
withSourcesJar()
}
/*task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}*/
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier 'deobf'
}
artifacts {
//archives sourcesJar
archives javadocJar
archives deobfJar
}
publish.dependsOn(project.tasks.getByName("assemble"))
publish.mustRunAfter(project.tasks.getByName("build"))
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
if (isReleaseBranch) {
maven {
url "file://" + System.getenv("local_maven")
}
} else {
mavenLocal()
}
}
}