Gradle - Intellij Build Issues

已回答

Hi,

I'm using Intellij (2022.2.1) and gradle (7.1). When i try to build a jar from my gradle task in intellij It builds the jar. But it doesn't have the changes in made in my java class. Its pointing to an older version of the java class. In order to fix this i have to invalidate the caches and restart and run all the gradle clean tasks and then run my task. Is there a better way of handling this or to make sure the gradle task always picks up the latest java class.

On the other hand if I go to the gradle task and then change the jar file name then it picks up the latest java class. Any thoughts or suggestion will be appreciated.

0

>But it doesn't have the changes in made in my java class.

How do you know this? Have you explored the produced jar? Does it have old classes?

>When i try to build a jar from my gradle task in intellij It builds the jar. But it doesn't have the changes in made in my java class.

What Gradle task do you execute from IntelliJ IDEA? What happens if you build by Gradle from the command line?

0

Andrey Dernov Yes i opened the jar using a decompiler (JD Gui) and then looked at the code. My code change was not reflected in the jar I built and deployed. So i opened it with the decompiler.

0

请先登录再写评论。