Right james.Now, I have created a project & after running “gradle init” i ran “./gradlew clean shadowJar”
Now it is giving me Error:
Task ‘shadowJar’ not found in root project ‘projects’
gradle tasks o/p:
All tasks runnable from root project
assemble - Assembles the outputs of this project.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
classes - Assembles main classes.
clean - Deletes the build directory.
jar - Assembles a jar archive containing the main classes.
testClasses - Assembles test classes.
Build Setup tasks
init - Initializes a new Gradle build. [incubating]
wrapper - Generates Gradle wrapper files. [incubating]
groovydoc - Generates Groovydoc API documentation for the main source code.
javadoc - Generates Javadoc API documentation for the main source code.
buildEnvironment - Displays all buildscript dependencies declared in root project ‘projects’.
components - Displays the components produced by root project ‘projects’. [incubating]
dependencies - Displays all dependencies declared in root project ‘projects’.
dependencyInsight - Displays the insight into a specific dependency in root project ‘projects’.
help - Displays a help message.
model - Displays the configuration model of root project ‘projects’. [incubating]
projects - Displays the sub-projects of root project ‘projects’.
properties - Displays the properties of root project ‘projects’.
tasks - Displays the tasks runnable from root project ‘projects’.
check - Runs all checks.
test - Runs the unit tests.
Pattern: clean: Cleans the output files of a task.
Pattern: build: Assembles the artifacts of a configuration.
Pattern: upload: Assembles and uploads the artifacts belonging to a configuration.
To see all tasks and more detail, run gradle tasks --all
To see more detail about a task, run gradle help --task
Total time: 2.725 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.10/userguide/gradle_daemon.html
can you plaese let me know if i have to add any parameter in my build.gradle to get “shadowjar” task under my root project.
Thanks in advance.