Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2925

Source Projects folder not showing java classes in gradle project

    XMLWordPrintableJSON

Details

    Description

      Start with a new gradle project

       
      Edit build.gradle and add the following
       
      sourcesets {
             main {
                      java

      {                      srcDirs = ['src','build/abc']                 }

       }
       
      A new Source Packages folder appeared in projects view tab
       
      Create a new class under this new source package called testabc.java (under default package) and build the project
        * The new java file appears in the sounce pane and is editable 

      • The new java file appears under the files tab under the chosen directory
      • After the build the class file appears in the build/classes folder
      • The new class doesn't appear in the new Source Packages folder. Instead a new default package is created but no java files underneath it.

       
      The issue is the last point

      Attachments

        1. GradleProjectNewSourceSet.zip
          29 kB
          Laszlo Kishalmi

        Issue Links

          Activity

            People

              lkishalmi Laszlo Kishalmi
              bobtedbob Peter Steele
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h