-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
150 lines (130 loc) · 3.99 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
plugins {
id 'maven-publish'
id 'java'
id 'eclipse'
id 'idea'
id 'net.minecraftforge.licenser' version '1.0.1'
id 'net.minecraftforge.gradleutils' version '[2.3,2.4)'
id 'net.minecraftforge.gradle' version '[6.0,6.1)'
}
repositories {
mavenCentral()
}
changelog {
from '1.0'
}
ext {
GIT_REPO = 'LexManos/CobbleForDays'
}
dependencies {
minecraft 'net.minecraftforge:forge:1.21-51.0.28'
// Hack fix for now, force jopt-simple to be exactly 5.0.4 because Mojang ships that version, but some transtive dependencies request 6.0+
implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } }
}
sourceSets {
main {
resources {
srcDirs += ['src/generated/resources']
}
}
}
minecraft {
mappings channel: 'official', version: '1.21'
//accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
client {
workingDirectory project.file('run')
//property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
mods {
cobblefordays {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
//property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
mods {
cobblefordays {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
//property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.console.level', 'debug'
args '--mod', 'cobblefordays', '--all', '--output', file('src/generated/resources/'), '--existing', sourceSets.main.resources.srcDirs[0]
mods {
cobblefordays {
source sourceSets.main
}
}
}
}
}
group = 'net.minecraftforge.lex'
version = gradleutils.tagOffsetVersion
logger.lifecycle('Version: ' + version)
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
java.withSourcesJar()
license {
header project.file('LICENSE-header.txt')
newLine false
}
ext {
changelog = rootProject.file('build/changelog.txt')
MANIFEST = manifest{
attributes([
'Specification-Title': project.name,
'Specification-Vendor': 'Forge Development LLC',
'Specification-Version': project.version,
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'Forge Development LLC'
] as LinkedHashMap)
}
}
compileJava {
options.encoding = 'UTF-8'
}
sourceSets.each {
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
it.output.resourcesDir = dir
it.java.destinationDirectory = dir
}
jar {
manifest.from(MANIFEST)
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = project.archivesBaseName
packaging = 'jar'
url = "https://github.com/${GIT_REPO}"
scm {
url = "https://github.com/${GIT_REPO}"
connection = "scm:git:git://github.com/${GIT_REPO}.git"
developerConnection = "scm:git:[email protected]:${GIT_REPO}.git"
}
issueManagement {
system = 'github'
url = "https://github.com/${GIT_REPO}/issues"
}
developers {
developer {
id = 'LexManos'
name = 'Lex Manos'
}
}
}
}
}
repositories {
maven gradleutils.publishingForgeMaven
}
}