generated from FabricMC/fabric-example-mod
-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathbuild.gradle
130 lines (104 loc) · 4.29 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
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'io.github.juuxel.loom-quiltflower' version '1.7.+'
}
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
apply from: 'resources.gradle'
loom {
runtimeOnlyLog4j = true
}
repositories {
maven { url 'https://maven.terraformersmc.com/releases/' }
maven { url 'https://maven.shedaniel.me/' }
maven { url 'https://repo.repsy.io/mvn/enderzombi102/mc/' }
//maven { url 'https://storage.googleapis.com/devan-maven/' } // seems to be an old repository for AARP? it doesnt exist anymore
//maven { url 'https://ueaj.dev/maven' } // this is apparently where AARP is supposed to reside now, but at the time of writing (Oct 7 2023) its https is broken and therefore doesnt work
// because of the things outlined above, ive had to resort to using curseforge maven, and a different version of AARP. my apologies
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven { url 'https://gitlab.com/api/v4/projects/25805200/packages/maven' } //https://gitlab.com/jfmods/LibJF
maven { url 'https://api.modrinth.com/maven' }
mavenCentral()
}
dependencies {
def noFAPI = {
exclude(group: 'net.fabricmc.fabric-api')
}
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:$minecraft_version"
mappings "net.fabricmc:yarn:$minecraft_version+$yarn_mappings:v2"
modImplementation "net.fabricmc:fabric-loader:$loader_version"
modImplementation "net.fabricmc.fabric-api:fabric-api:$fabric_version"
modRuntimeOnly modApi("me.shedaniel.cloth:cloth-config-fabric:$cloth_config_version", noFAPI)
modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:$rei_version"
// ive had to change this to use curseforge (ew) for the time being due to broken maven nonsense
//include modImplementation("net.devtech:arrp:$arrp_version") // this should be able to be uncommented once the maven is fixed https://github.com/Devan-Kerman/ARRP/issues/92
include modImplementation("curse.maven:arrp-463113:3680866-sources-3680393")
include modImplementation("com.enderzombi102:JythonMC:$jythonmc_version")
compileOnly "com.enderzombi102:loadercomplex-api:$lc_version"
modImplementation "maven.modrinth:valleycraft:$valleycraft_version"
modImplementation("com.terraformersmc:modmenu:$modmenu_version") {
transitive(false)
}
include modImplementation("io.gitlab.jfronny.libjf:libjf-data-manipulation-v0:${project.jfapi_version}", noFAPI)
include modImplementation("io.gitlab.jfronny.libjf:libjf-unsafe-v0:${project.jfapi_version}", noFAPI)
include "io.gitlab.jfronny.libjf:libjf-base:${project.jfapi_version}"
modRuntimeOnly "io.gitlab.jfronny.libjf:libjf-devutil-v0:${project.jfapi_version}", noFAPI
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}
application {
mainClass = 'fr.anatom3000.gwwhit.commandline.CommandLine'
}
processResources {
inputs.property 'version', version
inputs.property 'codename', project.ext.codename
filesMatching('fabric.mod.json') {
expand([
'version': version,
'codename': project.ext.codename
])
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
withSourcesJar()
}
jar {
from('LICENSE') {
rename {"${it}_$archivesBaseName"}
}
manifest.attributes += [
'Main-Class': 'fr.anatom3000.gwwhit.commandline.CommandLine',
'LoaderComplex-AddonId': 'gwwhit',
'LoaderComplex-Version': archiveVersion,
'LoaderComplex-Main': 'fr.anatom3000.gwwhit.compat.LoaderComplexCompat'
]
exclude('fr/anatom3000/gwwhit/DevUtils*')
}
shadowJar {
dependencies {
include( dependency('com.google.code.gson:gson') )
}
minimize()
}
test {
useJUnitPlatform()
}
//noinspection UnnecessaryQualifiedReference // The import kept breaking
task relocateShadowJar(type: com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = 'fr.anatom3000.gwwhit.shadow'
}
tasks.shadowJar.dependsOn tasks.relocateShadowJar