Dependency Management with Gradle - Part 1: Fundamentals

Share
Embed
  • Published on Jun 16, 2019
  • Whether you use a mono-repository or multi-repository approach for your sources, managing dependencies is central to productivity by reusing artifacts and ensuring a quality build. A single incorrect dependency can break existing code, introduce a vulnerability or simply prevent your project from building.
    This class will introduce dependency management for Java.
    It will help you understand the key concepts and give you the knowledge to tackle many of the common requirements and pitfalls you will likely encounter.
    The topics covered include:
    - Declaring dependencies and the repositories you retrieve them from
    - Understanding what dependency configurations are
    - Using dependency versions to express requirements and compatibility
    - Using dependency constraints to control transitive dependency versions
    - Ensuring the same versions of dependency are used across projects within a build
    - Understanding the principles of variant-aware dependency management and the problems it solves
    - Discussing compatibility of Gradle’s dependency management with Apache Maven(™) and Apache Ivy(™)
    - Troubleshooting problems with dependencies
    Create a Gradle and/or Maven Build Scan - scans.gradle.com/
  • Film & AnimationFilm & Animation

Comments • 26

  • Kyrogue
    Kyrogue 2 years ago +5

    great series for beginners!

  • Pulp Free Press
    Pulp Free Press Year ago +2

    Very helpful, thank you gents!

  • aleph.
    aleph. 2 years ago +1

    hi, for the api configuration, does the dependency leak through all the consumers or just the most immediate consumer?

  • Marc Pinto
    Marc Pinto 5 months ago

    Great video thank you!

  • Blake F.
    Blake F. 8 months ago

    I am confused about what implementation, testImplementation and testRuntimeOnly are in build.gradle.kts. What do they represent? Are they defined by Gradle?

    • E R
      E R 7 months ago

      yes, these are "configurations"

  • jp photon
    jp photon Year ago +3

    good talk but gradle's semantics and dep management is waaay too complex.

    • Nilanjan Mukhopadhyay
      Nilanjan Mukhopadhyay 7 months ago

      @E RSeriously. Gradle sucks. It makes me hate developing on the JVM.

    • E R
      E R 7 months ago +1

      and the documentation does not help either. the more I read the docs, the less I want to use gradle

  • E R
    E R 7 months ago +2

    every time I want to do something "fancy" with gradle and lose 3 days on not getting even the minimum examples running from the documentation (which is terrible if you ask me), I curse and promise myself to never touch this tool again. It sounds bad, and it really is. When all you have to do is build a "spring-boot" like application, sure gradle is awesome and I love it. When in turn I want to use to publish different variants, for example, I swear, I hate it. This fundamentals were supposed to be helpful? Sorry folks, not even close.

    • Deleap Tealeaf
      Deleap Tealeaf 6 months ago

      I whole heatedly agree. I don't know why people rave about this tool. Ant is so much easier to use and understand. With this, if you want to move files around or rename them you still have to depend on ant! Nothing is straightforward!
      Ugghhh! Piece of cr@p!

  • Rahul Joshi
    Rahul Joshi 3 months ago

    Excellent lecture better than gradle docs

  • Ayman Patel
    Ayman Patel Year ago

    Is the code hosted on Github. I want to get started by doing it from the bootstrapped project used here?

    • Ayman Patel
      Ayman Patel Year ago

      Source Code: github.com/gradle/webinar-dep-mgmt-part-1

  • Valentin Kovalenko
    Valentin Kovalenko Year ago +7

    As someone who has a quite decent knowledge of Maven, I am watching this fundamentals video, and I can tell - the way information is presented makes no sense. I almost completely fail to extract something meaningful from the lecture.
    As a side note, who came up with the insane syntax "[3.9, 4.0["? What is wrong with the half-open interval notation "[3.9, 4.0)" used in math and known to virtually every engineer?

    • Karlos Daniel
      Karlos Daniel 6 months ago

      @golem99 Me too.

    • E R
      E R 7 months ago

      I will second this comment. this is just terrible presentation, with exactly zero usefulness

    • golem99
      golem99 Year ago

      During my studies of mathematics both syntaxes have been used evenly. So in my understanding this [3.9,4.0[ is not uncommon at all.

  • Nathan Smalley
    Nathan Smalley 2 years ago +1

    Everybody I've seen talking about or using Gradle/Java have a European or Indian accent..

    • Rohit Naik
      Rohit Naik 9 months ago

      @Justin Smith that's also because some of these enthusiast young TheXvidrs just can't afford an Apple device for development. So, mostly end up with windows machine and do their best to spread the knowledge which they gain

    • Justin Smith
      Justin Smith Year ago

      Android devs tend to be Indians and Android uses Gradle. I've been doing iOS and Android dev for work and you don't see Indians in iOS videos.

  • Rajesh Subramanian
    Rajesh Subramanian Year ago +6

    The gradle docs are the worst.