You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Owen Thomas <ow...@gmail.com> on 2022/08/01 04:54:51 UTC

How to set compile dependencies for Gradle in Netbeans.

Hello NetBeans people.

I have just started migrating my projects from Ant to Gradle in NetBeans.
Some of them have compile dependencies on others, and I'm currently
wondering how I set them up in NetBeans.

I'm very new to Gradle, but I can no longer ignore the light being cast by
wise people, and I concede that my work needs exposure to all the goodies
available through a build tool like Gradle. Any help would be greatly
appreciated at this early and tentative stage of my journey.

Thanks,

  Owen.

Re: How to set compile dependencies for Gradle in Netbeans.

Posted by Owen Thomas <ow...@gmail.com>.
Furthermore, if you read this
<https://tomgregory.com/gradle-implementation-vs-compile-dependencies/>,
the "compile" dependency has been deprecated since version 7 of Gradle. I'm
using 7.2. Apparently there are three types of dependency: compileOnly,
implementation, and runtimeOnly. The link gives details.


On Mon, 1 Aug 2022 at 17:45, Owen Thomas <ow...@gmail.com> wrote:

> Thanks for your comments Laszlo. They've helped me.
>
> I have created a multi-build script, and I have created all my Ant
> projects as subprojects of this, although I still have to put the source
> code into them and fix the dependencies.
>
> Perhaps it isn't really a concern, but I've noticed that NetBeans creates
> Gradle build scripts in Groovy. Is there any switch to instruct NetBeans to
> create them in Kotlin Script? Might there be an easy way to translate
> Groovy to Kotlin Script?
>
> Thanks again,
>
>   Owen.
>

Re: How to set compile dependencies for Gradle in Netbeans.

Posted by Owen Thomas <ow...@gmail.com>.
Thanks for your comments Laszlo. They've helped me.

I have created a multi-build script, and I have created all my Ant projects
as subprojects of this, although I still have to put the source code into
them and fix the dependencies.

Perhaps it isn't really a concern, but I've noticed that NetBeans creates
Gradle build scripts in Groovy. Is there any switch to instruct NetBeans to
create them in Kotlin Script? Might there be an easy way to translate
Groovy to Kotlin Script?

Thanks again,

  Owen.

Re: How to set compile dependencies for Gradle in Netbeans.

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well this one is a good read: 
https://docs.gradle.org/current/userguide/declaring_dependencies.html

Also you might look at existing projects on GitHub or other samples on 
the web.

On NetBeans side you can't really do much in the project properties, 
like in Ant projects.

The information there is read-only, to change that you need to change 
the Gradle build files themselves.


On 7/31/22 21:54, Owen Thomas wrote:
> Hello NetBeans people.
>
> I have just started migrating my projects from Ant to Gradle in 
> NetBeans. Some of them have compile dependencies on others, and I'm 
> currently wondering how I set them up in NetBeans.
>
> I'm very new to Gradle, but I can no longer ignore the light being 
> cast by wise people, and I concede that my work needs exposure to all 
> the goodies available through a build tool like Gradle. Any help would 
> be greatly appreciated at this early and tentative stage of my journey.
>
> Thanks,
>
>   Owen.

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

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