Skip to content

Commit 26c8235

Browse files
committed
Made mcmod.info actually work
1 parent 51ecd48 commit 26c8235

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,27 @@ jar {
9999
}
100100
}
101101

102+
processResources {
103+
// this will ensure that this task is redone when the versions change.
104+
inputs.property "version", project.version
105+
inputs.property "mcversion", "1.12.2"
106+
107+
duplicatesStrategy DuplicatesStrategy.WARN
108+
109+
// replace stuff in mcmod.info, nothing else
110+
from(sourceSets.main.resources.srcDirs) {
111+
include 'mcmod.info'
112+
113+
// replace version and mcversion
114+
expand 'version':project.version, 'mcversion':"1.12.2"
115+
}
116+
117+
// copy everything else except the mcmod.info
118+
from(sourceSets.main.resources.srcDirs) {
119+
exclude 'mcmod.info'
120+
}
121+
}
122+
102123
publishing {
103124
publications {
104125
mavenJava(MavenPublication) {

0 commit comments

Comments
 (0)