/* ### * IP: GHIDRA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ 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/" } }