64 lines
1.7 KiB
Groovy
64 lines
1.7 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'
|
|
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'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// We do not currently build the SleighEditor plugin at Ghidra build time so we must
|
|
// copy the prebuilt zip file from the BIN_REPO
|
|
rootProject.assembleDistribution {
|
|
from ("${BIN_REPO}/GhidraBuild/EclipsePlugins/GhidraSleighEditor") {
|
|
include 'GhidraSleighEditor*.zip'
|
|
into "Extensions/Eclipse/GhidraSleighEditor/"
|
|
}
|
|
from ("${this.projectDir}/GhidraSleighEditor_README.html") {
|
|
into "Extensions/Eclipse/GhidraSleighEditor/"
|
|
}
|
|
}
|