| 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 | 生成 |
| 方法 | 描述 |
file(action) | 允许高级配置,例如影响现有 jdt 文件内容与 Gradle 构建信息合并的方式 |
| 块 | 描述 |
file | 允许高级配置,例如影响现有 jdt 文件内容与 Gradle 构建信息合并的方式 |
JavaVersion sourceCompatibility
源 Java 语言级别。
例如,请参阅 EclipseJdt 的文档
- 默认使用
eclipse和java插件 project.sourceCompatibility
JavaVersion targetCompatibility
生成 .class 文件的目标 JVM。
例如,请参阅 EclipseJdt 的文档
- 默认使用
eclipse和java插件 project.targetCompatibility
void file(Action<? super PropertiesFileContentMerger> action)
Action<? super PropertiesFileContentMerger>允许高级配置,例如影响现有 jdt 文件内容与 Gradle 构建信息合并的方式
当传入 whenMerged{} 和 beforeMerged{} 动作的对象类型为 Jdt
传入 withProperties{} 动作的对象类型为 Properties
例如,请参阅 EclipseJdt 的文档
允许高级配置,例如影响现有 jdt 文件内容与 Gradle 构建信息合并的方式
当传入 whenMerged{} 和 beforeMerged{} 闭包的对象类型为 Jdt
传入 withProperties{} 闭包的对象类型为 Properties
例如,请参阅 EclipseJdt 的文档
- 委托给
- 来自
file的PropertiesFileContentMerger