Reputation: 1095
I need to include the mail-1.4.7 jar file into my intellij idea project library through gradle build. I added the compile repository name into my build.gradle file as below:
compile 'javax.mail:mail:1.4.7'
Then i ran my build and although there is no error during the build, i am unable to see the jar in my project library. I was thinking through the gradle build, the jar will be managed automatically. Not sure if i need to try something else. I also tried running gradle :cleanIdea but without success.
Upvotes: 12
Views: 18417
Reputation: 1095
Finally i was able to resolve this. I reverted all changes to start again. Followed the below steps:
compile 'javax.mail:mail:1.4.7'
to dependencies in build.gradle
file.gradle build
which will download the jar file to put in the repositories.gradle cleanIdea
gradle idea
This resolved all the problems with the cleanidea
clearing the iml files for intellij and regenerating through gradle idea
command.
Upvotes: 17