ghidra/GhidraBuild/EclipsePlugins/GhidraSleighEditor/ghidra.xtext.sleigh.tests/build.gradle

51 lines
1.3 KiB
Groovy

apply plugin: 'java'
// This project requires the Eclipse DSL plugin. To create Eclipse files for this project, run
// "gradle eclipse -PeclipseDSL"
if (hasProperty("eclipseDSL")) {
apply plugin: 'eclipse'
eclipse {
// Check to make sure the generated build folders exists
def srcGenFolder = file ("src-gen")
if (!srcGenFolder.exists()) {
srcGenFolder.mkdirs()
}
def xtendGenFolder = file ("xtend-gen")
if (!xtendGenFolder.exists()) {
xtendGenFolder.mkdirs()
}
project {
name = 'Eclipse SleighEditor Tests'
buildCommand 'org.eclipse.pde.ManifestBuilder'
buildCommand 'org.eclipse.pde.SchemaBuilder'
buildCommand 'org.eclipse.xtext.ui.shared.xtextBuilder'
natures 'org.eclipse.pde.PluginNature'
natures 'org.eclipse.xtext.ui.shared.xtextNature'
classpath.file {
def requiredPlugins = 'org.eclipse.pde.core.requiredPlugins'
beforeMerged { classpath ->
classpath.entries.removeAll { entry ->
entry.path == requiredPlugins
}
}
whenMerged { classpath ->
withXml {
def node = it.asNode()
node.appendNode('classpathentry', [kind: 'con', path: requiredPlugins])
}
}
}
}
}
sourceSets {
main {
java {
srcDir 'src'
srcDir 'src-gen'
srcDir 'xtend-gen'
}
}
}
}