idea build failed using default gradle script
SrRapero720 opened this issue ยท 1 comments
there is two lines in build.gradle that doesn't work in intelliJ
DIFF Plugin
first is the diff plugin. by default intelliJ can't find it and doesn't load the project by that
reading some articles i found plugins can be applied conditionally
plugins {
id 'eclipse'
id 'idea'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.spongepowered.mixin'
id 'com.modrinth.minotaur' version '2.+'
id 'com.matthewprenger.cursegradle' version '1.4+'
}
// === Checks that ignores this plugin using intelliJ
// === Maybe exists any other neat way to detect if IDE is eclipse
// === if any of these lets the diff plugin be applied, then is a win-win for all
// System.getProperty("idea.version") == null
// eclipse.project == null
if (idea.getWorkspace() == null) {
apply plugin: 'com.diffplug.eclipse.apt'
}
modDependencies = []
idk from where it comes (probably diff plugin) but this property never exists when is on intelliJ
can be easier fixed just checking if the field exists
if (project.hasProperty('modDependencies')) {
modDependencies = []
}
UPDATE
after do some cleanup of my git setup, i didn't notice my ForgeMods branch was super outdated and had that field missing,
so, its fine, ignore this