mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
This has a minor change to development time build scripts. So developers, check the MDK
44 lines
1.6 KiB
Groovy
44 lines
1.6 KiB
Groovy
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'
|
|
}
|
|
}
|
|
} |