You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Don <do...@gmail.com> on 2021/04/22 13:57:30 UTC

Adding dependencies in Gradle

With the reduction of support for Ant, which I have been using for my 
Java projects since 2004 or so, I decided to start learning Gradle.  I 
downloaded NetBeans 12.3 and proceeded to re-create the library/.jar 
files I use to implement some basic classes that are specialized for our 
environment.  In Ant, it was easy to add a library to another library 
project but I do not see any way to tell Project B that it needs to 
include the .jar from Project A. What am I missing?



---------------------------------------------------------------------
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


Re: Adding dependencies in Gradle

Posted by Laszlo Kishalmi <la...@gmail.com>.
You can have a file dependency to the other project artifact.

Or use composite Gradle builds:
https://docs.gradle.org/current/userguide/composite_builds.html


On 4/22/21 2:55 PM, Don wrote:

> That shows a general dependency on another project.  In a NetBeans Ant 
> project there are 2 main folders:   Source   and Library.  Right-click 
> on library brings up a menu which allows me to add a Project, a Jar, 
> and a predefined library containing several jar files. Can I add a jar 
> as a dependency or at least as something that will allow me to include 
> classes from the library in my .java files?
>
> On 4/22/21 11:19 AM, joe foe wrote:
>> You have to add the project as a dependency.
>>
>> See
>> https://docs.gradle.org/current/userguide/declaring_dependencies.html#sub:project_dependencies 
>> <https://docs.gradle.org/current/userguide/declaring_dependencies.html#sub:project_dependencies>
>>
>> Regards,
>> JoeFoe
>>
>> On Thu, 22 Apr 2021, 16:25 Don, <don.albertson@gmail.com 
>> <ma...@gmail.com>> wrote:
>>
>>     With the reduction of support for Ant, which I have been using
>>     for my
>>     Java projects since 2004 or so, I decided to start learning
>>     Gradle.  I
>>     downloaded NetBeans 12.3 and proceeded to re-create the library/.jar
>>     files I use to implement some basic classes that are specialized
>>     for our
>>     environment.  In Ant, it was easy to add a library to another
>>     library
>>     project but I do not see any way to tell Project B that it needs to
>>     include the .jar from Project A. What am I missing?
>>
>>
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>>     <ma...@netbeans.apache.org>
>>     For additional commands, e-mail: users-help@netbeans.apache.org
>>     <ma...@netbeans.apache.org>
>>
>>     For further information about the NetBeans mailing lists, visit:
>>     https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>     <https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>
>>

Re: Adding dependencies in Gradle

Posted by Don <do...@gmail.com>.
That shows a general dependency on another project.  In a NetBeans Ant 
project there are 2 main folders:   Source   and Library.  Right-click 
on library brings up a menu which allows me to add a Project, a Jar, and 
a predefined library containing several jar files. Can I add a jar as a 
dependency or at least as something that will allow me to include 
classes from the library in my .java files?

On 4/22/21 11:19 AM, joe foe wrote:
> You have to add the project as a dependency.
>
> See
> https://docs.gradle.org/current/userguide/declaring_dependencies.html#sub:project_dependencies 
> <https://docs.gradle.org/current/userguide/declaring_dependencies.html#sub:project_dependencies>
>
> Regards,
> JoeFoe
>
> On Thu, 22 Apr 2021, 16:25 Don, <don.albertson@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     With the reduction of support for Ant, which I have been using for my
>     Java projects since 2004 or so, I decided to start learning
>     Gradle.  I
>     downloaded NetBeans 12.3 and proceeded to re-create the library/.jar
>     files I use to implement some basic classes that are specialized
>     for our
>     environment.  In Ant, it was easy to add a library to another library
>     project but I do not see any way to tell Project B that it needs to
>     include the .jar from Project A. What am I missing?
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>     <ma...@netbeans.apache.org>
>     For additional commands, e-mail: users-help@netbeans.apache.org
>     <ma...@netbeans.apache.org>
>
>     For further information about the NetBeans mailing lists, visit:
>     https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>     <https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>
>

Re: Adding dependencies in Gradle

Posted by joe foe <jf...@gmail.com>.
You have to add the project as a dependency.

See

https://docs.gradle.org/current/userguide/declaring_dependencies.html#sub:project_dependencies

Regards,
JoeFoe

On Thu, 22 Apr 2021, 16:25 Don, <do...@gmail.com> wrote:

> With the reduction of support for Ant, which I have been using for my
> Java projects since 2004 or so, I decided to start learning Gradle.  I
> downloaded NetBeans 12.3 and proceeded to re-create the library/.jar
> files I use to implement some basic classes that are specialized for our
> environment.  In Ant, it was easy to add a library to another library
> project but I do not see any way to tell Project B that it needs to
> include the .jar from Project A. What am I missing?
>
>
>
> ---------------------------------------------------------------------
> 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
>
>