简体   繁体   中英

Gradle pass commandline arguments to subproject run task

I have the following project-structure:

Root project 'rmi-tutorial'
+--- Project ':client'
+--- Project ':lib'
\--- Project ':server'

How can I pass command line arguments via the root-project run task to another certain sub project?

I thought about something like this:

gradlew.bat run -Pclient:<parameter1> -Pclient:<parameter2>

All of the project properties are still available in the project.properties map. Should you wish to access them from any level of your project, you may do so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM