Problem adding jars to project Lib in 12.1

Upgraded to 12.1 this morning.  In a Gradle project, I wanted to add a new lib assocated with the project.  I tried making a lib then adding the jars one at a time.  I tried adding the jars each as seperate libs.  None of this worked until I added the entrie directory.  I'm not sure if this is a product of the Gradle build or a bug in 12.1

6 comments

Hi Jonathan,

I'm afraid I don't understand what did you did and how it failed. Could you provide a screencast which illustrates the problem?

Also check if you have gradle auto-import enabled (project settings | gradle | use auto-import) and try to disable it if it's on.

Denis

0

As a follow up.  This appeares to have something to do with the Gradle association

I started with a project with a Gradle build file ( attached to this note).  Using the JetGradle plugin, I ran the wrapper task


task wrapper(type: Wrapper) { gradleVersion = '1.5' }

The task or the Gradle association pulled in other jars and added them to my project libraries.

I then wanted to add some more jars to the project library so I used File->project-Structure and went to Libraries.  I added a New Project Library.  I then wanted to add about 5 jars.  I first tried to highlight them and apply.  It appeared to work but did not show up on the Project Structure screen under the library.  I tried adding the jars one at a time as their own libraries.  Still nothing.  Finally I added a new project library and pointed it to a directory with the jars in it and that finally worked.

I've attached a screen shot of my Project Structure Libraries view.  I made the lib and webLib Libraries.  The others were pulled in by the Gradle build.

The project I started was very new as I am learning Gradle.  None of this had happened with 12.0 but 12.1 allows me to run some tasks and that is where the problem began.



Attachment(s):
2013-04-04 10_58_49-Project Structure.png
build.gradle.zip
0

How did you add a library? Did you add an empty library, pressed apply and then tried to add new jars or jar tried to add a new library and than proceeded to 'configure jars' part without committing the settings? What happened when you tried to perform the 'highlight them and apply' and 'adding the jars one at a time as their own libraries'? Did it just nothing?

Do you use gradle auto-import (project settings | gradle | use auto-import)? Does your scenario work at gradle-unaware project?

A screencast is still welcomed.

Denis

0

How did you add a library? Did you add an empty library, pressed apply and then tried to add new jars or jar tried to add a new library and than proceeded to 'configure jars' part without committing the settings? What happened when you tried to perform the 'highlight them and apply' and 'adding the jars one at a time as their own libraries'? Did it just nothing?

All of the above.  The project Library would be added but adding the jars to it, either later or at that time, did not add the jar to the lib.

Do you use gradle auto-import (project settings | gradle | use auto-import)? Does your scenario work at gradle-unaware project?


  I went to a non-Gradle project and added jars and a library and had no problem.

I had auto-import for Gradle on at the time and have since turned it off.  I made a smaller gradle project w/o auto import and was able to add new libraries to the project.

0

Tried to reproduce the problem locally but no luck so far. Will ask our QA to check

Denis

0

The problem has been reproduced http://youtrack.jetbrains.com/issue/IDEA-105035. We expect the fix for the 12.1.x branch.

Denis

0

Please sign in to leave a comment.