-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle
143 lines (121 loc) · 3.81 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
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.153'
}
version = "3.10.1"
group = "dev.gigaherz.guidebook"
Provider<String> minecraftVersion(Transformer<String, String> mapper) {
return project.userDevRuntime.runtimes.map(r -> r.values().first().specification.minecraftVersion).map(mapper)
}
base {
archivesName = minecraftVersion { "Guidebook-${it}" }
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
repositories {
maven {
url 'https://dogforce-games.com/maven'
}
maven {
url "https://maven.tterrag.com/"
}
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
maven {
// game stages
url 'https://maven.blamejared.com'
}
mavenLocal()
}
runs {
// applies to all the run configs below
configureEach {
systemProperty 'forge.logging.markers', '' // 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
//ideaModule "${project.name}.main"
workingDirectory project.file('run')
//programArguments.addAll "--mixin=jsonthings.mixins.json"
modSource project.sourceSets.main
}
client {
}
server {
}
}
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
subsystems {
parchment {
minecraftVersion="1.20.6"
mappingsVersion="2024.06.16"
}
}
dependencies {
implementation 'net.neoforged:neoforge:21.0.86-beta'
//compileOnly ("mezz.jei:jei-1.20-common-api:14.0.0.4")
//runtimeOnly fg.deobf("mezz.jei:jei-1.20-common:14.0.0.4")
//compileOnly ("mezz.jei:jei-1.20-forge-api:14.0.0.4")
//runtimeOnly fg.deobf("mezz.jei:jei-1.20-forge:14.0.0.4")
/*
compileOnly fg.deobf( "net.darkhax.gamestages:GameStages-Forge-1.19.2:11.0.2")
compileOnly fg.deobf( "net.darkhax.bookshelf:Bookshelf-Forge-1.19.2:16.1.4")
*/
}
jar {
from('/') {
include 'LICENSE.txt'
}
manifest {
attributes([
"Specification-Title": "guidebook",
"Specification-Vendor": "gigaherz",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": archiveVersion,
"Implementation-Vendor" :"gigaherz",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Maven-Artifact":"${project.group}:${project.archivesBaseName}:${project.version}"
])
}
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
project.afterEvaluate {
publish.dependsOn('build')
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.archivesBaseName
from components.java
}
}
repositories {
if (findProperty("RELEASE") && System.env.giga_maven_host != null) {
System.out.println("Remote publish enabled on " + System.env.giga_maven_host)
maven {
url System.env.giga_maven_host
credentials {
username System.env.giga_maven_user
password System.env.giga_maven_password
}
}
}
else {
System.out.println("Remote publish disabled.")
maven {
url "$projectDir/../CommonMaven"
}
}
}
}
}