forked from MinecraftForge/MinecraftForge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_forge_eclipse.gradle
44 lines (38 loc) · 1.56 KB
/
build_forge_eclipse.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
apply plugin: 'eclipse'
eclipse {
classpath.file.whenMerged {
def minecraft = entries.find { it.path == 'src/main/java' }
if (minecraft === null) throw new IllegalStateException("You must run `setup` task before importing")
// Disable optional warnings on the minecraft decompiled source code. It just muddies the warning window and hides warnings in our own codebase
minecraft.entryAttributes['ignore_optional_problems'] = 'true'
def mods = [
'src/main/java': 'minecraft',
'src/main/resources': 'minecraft',
'src/test/java': 'minecraft-test',
'src/test/resources': 'minecraft-test',
'main-java': 'forge',
'main-resources': 'forge',
'generated': 'forge',
'test-java': 'forge-test',
'test-resources': 'forge-test',
'test-generated': 'forge-test',
]
entries.forEach { e ->
if ('src'.equals(e.kind) && e.hasProperty('output')) {
if (mods.containsKey(e.path))
e.output = 'bin/' + mods[e.path]
//else
// throw new IllegalStateException('Unknown path: ' + e.toString())
}
}
}
// Filter out the run directory
project.resourceFilter {
appliesTo = 'FOLDERS'
type = 'EXCLUDE_ALL'
matcher {
id = 'org.eclipse.ui.ide.multiFilter'
arguments = '1.0-name-matches-false-true-run'
}
}
}