Skip to content

Ghidra is a software reverse engineering (SRE) framework

1.5 KB
Raw Blame
/* ###
 * 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: 'eclipse'
eclipse.project {
  name = '_Decompiler'
  buildCommand 'org.eclipse.cdt.managedbuilder.core.genmakebuilder'
  buildCommand 'org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder'
  natures 'org.eclipse.cdt.core.cnature'
  natures 'org.eclipse.cdt.core.ccnature'
  natures 'org.eclipse.cdt.managedbuilder.core.managedBuildNature'
  natures 'org.eclipse.cdt.managedbuilder.core.ScannerConfigNature'
  
  file {
  	withXml {
  		def projectNode = it.asNode()
  		projectNode.iterator().each { subNode ->
  			String subNodeText = '' + subNode
  			if (subNodeText.startsWith('buildSpec')) {
  				subNode.iterator().each { buildCmd ->
  					String nameNode = buildCmd?.name
  					if (nameNode.contains('genmakebuilder')) {
  						buildCmd.appendNode('triggers', 'clean,full,incremental')
  					}
  					if (nameNode.contains('ScannerConfigBuilder')) {
  						buildCmd.appendNode('triggers', 'full,incremental')
  					}
  				}
  			}
  		}
  	}
  }
}