mardi 24 février 2015

Gradle multi-project build

I have the following project structure:



my-project
+my-project-data
+my-project-service
+my-project-example


Where each of these my-project-data, my-project-service, my-project-examples are defined as sub project to my-project in settings.gradle file. Of course, my-project-services has a dependency to my-project-data. And my-project-examples has a dependencies to my-project-data and my-project service.


In the project my-project-examples I want to have some class with main method and make some queries to DB (Assume that main class is in package com.project.main). Moreover I want to execute this in command line:



java -jar my-project.jar


But to do this I have to set Main-Class attribute. Where do I have to do this in root project build.gradle or somewhere else and what have to be the value of attribute?


Aucun commentaire:

Enregistrer un commentaire