-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
145 lines (124 loc) · 4.46 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
plugins {
id 'eclipse'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.+'
id 'io.github.0ffz.github-packages' version '[1,2)'
id 'com.matthewprenger.cursegradle' version '[1.4,1.5)'
id 'com.modrinth.minotaur' version '[2,3)'
}
version = "${mc_version}-${mod_version}-neoforge"
group = 'com.aetherteam.emissivity' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
base {
archivesName = mod_id
}
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
configureEach {
workingDirectory project.file('run')
systemProperty "${mod_id}.iside", 'true'
systemProperty 'forge.logging.console.level', 'info'
modSource project.sourceSets.main
}
client {
systemProperty 'forge.enabledGameTestNamespaces', mod_id
}
server {
systemProperty 'forge.enabledGameTestNamespaces', mod_id
programArgument '--nogui'
}
gameTestServer {
systemProperty 'forge.enabledGameTestNamespaces', mod_id
}
data {
programArguments.addAll '--mod', mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath(), '--existing', file('src/generated/resources/').getAbsolutePath(), '--existing-mod', 'aether'
}
}
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
dependencies {
implementation "net.neoforged:neoforge:${project.neoforge_version}"
implementation "com.aetherteam.aether:aether:${project.aether_version}"
implementation "com.aetherteam.nitrogen:nitrogen_internals:${project.nitrogen_version}"
implementation "com.aetherteam.cumulus:cumulus_menus:${project.cumulus_version}"
implementation "top.theillusivec4.curios:curios-neoforge:${project.curios_version}+${project.mc_version}"
}
repositories {
maven { url = "https://jitpack.io" }
maven { url = "https://maven.theillusivec4.top/" }
maven githubPackage.invoke("The-Aether-Team/The-Aether")
maven githubPackage.invoke("The-Aether-Team/Nitrogen")
maven githubPackage.invoke("The-Aether-Team/Cumulus")
}
tasks.named('jar', Jar).configure {
manifest {
attributes([
"Specification-Title" : project.mod_name,
"Specification-Vendor" : "The Aether Team",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.mod_name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "The Aether Team",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
compileJava {
options.incremental = false
}
tasks.register('sourceJar', Jar) {
dependsOn 'classes'
from sourceSets.main.allSource
archiveClassifier = 'sources'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.archivesBaseName
artifact project.jar
artifact project.sourceJar
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/The-Aether-Team/Emissivity"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
curseforge {
project {
apiKey = System.getenv("CURSEFORGE_TOKEN")
id = "${project.curseforge_id}"
releaseType = "${project.version_type}"
changelog = file("$rootDir/docs/CHANGELOG.md")
changelogType = "markdown"
addGameVersion("${project.mc_version}")
addGameVersion("NeoForge")
mainArtifact(tasks.jar) {
displayName = "${project.mod_name} - ${version}"
relations {
requiredDependency "aether"
}
}
}
}
modrinth {
token = System.getenv("MODRINTH_TOKEN")
projectId = "${project.modrinth_id}"
versionNumber = "${version}"
versionType = "${project.version_type}"
versionName = "${project.mod_name} - ${version}"
changelog = new File("$rootDir/docs/CHANGELOG.md").text
uploadFile = tasks.jar
gameVersions = ["${project.mc_version}"]
loaders = ["neoforge"]
dependencies {
required.version "aether", "${project.aether_version}"
}
}