I want that a task get executed before the project get build
I’ve now done this:
compileJava.dependsOn generateSomeResourcesTask
All works fine when I run gradle from cmd but when I build the project inside Idea then the generateSomeResourcesTask
doesn’t get executed.
(It already works when the generateSomeResourcesTask
get executed manually before building the project)
1 Like
ddimitrov
(Dimitar Dimitrov)
2
Right-click the task in IDEAs Gradle view and choose “before zzz”
Is it possible to define this in the build.gradle?
1 Like
aeleneski
(Andrew Eleneski)
4
Were you able to resolve this in the build.gradle?
This should be that way to go.
It should be possible to edit the xml from idea that way to set this by default.
But this would only work when doing gradle idea
neocjmix
(Chanjin Park)
7
“Intellij build” is IDE function, not Gradle. so you cannot define any action with it in build.gradle.
Have you tried this?
with this option, Intellij runs gradle ‘build’ task before it builds the project and add gradle build path to classpath when it run the project.