-
Notifications
You must be signed in to change notification settings - Fork 108
/
build.gradle
172 lines (144 loc) · 4.74 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
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.+'
}
version = mod_version
if (System.getenv('BUILD_NUMBER') != null) {
version += "." + System.getenv('BUILD_NUMBER')
}
group = 'com.hollingsworth.ars_nouveau' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
base {
archivesName = mod_id + '-' + minecraft_version
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
java.withSourcesJar()
subsystems {
parchment {
minecraftVersion = "1.21"
mappingsVersion = project.parchment_version
}
}
runs {
configureEach {
systemProperty 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
systemProperty 'forge.logging.console.level', 'debug'
modSource sourceSets.main
}
server {
programArgument '--nogui'
workingDirectory 'server'
}
data {
getArguments().addAll '--mod', mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
configurations {
runtimeClasspath.extendsFrom localRuntime
}
minecraft.accessTransformers.files(
file('src/main/resources/META-INF/accesstransformer.cfg')
)
repositories {
mavenLocal()
maven {
name = 'GeckoLib'
url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/'
content {
includeGroup("software.bernie.geckolib")
}
}
exclusiveContent {
forRepository {
maven {
url "https://cursemaven.com"
}
}
filter {
includeGroup "curse.maven"
}
}
maven {
name = "Illusive Soulworks maven"
url = "https://maven.theillusivec4.top/"
}
maven {
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
name = 'Forge'
url = "https://maven.minecraftforge.net"
}
maven {
name = "OctoStudios"
url = uri("https://maven.octo-studios.com/releases")
}
}
jarJar.enable()
tasks.named('jarJar') {}
dependencies {
implementation "net.neoforged:neoforge:${neo_version}"
implementation "software.bernie.geckolib:geckolib-neoforge-1.21.1:${geckolib_version}"
//
implementation(jarJar(group: 'vazkii.patchouli', name: 'Patchouli', version: '[1.21,)') {
jarJar.pin(it, patchouli_version)
})
localRuntime "com.illusivesoulworks.caelus:caelus-neoforge:${caelus_version}"
compileOnly "com.illusivesoulworks.caelus:caelus-neoforge:${caelus_version}:api"
compileOnly "mezz.jei:jei-1.21.1-neoforge-api:${jei_version}"
implementation "mezz.jei:jei-1.21.1-neoforge:${jei_version}"
implementation 'com.github.glitchfiend:TerraBlender-neoforge:1.21-4.0.0.0'
implementation "curse.maven:jade-324717:5444008"
implementation "top.theillusivec4.curios:curios-neoforge:${curios_version}+1.21"
// use localRuntime for adding mods to env that won't be listed as dependencies in the manifest
localRuntime 'curse.maven:ftb-teams-forge-404468:5631446'
localRuntime 'curse.maven:ftb-chunks-forge-314906:5710609'
localRuntime 'curse.maven:ftb-library-forge-404465:5754910'
localRuntime 'curse.maven:architectury-api-419699:5553800'
// implementation(jarJar(group: 'com.hollingsworth.nuggets', name: 'nuggets-neoforge-1.21', version:'[1.0.2,)'){
// jarJar.pin(it, '1.0.2.23')
// })
}
jar {
manifest {
attributes([
"Specification-Title": "ArsNouveau",
"Specification-Vendor": "baileyh",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": mod_version,
"Implementation-Vendor" :"baileyh",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": "ars_nouveau.mixins.json"
])
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
from components.java
}
}
repositories {
maven {
url "file://" + System.getenv("local_maven")
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}