You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Geertjan Wielenga <ge...@googlemail.com.INVALID> on 2019/01/24 07:51:32 UTC

Opening existing Gradle projects in new Gradle support

Hi all,

I'm looking at existing projects and trying to open them now that Gradle is
integrated into Apache NetBeans.

For example, should this be openable:

https://github.com/griffon/griffon

Thanks,

Gj

Re: Opening existing Gradle projects in new Gradle support

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well, I would not say that this is impossible to do. My only concern is 
to be able to support this, I would need to implement some command line 
parser.

It would be good if Gradle come out with some out-of-the-box solution 
for this. As at the moment this is even a workaround in Gradle itself.

Please create a JIRA Improvement on this, but I fear it won't be 
included in the 11.0 release.

On 1/29/19 7:54 AM, Scott Palmer wrote:
> For non-modular projects that need to add modules to the module-path, I'm
> using Gradle code to add --module-path and --add-modules calls to the javac
> tasks.
>
> E.g. something like this:
>
> tasks.withType(JavaCompile) {
> options.compilerArgs.add '--module-path'
> options.compilerArgs.add configurations.modules.asPath
> options.compilerArgs.add '--add-modules'
> options.compilerArgs.add addedModules.join(',')
> }
>
> This works for building with Gradle, but NetBeans is blind to the added
> modules. It highlights import statements as errors for example.
>
> I'm currently hacking around this my also adding the modules to the
> 'compileOnly' configuration (so the modules aren't added to the classpath
> at runtime or included in the dependency set for the project).  Is there a
> better way to handle this?
> This workaround only works because the modules (JavaFX) are available as
> jars as well as jmods.  I'm using the jmods to generate a runtime where the
> native libraries are properly installed so I don't have to deal with the
> hack of extracting them from a jar at runtime.
> It is likely that my project will never be truly modular because that only
> works properly when all dependencies are *explicit* modules as well.
> Something that is still a long way off.
>
> Scott
>
>
> On Thu, Jan 24, 2019 at 3:53 AM Geertjan Wielenga
> <ge...@googlemail.com.invalid> wrote:
>
>> Great to hear. Would be great to have step by step instructions for opening
>> Griffon into Apache NetBeans, trying via your instructions now.
>>
>> I also tried to open this, which opened without a problem at all and looks
>> great in Apache NetBeans:
>>
>> https://github.com/gradle/gradle-build-scan-quickstart
>>
>> Would be excellent if multiple people would try to open their Gradle
>> projects (daily builds are here
>> https://builds.apache.org/job/incubator-netbeans-linux/) and provide
>> comments and feedback on success/failure.
>>
>> Gj
>>
>>
>> On Thu, Jan 24, 2019 at 9:29 AM Laszlo Kishalmi <laszlo.kishalmi@gmail.com
>> wrote:
>>
>>> Well you've picked a good one. It does not even loadable from command
>>> line once you've checked out.
>>>
>>> It requires 3 external project to be downloaded next to this one. Also
>>> it needs some sonatypeUsername and sonatypePassword.
>>>
>>> I tried to provide some value to those, but it seems I need to provide
>>> my bintray username and password for this to work otherwise I get:
>>>
>>>   > Configure project :application-master-pom
>>> [application-master-pom] Bintray credentials.username is blank
>>> [application-master-pom] Bintray credentials.password is blank
>>>
>>> FAILURE: Build failed with an exception.
>>>
>>> The only cheat I've made to get there is to comment out the includeBuild
>>> from settings.gradle and  set Gradle version to 5.1.1 in the Tools >
>>> Options > Java > Gradle
>>>
>>> Probably I shall file them some PR-s to be more friendly with newcomers.
>>> I've used a former version of this project as test about a year ago.
>>>
>>> On 1/23/19 11:51 PM, Geertjan Wielenga wrote:
>>>> Hi all,
>>>>
>>>> I'm looking at existing projects and trying to open them now that
>> Gradle
>>> is
>>>> integrated into Apache NetBeans.
>>>>
>>>> For example, should this be openable:
>>>>
>>>> https://github.com/griffon/griffon
>>>>
>>>> Thanks,
>>>>
>>>> Gj
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
>>> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>>>
>>> For further information about the NetBeans mailing lists, visit:
>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>
>>>
>>>
>>>

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

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




Re: Opening existing Gradle projects in new Gradle support

Posted by Scott Palmer <sw...@gmail.com>.
For non-modular projects that need to add modules to the module-path, I'm
using Gradle code to add --module-path and --add-modules calls to the javac
tasks.

E.g. something like this:

tasks.withType(JavaCompile) {
options.compilerArgs.add '--module-path'
options.compilerArgs.add configurations.modules.asPath
options.compilerArgs.add '--add-modules'
options.compilerArgs.add addedModules.join(',')
}

This works for building with Gradle, but NetBeans is blind to the added
modules. It highlights import statements as errors for example.

I'm currently hacking around this my also adding the modules to the
'compileOnly' configuration (so the modules aren't added to the classpath
at runtime or included in the dependency set for the project).  Is there a
better way to handle this?
This workaround only works because the modules (JavaFX) are available as
jars as well as jmods.  I'm using the jmods to generate a runtime where the
native libraries are properly installed so I don't have to deal with the
hack of extracting them from a jar at runtime.
It is likely that my project will never be truly modular because that only
works properly when all dependencies are *explicit* modules as well.
Something that is still a long way off.

Scott


On Thu, Jan 24, 2019 at 3:53 AM Geertjan Wielenga
<ge...@googlemail.com.invalid> wrote:

> Great to hear. Would be great to have step by step instructions for opening
> Griffon into Apache NetBeans, trying via your instructions now.
>
> I also tried to open this, which opened without a problem at all and looks
> great in Apache NetBeans:
>
> https://github.com/gradle/gradle-build-scan-quickstart
>
> Would be excellent if multiple people would try to open their Gradle
> projects (daily builds are here
> https://builds.apache.org/job/incubator-netbeans-linux/) and provide
> comments and feedback on success/failure.
>
> Gj
>
>
> On Thu, Jan 24, 2019 at 9:29 AM Laszlo Kishalmi <laszlo.kishalmi@gmail.com
> >
> wrote:
>
> > Well you've picked a good one. It does not even loadable from command
> > line once you've checked out.
> >
> > It requires 3 external project to be downloaded next to this one. Also
> > it needs some sonatypeUsername and sonatypePassword.
> >
> > I tried to provide some value to those, but it seems I need to provide
> > my bintray username and password for this to work otherwise I get:
> >
> >  > Configure project :application-master-pom
> > [application-master-pom] Bintray credentials.username is blank
> > [application-master-pom] Bintray credentials.password is blank
> >
> > FAILURE: Build failed with an exception.
> >
> > The only cheat I've made to get there is to comment out the includeBuild
> > from settings.gradle and  set Gradle version to 5.1.1 in the Tools >
> > Options > Java > Gradle
> >
> > Probably I shall file them some PR-s to be more friendly with newcomers.
> > I've used a former version of this project as test about a year ago.
> >
> > On 1/23/19 11:51 PM, Geertjan Wielenga wrote:
> > > Hi all,
> > >
> > > I'm looking at existing projects and trying to open them now that
> Gradle
> > is
> > > integrated into Apache NetBeans.
> > >
> > > For example, should this be openable:
> > >
> > > https://github.com/griffon/griffon
> > >
> > > Thanks,
> > >
> > > Gj
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> > For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> >
>

Re: Opening existing Gradle projects in new Gradle support

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
Great to hear. Would be great to have step by step instructions for opening
Griffon into Apache NetBeans, trying via your instructions now.

I also tried to open this, which opened without a problem at all and looks
great in Apache NetBeans:

https://github.com/gradle/gradle-build-scan-quickstart

Would be excellent if multiple people would try to open their Gradle
projects (daily builds are here
https://builds.apache.org/job/incubator-netbeans-linux/) and provide
comments and feedback on success/failure.

Gj


On Thu, Jan 24, 2019 at 9:29 AM Laszlo Kishalmi <la...@gmail.com>
wrote:

> Well you've picked a good one. It does not even loadable from command
> line once you've checked out.
>
> It requires 3 external project to be downloaded next to this one. Also
> it needs some sonatypeUsername and sonatypePassword.
>
> I tried to provide some value to those, but it seems I need to provide
> my bintray username and password for this to work otherwise I get:
>
>  > Configure project :application-master-pom
> [application-master-pom] Bintray credentials.username is blank
> [application-master-pom] Bintray credentials.password is blank
>
> FAILURE: Build failed with an exception.
>
> The only cheat I've made to get there is to comment out the includeBuild
> from settings.gradle and  set Gradle version to 5.1.1 in the Tools >
> Options > Java > Gradle
>
> Probably I shall file them some PR-s to be more friendly with newcomers.
> I've used a former version of this project as test about a year ago.
>
> On 1/23/19 11:51 PM, Geertjan Wielenga wrote:
> > Hi all,
> >
> > I'm looking at existing projects and trying to open them now that Gradle
> is
> > integrated into Apache NetBeans.
> >
> > For example, should this be openable:
> >
> > https://github.com/griffon/griffon
> >
> > Thanks,
> >
> > Gj
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: Opening existing Gradle projects in new Gradle support

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well you've picked a good one. It does not even loadable from command 
line once you've checked out.

It requires 3 external project to be downloaded next to this one. Also 
it needs some sonatypeUsername and sonatypePassword.

I tried to provide some value to those, but it seems I need to provide 
my bintray username and password for this to work otherwise I get:

 > Configure project :application-master-pom
[application-master-pom] Bintray credentials.username is blank
[application-master-pom] Bintray credentials.password is blank

FAILURE: Build failed with an exception.

The only cheat I've made to get there is to comment out the includeBuild 
from settings.gradle and  set Gradle version to 5.1.1 in the Tools > 
Options > Java > Gradle

Probably I shall file them some PR-s to be more friendly with newcomers. 
I've used a former version of this project as test about a year ago.

On 1/23/19 11:51 PM, Geertjan Wielenga wrote:
> Hi all,
>
> I'm looking at existing projects and trying to open them now that Gradle is
> integrated into Apache NetBeans.
>
> For example, should this be openable:
>
> https://github.com/griffon/griffon
>
> Thanks,
>
> Gj
>

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

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