You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "wayne-zhang (via GitHub)" <gi...@apache.org> on 2023/05/18 02:54:53 UTC

[GitHub] [netbeans] wayne-zhang opened a new issue, #5958: Gradle Project Can't Regconise and Change Java Source/Binary Level

wayne-zhang opened a new issue, #5958:
URL: https://github.com/apache/netbeans/issues/5958

   ### Apache NetBeans version
   
   Apache NetBeans 17
   
   ### What happened
   
   Open a Gradle project by Netbeans, it can't recognize source and binary Java level in build.gradle file. See the screenshot attached. 
   
   In this example project, source and binary level set to 1.8 but Netbeans recognized it as 1.5.
   
   Create a new Gradle project, source level sets to 1.5 and can't be changed in Netbeans.
   
   ![netbeans-gradle-bug](https://github.com/apache/netbeans/assets/3071035/5b87ac47-220c-4d3c-a2f6-13128fc8375e)
   
   
   ### How to reproduce
   
   Open an existing Gradle project that defined source/binary level other than 1.5.
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10
   
   ### JDK
   
   Java 8, Java 11
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on issue #5958: Gradle Project Can't Regconise and Change Java Source/Binary Level

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on issue #5958:
URL: https://github.com/apache/netbeans/issues/5958#issuecomment-1566607402

   >However, the source/binary target level in Gradle project properties is ALWAYS 1.5 and can't be changed, it will be great if it can set to the correct value (from Gradle build file build.gradle) and can be changed in NetBeans' project configuration.
   
   Well, that's strange. I think there is some edge case in your project. You might get the project attached or just build NetBeans yourself and debug the following function:
   
   https://github.com/apache/netbeans/blob/711207c11ba278c94b05d931ebd5fdc3a4b55d9f/java/gradle.java/src/org/netbeans/modules/gradle/java/api/GradleJavaSourceSet.java#L180


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] wayne-zhang commented on issue #5958: Gradle Project Can't Regconise and Change Java Source/Binary Level

Posted by "wayne-zhang (via GitHub)" <gi...@apache.org>.
wayne-zhang commented on issue #5958:
URL: https://github.com/apache/netbeans/issues/5958#issuecomment-1566544391

   Hi @lkishalmi,
   I did further test/investigation and found that it is NOT a bug of Gradle plugin actually, it possible caused by my NetBeans workspace has corrupted (I always use the same workspace for any release of NetBeans, I upgrade NetBeans where there is a new release and share the workspace). When I delete the Gradle project that has compilation errors in NetBeans IDE (not in Gradle build console), open the project again, and the compilation error (that caused by source level) disappeared.
   
   When I copy my project (that has problem) to a different folder, try to upload as an example project to this JIRA, I found it can be opened without any issue. So I found it's a corrupted workspace issue.
   
   **This issue can be closed.** 
   
   However, the source/binary target level in Gradle project properties is ALWAYS 1.5 and can't be changed, it will be great if it can set to the correct value (from Gradle build file build.gradle) and can be changed in NetBeans' project configuration.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on issue #5958: Gradle Project Can't Regconise and Change Java Source/Binary Level

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on issue #5958:
URL: https://github.com/apache/netbeans/issues/5958#issuecomment-1553942908

   I cannot reproduce this one. Using NetBeans 18-rc3.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on issue #5958: Gradle Project Can't Regconise and Change Java Source/Binary Level

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on issue #5958:
URL: https://github.com/apache/netbeans/issues/5958#issuecomment-1553943188

   Additional info. Sample project would be nice!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] wayne-zhang commented on issue #5958: Gradle Project Can't Regconise and Change Java Source/Binary Level

Posted by "wayne-zhang (via GitHub)" <gi...@apache.org>.
wayne-zhang commented on issue #5958:
URL: https://github.com/apache/netbeans/issues/5958#issuecomment-1566670298

   I used a new workspace and tested, a brand new Gradle project created works (source/binary Java level reads from build.gradle correctly) but open an existing (legacy) Gradle project doesn't work - source/binary level sets to 1.8 but Netbeans reads it as 1.5.
   
   [BigFraction.zip](https://github.com/apache/netbeans/files/11589400/BigFraction.zip)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists