This repository has been archived by the owner on May 13, 2023. It is now read-only.
forked from DJRLincs/modern-warfare-BASIC
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
70 lines (55 loc) · 2 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
buildscript {
repositories {
// mavenCentral is currently not needed but could be useful in the future if we decide for example to use Jafama
// mavenCentral()
maven {
name 'Forge'
url 'https://maven.minecraftforge.net'
}
}
dependencies {
classpath 'com.anatawa12.forge:ForgeGradle:2.3-1.0.7'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
// Add version to the Jar name
version project.mod_version
minecraft {
version = "1.12.2-14.23.5.2847"
mappings = "stable_39"
runDir = "run"
def args = '-Dfml.coreMods.load=com.paneedah.weaponlib.core.WeaponlibCorePlugin'
clientJvmArgs.add(args)
serverJvmArgs.add(args)
replace('@VERSION@', project.mod_version)
replaceIn('ModReference.java')
}
processResources {
duplicatesStrategy = 'include'
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.mod_version
}
from ('src/main/java') {
include '**/*.png'
include '**/*.json'
include '**/*.vsh'
include '**/*.fsh'
}
}
sourceJar {
// Weird should not be needed at all, but something in Weapon Lib seems to be duplicated or something.
// Doing this works just fine so it will be good enough for now.
// For future reference or if anyone want to take a guess:
// Execution failed for task ':sourceJar'.
// > Entry com/paneedah/weaponlib/model/CameraModel.java is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.6/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
duplicatesStrategy = 'include'
}
jar {
manifest.attributes([
'ModSide': 'BOTH',
'FMLCorePlugin': 'com.paneedah.weaponlib.core.WeaponlibCorePlugin',
'FMLCorePluginContainsFMLMod': 'true',
'ForceLoadAsMod': 'true'
])
}