Gradle 1.3: build.gradle not building classes

丶灬走出姿态 提交于 2019-12-05 08:27:12

Without more information, it's hard to say. Maybe you put the source file into the wrong directory (default is src/main/java). Or the internal caches got corrupted (shouldn't happen, but try to delete the .gradle directory).

Do you get class files when you do gradle clean build? Note that a clean build is required whenever you switch between Gradle versions.

I had a similar issue where all of my classes were in src/main/java but none of the classes were showing up in the jar.

Issue was I was using Groovy. Adjusting it to src/main/groovy resolved the issue.

I had similar issue where I was already following the above hierarchy but also putted build.gradle inside the srcm/main/java/{{my project}}. Moving build.gradle to the project's root directory worked for me.

Let me know if it'll work for anyone else.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!