简体   繁体   中英

Gradle set Gradle JVM per module

i have one main module which has two sub modules. The problem is that one of them is using java 1.8 and the other one is using java 1.7. 1. How can i add Gradle JVM to be per sub module ? 2. Is there any property for setting java ?

I am using gradle 4.10.2

You will need to decouple the JVM running Gradle from the JVM running your Java related tasks (compile, test, execute). Once you go down that path, each sub project can be configured individually and thus use the expected JVM.

You can see an example of doing this with Java 7 in the documentation.

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