-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.gradle
202 lines (161 loc) · 5.65 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
import java.nio.file.Files
buildscript {
repositories {
jcenter()
maven { url = "https://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven-publish'
version = "${mod_version}"
group = "it.hurts.metallurgy_reforged"
archivesBaseName = "Metallurgy-4-Reforged"
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
minecraft {
version = "${minecraft_version}-${forge_version}"
runDir = "run"
mappings = "stable_39"
//replace "@VERSION@", project.version
//replaceIn "Metallurgy.java"
}
repositories {
//Maven central repository (Groovy)
maven {
url 'https://repo.maven.apache.org/maven2'
name 'Maven Central'
}
//location of the maven that hosts JEI & TCon
maven {
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven"
}
//JEI maven fallback
maven {
name = "ModMaven"
url = "modmaven.k-4u.nl"
}
//Jared's Maven Repository (CraftTweaker)
maven {
name = 'jared maven'
url "https://maven.blamejared.com/"
}
maven {
name = 'curse maven'
url = "https://www.cursemaven.com"
}
//CurseForge maven as a final fallback (shouldn't be used at all as of this commit)
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven/"
}
}
dependencies {
//api = this is a dependency required both at runtime and at compile time. Moreover it is transitive (i.e. if A depends on B and B depends on C via api, then A can access C)
//implementation = this is a dependency required both at runtime and at compile time. It is not transitive (i.e. if A depends on B and B depends on C via implementation, then A cannot access C)
//runtimeOnly = this is a dependency only required at runtime. It won't be present at compile time
//compileOnly = this is a dependency only required at compile time. It won't be present at runtime
//compileOnly doesn't always stop things from loading at runtime
//provided = same as compileOnly, don't use
//compile = same as api, don't use
//runtime = same as runtimeOnly, don't use
implementation('org.codehaus.groovy:groovy-all:3.0.8')
//Compile against the JEI API but do not include it at runtime
compileOnly 'mezz.jei:jei_1.12.2:4.15.+:api'
//At runtime, use the full JEI jar
runtimeOnly 'mezz.jei:jei_1.12.2:4.15.+'
//Tinker Construct & Mantle
implementation 'slimeknights.mantle:Mantle:1.12-1.3.3.56'
implementation 'slimeknights:TConstruct:1.12.2-2.13.0.184'
compileOnly 'curse.maven:constructs_armory_1.2.5.10-287683:3174535'
//Industrial Foregoing
compileOnly 'curse.maven:industrialforegoing_api-266515:2745323'
//CraftTweaker
compileOnly 'CraftTweaker2:CraftTweaker2-API:4.1.20.631'
//compileOnly 'CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.586'
//ProjectE
compileOnly 'curse.maven:projecte_1.4.1-226410:2702991'
//Silent's Gems
compileOnly 'curse.maven:silent_lib_3.0.14+168-242998:2851111'
compileOnly 'curse.maven:silents_gems_2.8.22+237-220311:2804966'
//Immersive Engineering
compileOnly 'curse.maven:immersive_engineering_0.12_98-231951:2974106'
//Spartan Weaponry
compileOnly 'curse.maven:spartanweaponry_1.5.3-278141:4467344'
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
jar {
manifest {
attributes 'FMLAT': 'metallurgy_at.cfg'
}
destinationDir = file 'output'
}
sourceJar {
destinationDir = file 'output'
}
clean {
delete 'output'
delete 'mcmodsrepo'
}
//Used to stop the server just after it's started correctly if we're in a CI Environment
tasks.register('setupCiEnv', { task ->
task.group = 'build setup'
task.description = 'setups files to run CI Tests'
doFirst {
File ciEnvFile = new File(projectDir.getPath() + File.separatorChar + "ci_env")
if (!ciEnvFile.exists())
Files.createFile(ciEnvFile.toPath())
File eula = new File("${projectDir.getPath()}/run")
eula.mkdir()
FileWriter writer = new FileWriter("${eula.getPath()}/eula.txt")
writer.write("eula=true")
writer.close()
}
})
/*==============================================================================
= Class: build
= This class is part of Metallurgy 4: Reforged
= Complete source code is available at https://github.com/Davoleo/Metallurgy-4-Reforged
= This code is licensed under GNU GPLv3
= Authors: Davoleo, ItHurtsLikeHell, PierKnight100
= Copyright (c) 2018-2021.
=============================================================================*/
//Maven Repository
publishing {
publications {
metallurgy(MavenPublication) {
groupId = 'io.github.davoleo'
artifactId = 'metallurgy-4-reforged'
from components.java
}
}
repositories {
maven {
name "local"
url "file:///${project.projectDir}/mcmodsrepo"
}
maven {
name "github"
url "https://maven.pkg.github.com/Davoleo/Metallurgy-4-Reforged"
credentials {
username = ""
password = ""
}
}
}
}