A list of all tasks can be displayed with:
gradle tasks
This task initiates a project including a gradlew wrapper script:
mkdir demo
cd demo
gradle init
tree .
Application can be run with:
./gradlew run
and bundled with:
./gradlew build
This produces two archives called app.tar and app.zip in `app/build/distribution
Properties to set if required in the build.gradle.kts file: version, name and group i.e. maven coordinates:
version=
name=
group=
Run the jar task:
./gradlew jar
Verifying that an archive is valid:
jar tf lib/build/libs/lib.jar
Verifying that archive is signed:
jarsigner -verify lib/build/libs/lib.jar
./gradlew test --console=plain
./gradlew :app:dependencies --configuration runtimeClasspath
This shows dependencies of a given classpath, e. g. runtime.
java {
withSourcesJar()
}