A simple example of a jar library built using Gradle.
The following commands will create: build/libs/helloworld-0.1.0.jar
gradle clean
gradle buildJar
Copy the generated jar file to your project's lib directory.
import hn.daniel.HelloWorld;
...
String helloWorld = HelloWorld.hello();
System.out.println(helloWorld);
String helloDaniel = HelloWorld.hello("Daniel");
System.out.println(helloDaniel);
Hello world!
Hello Daniel!