使用Gradle编译项目时IntelliJ正在做什么? [英] What exactly IntelliJ is doing when compiling project using Gradle?
问题描述
很明显,当Gradle中的委托选项正在做所有事情时。
我的问题是IntelliJ在关闭这个选项时做了什么?
我问这个是因为我有自定义代码在我的Gradle文件中,并且它似乎不像在IntelliJ中构建时执行此代码。当我运行 gradlew build
时,一切正常。
它自己的构建系统称为JPS,它使用IntelliJ IDEA项目和.iml文件作为项目模型。当您使用IntelliJ IDEA的默认构建系统构建项目时,它不会在Maven或Gradle文件中执行任何代码;它使用自己的逻辑,只能通过将插件编写到JPS来扩展它。
IntelliJ IDEA 2016.3 add the ability to delegate build/run to Gradle.
It's clear that when the delegate option is on Gradle is doing everything.
My question is what exactly IntelliJ is doing when this option is off?
I'm asking this because I have custom code inside my Gradle files and it does not seems like this code is executed when building in IntelliJ. When I run gradlew build
everything works just fine.
IntelliJ has its own build system, called JPS, which uses the IntelliJ IDEA project and .iml files as the project model. When you're using IntelliJ IDEA's default build system to build the project, it does not execute any code in Maven or Gradle files; it uses its own logic, which can only be extended by writing plugins to JPS.
这篇关于使用Gradle编译项目时IntelliJ正在做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!