-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
81 lines (70 loc) · 2.55 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
/*
Build script for all mods.
In principle, building a mod is as simple as adding an empty build.gradle to the mod's directory and updating
settings.gradle.
*/
// For those who want the bleeding edge
buildscript {
repositories {
maven {
name = "forge"
url = "https://maven.neoforged.net/releases"
}
}
dependencies {
classpath group: 'net.neoforged', name: 'NeoGradle', version: '[6.0.21, 6.2)', changing: true
}
}
subprojects {
apply plugin: 'net.neoforged.gradle'
apply plugin: 'idea'
String modName = project.getName().replaceAll(/([a-z])([A-Z])/, /$1_$2/).toLowerCase()
version = "1.20.1-DEV.0"
group = "com.tomboshoven.minecraft." + project.getName().toLowerCase()
archivesBaseName = project.projectDir.name
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
minecraft {
mappings channel: 'official', version: '1.20.1'
runs {
client {
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run')
source sourceSets.main
}
server {
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run')
source sourceSets.main
}
data {
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
properties 'forge.logging.console.level': 'debug'
properties 'fml.earlyprogresswindow': 'false'
args '--mod', modName, '--all',
'--existing', file('src/main/resources/'),
'--existing', file('src/generated/resources/'),
'--output', file('src/generated/resources/')
workingDirectory project.file('run')
source sourceSets.main
}
}
}
// Add generated resources
sourceSets.main.resources {
srcDir 'src/generated/resources'
include 'assets/**', 'data/**', 'META-INF/**', 'logo.png', 'pack.mcmeta'
}
dependencies {
minecraft "net.neoforged:forge:1.20.1-47.1.105"
implementation 'com.google.code.findbugs:jsr305:3.0.2'
}
jar {
manifest {
attributes([
"Implementation-Version": getArchiveVersion(),
])
}
}
}