Hi Laszlo,

I'm sorry, i dont quite get what you mean.

If i select Use Wrapper, and and use either Custom or Standard, it does not
matter - if the wrapper in the project
./gradle/wrapper/gradle-wrapper.properties is present in
./.gradle/wrappers/dist, then it will use the wrapper. If the wrapper is
not present in ./.gradle/wrapper/dist then it will not, and NB will use the
Standard version?

I tested with a couple of projects and breakpoints.

Regards
Jonathan

On Tue, Mar 17, 2020 at 2:07 AM Laszlo Kishalmi <[email protected]>
wrote:

> Well, first just test what happens if you do not select the default.
> Ideally Gradle would download the required binary. There was something
> around that (if I remember well). So let's test how Gradle behaves and
> plan according to that.
>
> On 3/16/20 5:03 PM, Jonathan Bergh wrote:
> > Hi Laszlo,
> >
> > So i have inspected the code and can confirm the above behaviour (even if
> > Use Wrapper is selected, if the wrapper dist is missing, NB will default
> to
> > NB default).
> >
> > 1) Can we confirm the agreed behaviour then - that IF Use Wrapper is
> > selected, even if the gradle dist is missing, this will be downloaded?
> This
> > seems to be the point of wrapper so i suggest this.
> > 2) What do we do while the dist is downloading (assume we use a
> > RequestProcessor for download in background?). Do we block until download
> > is complete? or what do we do?
> >
> > Thanks
> > Regards
> > Jon
> >
> >
> > On Mon, Mar 16, 2020 at 4:40 PM Laszlo Kishalmi <
> [email protected]>
> > wrote:
> >
> >> On 3/15/20 6:03 PM, Jonathan Bergh wrote:
> >>> OK, thanks Laszlo,
> >>>
> >>> That makes sense, at least i am not going crazy ;) !
> >>>
> >>> I have just downloaded Netbeans project now, and am building it, so
> >>> hopefully i can have a look too. Maybe i can ask you some questions
> about
> >>> your implementation and we fix it together.
> >> Wow, that's great! Here are some hints to get you started:
> >>
> >> Once you've built NetBeans, you can load the groovy/gradle project into
> >> NetBeans
> >>
> >> put a breakpoint to:
> >>
> org.netbeans.modules.gradle.api.execute.RunUtils.evaluateGradleDistribution,
> >>
> >> then choose Debug project to start aNetBeans debug instance, you might
> >> need to enable the java and groovy pluginsagain there and load your
> >> project, then build. The breakpoint will be hit.
> >>
> >>> Thanks for all your help / work so far,
> >>> Much appreciated
> >>> Jonathan
> >>>
> >>> PS i have tested again, and yes, if i manually download the wrapper,
> then
> >>> Netbeans selects the correct wrapper and builds with that. If not, it
> >>> default back to the main NB system gradle.
> >>>
> >>> On Mon, Mar 16, 2020 at 2:57 AM Laszlo Kishalmi <
> >> [email protected]>
> >>> wrote:
> >>>
> >>>> On 3/15/20 5:45 PM, Jonathan Bergh wrote:
> >>>>> The IDE itself needs to run on Java 8 in order to be able to use
> Gardle
> >>>>> 4.10 and less. It is not enough to set up the project compile options
> >> to
> >>>>> point to Java 8. It is because the listening part of the Gradle
> daemon
> >>>>> would be run in the same JVM as the IDE, the executor part can run
> on a
> >>>>> separate JVM.
> >>>>>
> >>>>> Yes, i was running the IDE in /etc/netbeans.conf on JDK 1.8 (Oracle)
> >> and
> >>>> i
> >>>>> could not get it to use the wrapper.
> >>>>>
> >>>>> Even now, using JDK 11 (OpenJDK), if i update
> >>>>> ./gradle/wrapper/gradle-wrapper.properties from 4.10.2 to 4.10.3,
> then
> >>>>> reload the project in Netbeans (Reload Project), and then Clean and
> >>>> Build,
> >>>>> if i do not have the wrapper previously downloaded, then it default
> to
> >>>>> Gradle 6.2.2.
> >>>> Just reading the code, that could happen. Probably yet another bug to
> >>>> cover for 12.0.
> >>>>> Am i misunderstanding something? Am i supposed to run ./gradlew.bat
> >>>> wrapper
> >>>>> from the CMDLine to download the wrapper, or why should Netbeans not
> >>>>> "sense"the change to the wrapper and redownload the new (4.10.3)
> gradle
> >>>>> version?
> >>>>>
> >>>>> It seems to me, Netbeans only uses the wrapper *if it is already
> >>>> downloaded
> >>>>> previously* and does not initiate download of the wrapper when
> loading
> >> a
> >>>>> project?
> >>>>>
> >>>>> best regards
> >>>>> jonathan
> >>>>>
> >>>>> How should the Options -> Gradle configurations be?
> >>>>>
> >>>>> On Mon, Mar 16, 2020 at 1:34 AM Laszlo Kishalmi <
> >>>> [email protected]>
> >>>>> wrote:
> >>>>>
> >>>>>> The IDE itself needs to run on Java 8 in order to be able to use
> >> Gardle
> >>>>>> 4.10 and less. It is not enough to set up the project compile
> options
> >> to
> >>>>>> point to Java 8. It is because the listening part of the Gradle
> daemon
> >>>>>> would be run in the same JVM as the IDE, the executor part can run
> on
> >> a
> >>>>>> separate JVM.
> >>>>>>
> >>>>>> BTW. Just tested running the IDE on JAVA 8 uses the wrapper coming
> >> with
> >>>>>> your project. BTW thanks for the project details. So you have two
> >>>> options:
> >>>>>> - Use NetBeans on Java 8
> >>>>>>
> >>>>>> - Upgrade wrapper to at least 4.10.2
> >>>>>>
> >>>>>> Created an issue on this:
> >>>>>>
> >>>>>> https://issues.apache.org/jira/browse/NETBEANS-4014
> >>>>>>
> >>>>>> On 3/15/20 2:15 PM, Jonathan Bergh wrote:
> >>>>>>> Hi Laszlo,
> >>>>>>>
> >>>>>>> Thanks for the response - actually, i have tested with both Java 8
> >>>>>> (Oracle)
> >>>>>>> and JDK 11 (OpenJDK) and with JDK1.8, still it does not use the
> >>>> wrapper?
> >>>>>>> Is this because Netbeans 11.3 needs to run on >JDK9?
> >>>>>>>
> >>>>>>> Should it use the wrapper if IDE is running JDK 1.8?
> >>>>>>>
> >>>>>>> Thanks Jonathan
> >>>>>>>
> >>>>>>> On Sun, Mar 15, 2020 at 10:38 PM Laszlo Kishalmi <
> >>>>>> [email protected]>
> >>>>>>> wrote:
> >>>>>>>
> >>>>>>>> The big question. What version of Java are you running the IDE
> with?
> >>>>>>>>
> >>>>>>>> We cannot use Gradle runtime 4.6 (or anything below 4.10.2) with
> >> java
> >>>> 11
> >>>>>>>> or above, so we fall back to the Gradle version shipped with the
> >> IDE.
> >>>>>>>> So try to run it when the IDE is running on Java 8 or upgrade your
> >>>>>>>> projects to Gradle 4.10.2 at least.
> >>>>>>>>
> >>>>>>>> BTW, yes it would be nice if the Nb would call out this issue and
> >> not
> >>>>>>>> just doing some silent changes.
> >>>>>>>>
> >>>>>>>> On 3/15/20 11:22 AM, Jonathan Bergh wrote:
> >>>>>>>>> Hi Laszlo,
> >>>>>>>>>
> >>>>>>>>> Yes, i can. I'll have to sanitise it quite a lot though. I'll
> send
> >> to
> >>>>>>>> your
> >>>>>>>>> personal email if you dont mind ...
> >>>>>>>>>
> >>>>>>>>> Regards
> >>>>>>>>> Jonathan
> >>>>>>>>>
> >>>>>>>>> On Sun, Mar 15, 2020 at 7:54 PM Laszlo Kishalmi <
> >>>>>>>> [email protected]>
> >>>>>>>>> wrote:
> >>>>>>>>>
> >>>>>>>>>> Just for curiousity, can you zip the project base dir content +
> >> the
> >>>>>>>>>> gradle directory and put it somewhere? No other sources are
> >>>> required,
> >>>>>>>>>> just the settings.gradle, build.gradle, gradlew, gradlew.bat and
> >> the
> >>>>>>>>>> gradle directory (recursively)
> >>>>>>>>>>
> >>>>>>>>>> On 3/15/20 10:36 AM, Jonathan Bergh wrote:
> >>>>>>>>>>> I have restarted NB, same behaviour.
> >>>>>>>>>>>
> >>>>>>>>>>> Did you clear your .gradle/wrapper/dists directory? If i have a
> >>>>>>>>>> successful
> >>>>>>>>>>> build via cmdline, and the correct wrapper is downloaded, then
> >> yes,
> >>>>>> it
> >>>>>>>>>>> works fine. Trying a wrapper build inside NB always defaults to
> >> the
> >>>>>>>> 6.2.2
> >>>>>>>>>>> installation.
> >>>>>>>>>>>
> >>>>>>>>>>> Even when opening NB fresh, i can see Gradle 6.2.2 complaining
> >>>> about
> >>>>>>>>>>> plugins which work only with the older wrapper 4.6.
> >>>>>>>>>>>
> >>>>>>>>>>> Regards
> >>>>>>>>>>> Jonathan
> >>>>>>>>>>>
> >>>>>>>>>>> On Sun, Mar 15, 2020 at 7:28 PM Patrick Musembi <
> >>>>>>>> [email protected]
> >>>>>>>>>>> wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>> Mine works fine. Even after setting the path on Gradle
> >>>>>>>>>> distribution->Custom
> >>>>>>>>>>>> to 5.4 uses the wrapper. I don't know if you should restart
> >>>>>> netbeans?
> >>>>>>>>>>>> On Sun, Mar 15, 2020, 20:16 Jonathan Bergh <
> >>>>>> [email protected]>
> >>>>>>>>>>>> wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>>> hi @patrick
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> So in Option -> Gradle, selecting Custom (leaving entry
> blank)
> >>>> then
> >>>>>>>>>> Tick
> >>>>>>>>>>>>> Prefer Wrapper?
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> This doesnt seem to make any difference :(
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> The project is still building with the 6.2.2 distribution,
> >> which
> >>>> is
> >>>>>>>> the
> >>>>>>>>>>>>> only one in the ./.gradle/wrapper/dists directory at this
> >> stage.
> >>>>>>>>>>>>> If i run ./gradew.bat manually from the cmdline, then, the
> >>>> correct
> >>>>>>>>>>>> version
> >>>>>>>>>>>>> (4.6) is download, and then someone Netbeans uses this
> version
> >>>> from
> >>>>>>>>>> then
> >>>>>>>>>>>> on
> >>>>>>>>>>>>> in.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> On Sun, Mar 15, 2020 at 6:59 PM Patrick Musembi <
> >>>>>>>>>> [email protected]
> >>>>>>>>>>>>> wrote:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> @jonathan please set Custom. Leave the input field
> >> empty(haven't
> >>>>>>>>>> tested
> >>>>>>>>>>>>>> with a custom gradle path). Then tick prefer to use gradle
> >>>> wrapper
> >>>>>>>>>> that
> >>>>>>>>>>>>>> comes with the project
> >>>>>>>>>>>>>> Regards
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> On Sun, Mar 15, 2020, 19:00 Jonathan Bergh <
> >>>>>>>> [email protected]>
> >>>>>>>>>>>>>> wrote:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> An update:
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> If i run from Powershell in the Project directory:
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> *PS C:\Development\myproject> ./gradlew
> --configure-on-demand
> >>>> -x
> >>>>>>>>>>>> check
> >>>>>>>>>>>>>>> clean buildDownloading
> >>>>>>>>>>>>>>>
> https://services.gradle.org/distributions/gradle-4.6-all.zip
> >>>>>>>>>>>>>>> <
> >> https://services.gradle.org/distributions/gradle-4.6-all.zip
> >>>>>>>>> ....*
> >>>>>>>>>>>>>>> it starts downloading the Wrapper, and
> >> ./.gradle/wrapper/dists
> >>>>>> gets
> >>>>>>>>>>>>>>> populated with gradle-4.6-all.zip as expected.
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> Regards
> >>>>>>>>>>>>>>> Jonathan
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> On Sun, Mar 15, 2020 at 5:48 PM Jonathan Bergh <
> >>>>>>>>>>>>> [email protected]
> >>>>>>>>>>>>>>> wrote:
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> ok, thanks Lazlo,
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> I have just cleared my ./.gradle/cache and
> >>>>>> ./.gradle/wrapper/dist
> >>>>>>>>>>>>>>>> directories, set global Gradle options to Gradle 6.2.2 but
> >>>>>> Prefer
> >>>>>>>>>>>>>> gradle
> >>>>>>>>>>>>>>>> wrapper.
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> When i build my project, the output is:
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> *JAVA_HOME="C:\Program Files\Java\jdk1.8.0_201"cd
> >>>>>>>>>>>>>>>> C:\Development\myproject; ./gradlew --configure-on-demand
> -x
> >>>>>> check
> >>>>>>>>>>>>>> clean
> >>>>>>>>>>>>>>>> buildConfiguration on demand is an incubating feature.>
> Task
> >>>>>>>>>>>> :clean>
> >>>>>>>>>>>>>> Task
> >>>>>>>>>>>>>>>> :compileJavaNote: Some input files use unchecked or unsafe
> >>>>>>>>>>>>>>> operations.Note:
> >>>>>>>>>>>>>>>> Recompile with -Xlint:unchecked for details.> Task
> >>>>>>>>>>>> :processResources>
> >>>>>>>>>>>>>>> Task
> >>>>>>>>>>>>>>>> :classes> Task :jar> Task :assemble> Task :buildDeprecated
> >>>>>> Gradle
> >>>>>>>>>>>>>>> features
> >>>>>>>>>>>>>>>> were used in this build, making it incompatible with
> Gradle
> >>>>>>>> 7.0.Use
> >>>>>>>>>>>>>>>> '--warning-mode all' to show the individual deprecation
> >>>>>>>>>>>> warnings.See
> >>>>>>>>>>>>
> >>
> https://docs.gradle.org/6.2.2/userguide/command_line_interface.html#sec:command_line_warnings
> >>>>>>>>>>>>>>>> <
> >>
> https://docs.gradle.org/6.2.2/userguide/command_line_interface.html#sec:command_line_warnings
> >>>>>>>>>>>>>>>> BUILD
> >>>>>>>>>>>>>>>> SUCCESSFUL in 5m 6s4 actionable tasks: 4 executed*
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> When i check back in ./.gradle/wrapper/dists , there is
> >> only a
> >>>>>>>>>>>> 6.2.2
> >>>>>>>>>>>>>>>> installation, and cache also only has artifacts for 6.2.2
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> The project gradle wrapper (gradle-wrapper.properties) is:
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>
> *distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distsdistributionUrl=https\://
> >>>>>>>>>>>>>>> services.gradle.org/distributions/gradle-4.6-bin.zip
> >>>>>>>>>>>>>>>> <
> >> http://services.gradle.org/distributions/gradle-4.6-bin.zip
> >>>>>>>>>>>>>>>> zipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/dists*
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> So i am sure perhaps that Netbeans is not using the
> project
> >>>>>> gradle
> >>>>>>>>>>>>>>> wrapper?
> >>>>>>>>>>>>>>>> Regards
> >>>>>>>>>>>>>>>> Jonathan
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> On Sun, Mar 15, 2020 at 5:00 PM Laszlo Kishalmi <
> >>>>>>>>>>>>>>> [email protected]>
> >>>>>>>>>>>>>>>> wrote:
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>> Unfortunately attachments are not working in dev mailing
> >>>> list.
> >>>>>>>> You
> >>>>>>>>>>>>> can
> >>>>>>>>>>>>>>>>> share them some clipboarding site or you can create a
> JIRA
> >>>>>> issue
> >>>>>>>>>>>> on
> >>>>>>>>>>>>>> this
> >>>>>>>>>>>>>>>>> and do the report there.
> >>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>> Right now the wrapper detection checks the existence of
> >>>>>>>>>>>>>>>>> gradle/wrapper/gradle-wrapper.properties in the root
> >> project.
> >>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>> On 3/15/20 7:24 AM, Jonathan Bergh wrote:
> >>>>>>>>>>>>>>>>>> Hi there,
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> Just a quick question. We usually use Maven for build,
> for
> >>>>>> which
> >>>>>>>>>>>>>>>>>> everything seems to work perfectly on NB11.3. However,
> we
> >>>>>> have a
> >>>>>>>>>>>>>>>>>> project which uses Gradle for other reasons.
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> When building on 11.3, via the IDE, i have "Use wrapper"
> >> set
> >>>>>> in
> >>>>>>>>>>>>>> global
> >>>>>>>>>>>>>>>>>> IDE options but when i build (Clean Build) from the
> >> Project
> >>>>>>>>>>>> menu,
> >>>>>>>>>>>>>>>>>> Netbeans seems to be using the globally configured
> Gradle
> >>>>>>>>>>>>>>>>>> installation, rather than the Wrapper version?
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> please see the attached. if i run from the command line,
> >>>>>>>>>>>>> everything
> >>>>>>>>>>>>>>>>>> builds fine, including finding the various plugins etc.
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> Just wanted to check whether this was a real issue
> before
> >>>>>>>>>>>> logging.
> >>>>>>>>>>>>>>>>>> Thanks a lot.
> >>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>> Regards
> >>>>>>>>>>>>>>>>>> Jon
> >>>>>>>>>>>>>>>>>> gradle3.JPG
> >>>>>>>>>>>>>>>>>> gradle2.JPG
> >>>>>>>>>>>>>>>>>> gradle1.JPG
> >>>> ---------------------------------------------------------------------
> >>>>>>>>>> To unsubscribe, e-mail: [email protected]
> >>>>>>>>>> For additional commands, e-mail: [email protected]
> >>>>>>>>>>
> >>>>>>>>>> For further information about the NetBeans mailing lists, visit:
> >>>>>>>>>>
> >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >> ---------------------------------------------------------------------
> >>>>>>>> To unsubscribe, e-mail: [email protected]
> >>>>>>>> For additional commands, e-mail: [email protected]
> >>>>>>>>
> >>>>>>>> For further information about the NetBeans mailing lists, visit:
> >>>>>>>>
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: [email protected]
> >>>>>> For additional commands, e-mail: [email protected]
> >>>>>>
> >>>>>> For further information about the NetBeans mailing lists, visit:
> >>>>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [email protected]
> >>>> For additional commands, e-mail: [email protected]
> >>>>
> >>>> For further information about the NetBeans mailing lists, visit:
> >>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>>>
> >>>>
> >>>>
> >>>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >> For further information about the NetBeans mailing lists, visit:
> >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >>
> >>
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Reply via email to