



Val unzipFiles by tasks.registering(Sync::class) /sources.jar", but you said the source jar is coming from a maven repository. Val sourcesJar: Configuration by configurations.creating Perhaps you might find a solution to automatically running compile after clean here: Gradle tasks | IntelliJ IDEA After clean, if you run the Gradle task (from IntelliJ or command line) “compileJava” or “build” or “classes” …anything that will trigger “compileJava” to run, then the files will be unzipped again due to the task dependencies. After you set this up, you will have to do “Reload All Gradle Projects” from the Gradle tool tab in IntelliJ for it to fully recognize these changes.Īs far as the build issues in IntelliJ after clean, I don’t know if there is a way that IntelliJ can be aware that a clean happened and automatically execute a compile task. Just change the dependency to a Maven format.Īfter building/compiling, you will see that the sources files are in build/tmp/unzipFiles, and you will see that the files were compiled into build/classes/java/main. I made this example using a configuration. Here is a simple example that I tried and got to work doing what you are trying to do. You want it to automatically read those things from the Gradle configuration directly itself. Don’t want to manually configure project modules in IntelliJ.
