0

Despite reading this popular post, I couldn't find the solution to building only a subset of a Java project.

So far I've tried:

  • Creating a new run/debug configuration with Build, no error check and removing Build.
  • Under Build, Execution, Deployment > Compiler, I have unchecked Automatically show first error in editor.
  • Inside Build, Execution, Deployment > Compiler > Java Compiler, I have selected Eclipse and checked Proceed on errors.

EDIT

I am using the latest version of Intellij with Gradle and JDK 1.8. I wrote some gibberish inside BrokenOnPurpose.java and the objective was to get the compiler to ignore the file. But instead, I get a "Task compileJava failed" with an error, stopped dead in its tracks.

src
├── main
│   ├── java
│   │   ├── BrokenOnPurpose.java
│   │   └── Main.java (*)
│   └── resources
└...
(*) entry method
Yann Hoffmann
  • 201
  • 2
  • 8
  • What exactly doesn't work for you? Does it stop on the first error without compiling any other files? Please provide the [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). – CrazyCoder Mar 26 '21 at 17:53
  • Yes, that's what it did. I've added more information in the post. – Yann Hoffmann Mar 26 '21 at 18:15

1 Answers1

1

You need to disable gradle build delegation for your compiler settings to have effect.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904