Gradle Overriding Existing Tasks Part-1

 

This video shows how to override task? Jar task is building task. It already was written by the gradle team. sample, build, src etc. are a module. Open “src” file then open “main” and open “java” file. Then right-click on “java” file and create a new main class. Then we can write code in the main class. After complete the coding fire command of jar like “./gradlew jar”. then display “Build Succesfull” message after that check jar file generated in “Builds”->”libs”->”jar”. After that navigate the folder like “cd build”,”cd libs”,”java -jar” and Enter. Then it showing output with error message. How we are doing same thing show in a different type. Right click on “java” folder and create “pckg”.then change into the main class and write your full qualified main into the main class. at the last run the program on command prompt similarly. 1-how to execute them into the root module.2-how execute the into the inner module.3-how to generate jar and how to execute jar using java jar command.


Leave a Reply

Your email address will not be published. Required fields are marked *