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.
To add a dependency to your project, specify a dependency configuration such as implementation in the dependencies block of your module's build. gradle file. This declares a dependency on an Android library module named "mylibrary" (this name must match the library name defined with an include: in your settings.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With