From the course: Gradle for Java-Based Applications and Libraries
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Consuming an external dependency
From the course: Gradle for Java-Based Applications and Libraries
Solution: Consuming an external dependency
(upbeat music) - [Instructor] Let's first identify what we have in this project here. You can see the build script doesn't actually look very complex. We apply the Java plugin and the application plugin. The version is set to 1.0.0. We're building with Java 11. And we can also execute the main class here directly from the build code. You can have a look at the source main Java directory within here. We have a main class. This main class instantiates the class string reverser. And down here, we actually invoke the method reverse with the help of the instance of string reverser and feed in two different strings here, abc and automobile. So let's jump over to the actual class here, and you can see the method that we implemented here, is fairly custom. So we first check if the given string that we want to reverse, is either null or blank string, then we handle it. Otherwise, we'll walk through each of the characters here…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Mechanics of dependency management1m 59s
-
(Locked)
Declaring a dependency on an external library2m 38s
-
(Locked)
Rendering the dependency tree2m 36s
-
(Locked)
Declaring a project dependency3m 5s
-
(Locked)
Using the Maven Publish plugin to publish a library3m 7s
-
(Locked)
Challenge: Consuming an external dependency1m 44s
-
(Locked)
Solution: Consuming an external dependency3m 29s
-
(Locked)
-
-