API文档: | EclipseJdt |
---|
启用 Eclipse 插件的 jdt 细节微调
plugins { id 'java' id 'eclipse' } eclipse { jdt { //if you want to alter the java versions (by default they are configured with gradle java plugin settings): sourceCompatibility = 1.6 targetCompatibility = 1.5 javaRuntimeName = "J2SE-1.5" file { //whenMerged closure is the highest voodoo //and probably should be used only to solve tricky edge cases. //the type passed to the closure is Jdt //closure executed after jdt file content is loaded from existing file //and after gradle build information is merged whenMerged { jdt //you can tinker with the Jdt here } //withProperties allows addition of properties not currently //modeled by Gradle withProperties { properties -> //you can tinker with the Properties here } } } }
财产 | 描述 |
file | |
sourceCompatibility | 源Java语言级别。 |
targetCompatibility | 要为其生成文件的目标 JVM |
方法 | 描述 |
file(action) | 启用高级配置,例如影响现有 jdt 文件内容与 gradle 构建信息合并的方式 |
堵塞 | 描述 |
file | 启用高级配置,例如影响现有 jdt 文件内容与 gradle 构建信息合并的方式 |
JavaVersion
sourceCompatibility
源Java语言级别。
例如,请参阅文档EclipseJdt
- 默认带有
eclipse
和java
插件: project.sourceCompatibility
JavaVersion
targetCompatibility
要为其生成文件的目标 JVM .class
。
例如,请参阅文档EclipseJdt
- 默认带有
eclipse
和java
插件: project.targetCompatibility
void
file
(行动)Action
<? super PropertiesFileContentMerger
>
Action
<? super PropertiesFileContentMerger
>启用高级配置,例如影响现有 jdt 文件内容与 gradle 构建信息合并的方式
传递给whenMerged{}和beforeMerged{}操作的对象是类型Jdt
传递给 withProperties{} 操作的对象的类型Properties
例如,请参阅文档EclipseJdt
启用高级配置,例如影响现有 jdt 文件内容与 gradle 构建信息合并的方式
传递给whenMerged{}和beforeMerged{}闭包的对象是类型Jdt
传递给 withProperties{} 闭包的对象的类型Properties
例如,请参阅文档EclipseJdt