Тёмный

How To Use Gradle API vs. Implementation Dependencies (Java Library Plugin) 

Tom Gregory Tech
Подписаться 19 тыс.
Просмотров 17 тыс.
50% 1

The Gradle Java Library Plugin is the recommended plugin to use when building libraries that will be consumed by another project. It offers the ability to distinguish between api and implementation dependencies, offering some key benefits for whoever consumes the library.
In this video you’ll learn the main differences between api and implementation configurations with a real-world example showing exactly how things work under the covers.
GITHUB
Get the code used in the example in the video:
Library code github.com/tkg...
Consumer code github.com/tkg...
THIS VIDEO IN ARTICLE FORMAT
Check out this article on the same topic on my blog tomgregory.com...
DOCS
See these Gradle docs for more info about the Java Library Plugin docs.gradle.or...
🚀 FREE INTRODUCTORY GRADLE COURSE tomgregory.com...
📖 ULTIMATE GRADLE BUILD BIBLE tomgregory.com...
🌍 Check out my website tomgregory.com...

Опубликовано:

 

7 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 37   
@TomGregoryTech
@TomGregoryTech 3 года назад
►► Getting started with Gradle just got much easier. Check out my FREE Get Going with Gradle course → learn.tomgregory.com/courses/get-going-with-gradle
@rockmanvnx6
@rockmanvnx6 6 месяцев назад
I spent hours of research and couldn't understand until i found this video. Thank you so much
@buildlackey
@buildlackey 4 года назад
didn't quite get this before your explanation.. the way you showed the published maven pom artifact lit the light bulb in my thick head ;^) thnx !
@SriHarshaChilakapati
@SriHarshaChilakapati 2 года назад
It took me a whole while to actually understand the older ones, but only after a short while, Gradle changed into implementation and api. However, the older ones (Maven conventions) are more straight-forward right? We used to have compile - For compile & runtime classpaths provided - For compile classpath but not runtime classpath runtime - For only runtime classpath After spending so much time to understand the above and seeing Gradle changed them immediately later, made me stick to implementation which simply worked everywhere I go. Thanks for this video, I finally understand the new approach too.
@ManuelJordan317
@ManuelJordan317 3 года назад
Excellent video, really well covered. Again how a friendly suggestion: consider to do a new video of this same type but covering about Testing. There are other 'names' about how to refer the dependencies. Keep doing this amazing work!
@JoseGarcia-bn6kq
@JoseGarcia-bn6kq 4 года назад
Your Gradle series is brilliant. Thank you, Tom.
@Firaristt1911
@Firaristt1911 3 года назад
thank you for great explanation. So basic, so clear and yet, detailed enough to generate and use library.
@TomGregoryTech
@TomGregoryTech 3 года назад
Awesome, glad it helped!
@alexei3366
@alexei3366 2 года назад
Thank for example about plugin "maven-publish". It's very helpful
@tonys5631
@tonys5631 4 года назад
It would be nice to talk to the rest of the world learning the tools who haven't been using them for 1+ years. You should start by giving a reference to build on. Visualize your reference. Thanks for the effort. Now I need to go to a source that can get me up to speed to understand what you're saying.
@TomGregoryTech
@TomGregoryTech 4 года назад
Hi Tony. Thanks for the suggestion. I will definitely keep this in mind for future tutorials. What specifically did I miss out of this one?
@JoshMolina
@JoshMolina 4 года назад
Great explanation! Thank you!
@rajdhar1235
@rajdhar1235 2 года назад
Excellent explanation, to the point. Thank you so much.
@TomGregoryTech
@TomGregoryTech 2 года назад
Glad it was helpful!
@KonradSzewczukMusic
@KonradSzewczukMusic 4 года назад
Hi, very good demonstration! It would be nice if you can demonstrate compileOnly, runtimeOnly and annotationProcessor :)
@TomGregoryTech
@TomGregoryTech 4 года назад
Thanks Konrad! That's a great suggestion, and I've added to the list of future topics to cover.
@Dirkadin
@Dirkadin 4 года назад
Good demonstration!
@mtc539
@mtc539 Год назад
the gradle GOAT
@bitwisedevs469
@bitwisedevs469 3 года назад
Awesome! This is what I am looking for a visual representation of what is happening behind the scene. One more question, what will happen if I change jackson from api to implementation in consumer side
@mksmurff
@mksmurff 4 года назад
Brilliant video thanks
@TomGregoryTech
@TomGregoryTech 4 года назад
Happy to help Danny
@krzysztofkamieniecki3154
@krzysztofkamieniecki3154 3 года назад
The jacket in the background disturb me a lot :)
@MotazAlZoubi-cp4bp
@MotazAlZoubi-cp4bp Год назад
Amazing
@tassitanoca
@tassitanoca 4 года назад
Excellent video :-). can I transform the library module to be used as a BOM into de Consumer? If yes, should I include a pom that list all my libs into my Library module?
@TomGregoryTech
@TomGregoryTech 4 года назад
Hi Alexandre. That's not something I've tried before unfortunately. Thanks for the feedback.
@GSUGambit
@GSUGambit 11 месяцев назад
What the equivalent to dependency management in maven to gradle?
@gullujumper
@gullujumper 3 года назад
Awesome video thank you. Do you have anything planned about how to handle non jar dependencies from zip files like dlls/js/.. ?
@TomGregoryTech
@TomGregoryTech 3 года назад
Thank you. Sorry, no plans to cover that topic at the moment.
@praveenathangavel
@praveenathangavel 2 года назад
What is the api equivalent for annotationprocessor for lombok
@TomGregoryTech
@TomGregoryTech 2 года назад
Annotation processors generate additional code. Any consumers of your library don't need to know about the annotation processor, so there's no api equivalent to the annotationProcessor configuration.
@praveenathangavel
@praveenathangavel 2 года назад
@@TomGregoryTech thank you. So if I have lombok annotationprocessor in parent library it will not be visible as transitive dependency to consumers of library? I need to have lombok annotationprocessor declared under dependencies for each child project?
@TomGregoryTech
@TomGregoryTech 2 года назад
@@praveenathangavel That's right. If the subproject requires annotation processing, you need to declare the Lombok annotation processor.
@jayasundeepkandhikatty1917
@jayasundeepkandhikatty1917 2 года назад
Application Binary Interface
@krown5666
@krown5666 3 года назад
Your IntelliJ IDEA Theme doesn't correlate with your room and t-shirt Theme. Please make it IntelliJ Light as well :-)
@lisafox9026
@lisafox9026 2 года назад
Cannot access com.fasterxml.jackson.databind.JsonNode => IntelijIdea, but in eclipse ok ... why?
Далее
Introduction to writing Gradle plugins
31:38
Просмотров 22 тыс.
7 HIDDEN Spring Boot Features You Need To Enable NOW!
12:32
Harley Quinn is amazing.  #cosplay #joker#Harriet Quinn
00:11
Changing The Flag Of The Countries #countryballs
00:18
Степан Гончаров - Gradle от A до Я
51:31
Understanding Gradle #26 - The Classpath
18:15
Просмотров 3,3 тыс.
Dependency Injection, The Best Pattern
13:16
Просмотров 838 тыс.
Gradle tutorial for complete beginners
24:48
Просмотров 223 тыс.
Why You Want to Code With Quarkus in 2023
18:21
Просмотров 22 тыс.
Harley Quinn is amazing.  #cosplay #joker#Harriet Quinn
00:11