GT-113: Generating Eclipse projects with Gradle.

This commit is contained in:
Ryan Kurtz 2019-06-13 15:20:49 -04:00 committed by ghidra1
parent 1779fdd94d
commit 39f85478e4
15 changed files with 246 additions and 27 deletions

View File

@ -1,22 +1,27 @@
##VERSION: 2.0
##MODULE IP: BSD
##MODULE IP: Eclipse Public License 1.0
ghidra.xtext.sleigh.feature/build.gradle||GHIDRA||||END|
ghidra.xtext.sleigh.feature/build.properties||GHIDRA||||END|
ghidra.xtext.sleigh.feature/category.xml||GHIDRA||||END|
ghidra.xtext.sleigh.feature/feature.xml||GHIDRA||||END|
ghidra.xtext.sleigh.ide/META-INF/MANIFEST.MF||GHIDRA||||END|
ghidra.xtext.sleigh.ide/build.gradle||GHIDRA||||END|
ghidra.xtext.sleigh.ide/build.properties||GHIDRA||||END|
ghidra.xtext.sleigh.ide/src/ghidra/xtext/sleigh/ide/SleighIdeModule.xtend||GHIDRA||||END|
ghidra.xtext.sleigh.ide/src/ghidra/xtext/sleigh/ide/SleighIdeSetup.xtend||GHIDRA||||END|
ghidra.xtext.sleigh.tests/META-INF/MANIFEST.MF||GHIDRA||||END|
ghidra.xtext.sleigh.tests/build.gradle||GHIDRA||||END|
ghidra.xtext.sleigh.tests/build.properties||GHIDRA||||END|
ghidra.xtext.sleigh.tests/src/ghidra/xtext/sleigh/tests/CrossReferenceTest.xtend||GHIDRA||||END|
ghidra.xtext.sleigh.tests/src/ghidra/xtext/sleigh/tests/SleighMacroTest.xtend||GHIDRA||||END|
ghidra.xtext.sleigh.tests/src/ghidra/xtext/sleigh/tests/SleighParsingTest.xtend||GHIDRA||||END|
ghidra.xtext.sleigh.tests/src/ghidra/xtext/sleigh/tests/SleighScopeTest.xtend||GHIDRA||||END|
ghidra.xtext.sleigh.ui.tests/META-INF/MANIFEST.MF||GHIDRA||||END|
ghidra.xtext.sleigh.ui.tests/build.gradle||GHIDRA||||END|
ghidra.xtext.sleigh.ui.tests/build.properties||GHIDRA||||END|
ghidra.xtext.sleigh.ui/META-INF/MANIFEST.MF||GHIDRA||||END|
ghidra.xtext.sleigh.ui/build.gradle||GHIDRA||||END|
ghidra.xtext.sleigh.ui/build.properties||GHIDRA||||END|
ghidra.xtext.sleigh.ui/plugin.xml||GHIDRA||||END|
ghidra.xtext.sleigh.ui/src/ghidra/xtext/sleigh/ui/SleighEObjectHoverProvider.xtend||GHIDRA||||END|
@ -30,6 +35,7 @@ ghidra.xtext.sleigh.ui/src/ghidra/xtext/sleigh/ui/quickfix/SleighQuickfixProvide
ghidra.xtext.sleigh/.launch/Generate Sleigh (sleigh) Language Infrastructure.launch||GHIDRA||||END|
ghidra.xtext.sleigh/.launch/Launch Runtime Eclipse.launch||GHIDRA||||END|
ghidra.xtext.sleigh/META-INF/MANIFEST.MF||GHIDRA||||END|
ghidra.xtext.sleigh/build.gradle||GHIDRA||||END|
ghidra.xtext.sleigh/build.properties||GHIDRA||||END|
ghidra.xtext.sleigh/plugin.xml||GHIDRA||||END|
ghidra.xtext.sleigh/src/ghidra/xtext/sleigh/GenerateSleigh.mwe2||GHIDRA||||END|

View File

@ -0,0 +1,12 @@
// 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 {
project {
name = 'Eclipse SleighEditor Feature'
buildCommand 'org.eclipse.pde.FeatureBuilder'
natures 'org.eclipse.pde.FeatureNature'
}
}
}

View File

@ -3,5 +3,5 @@
<feature url="features/ghidra.xtext.sleigh.feature_1.0.0.qualifier.jar" id="ghidra.xtext.sleigh.feature" version="1.0.0.qualifier">
<category name="ghidra.xtext.sleigh.editor"/>
</feature>
<category-def name="ghidra.xtext.sleigh.editor" label="Sleigh Editor"/>
<category-def name="ghidra.xtext.sleigh.editor" label="Ghidra"/>
</site>

View File

@ -5,22 +5,22 @@
version="1.0.0.qualifier"
provider-name="Ghidra">
<copyright>
None
</copyright>
<license url="">
/* ###
* IP: GHIDRA
*
* Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
* 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 &quot;AS IS&quot; 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.
*/
Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
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 &quot;AS IS&quot; 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.
</license>
<requires>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: ghidra.xtext.sleigh.ide
Bundle-ManifestVersion: 2
Bundle-Name: ghidra.xtext.sleigh.ide
Bundle-Vendor: My Company
Bundle-Vendor: Ghidra
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: ghidra.xtext.sleigh.ide; singleton:=true
Bundle-ActivationPolicy: lazy
@ -10,6 +10,6 @@ Require-Bundle: ghidra.xtext.sleigh,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide,
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: ghidra.xtext.sleigh.ide.contentassist.antlr,
ghidra.xtext.sleigh.ide.contentassist.antlr.internal

View File

@ -0,0 +1,40 @@
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 {
project {
name = 'Eclipse SleighEditor IDE'
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'
}
}
}
}

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: ghidra.xtext.sleigh.tests
Bundle-ManifestVersion: 2
Bundle-Name: ghidra.xtext.sleigh.tests
Bundle-Vendor: My Company
Bundle-Vendor: Ghidra
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: ghidra.xtext.sleigh.tests; singleton:=true
Bundle-ActivationPolicy: lazy
@ -11,5 +11,5 @@ Require-Bundle: ghidra.xtext.sleigh,
org.eclipse.xtext.testing,
org.eclipse.xtext.xbase.testing,
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: ghidra.xtext.sleigh.tests;x-internal=true

View File

@ -0,0 +1,40 @@
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 {
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'
}
}
}
}

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: ghidra.xtext.sleigh.ui.tests
Bundle-ManifestVersion: 2
Bundle-Name: ghidra.xtext.sleigh.ui.tests
Bundle-Vendor: My Company
Bundle-Vendor: Ghidra
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: ghidra.xtext.sleigh.ui.tests; singleton:=true
Bundle-ActivationPolicy: lazy
@ -14,5 +14,5 @@ Require-Bundle: ghidra.xtext.sleigh.ui,
org.eclipse.xtext.xbase.junit,
org.eclipse.core.runtime,
org.eclipse.ui.workbench;resolution:=optional
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: ghidra.xtext.sleigh.ui.tests;x-internal=true

View File

@ -0,0 +1,40 @@
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 {
project {
name = 'Eclipse SleighEditor UI 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'
}
}
}
}

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: ghidra.xtext.sleigh.ui
Bundle-ManifestVersion: 2
Bundle-Name: ghidra.xtext.sleigh.ui
Bundle-Vendor: My Company
Bundle-Vendor: Ghidra
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: ghidra.xtext.sleigh.ui; singleton:=true
Bundle-ActivationPolicy: lazy
@ -19,7 +19,7 @@ Require-Bundle: ghidra.xtext.sleigh,
org.eclipse.xtext.xbase.lib;bundle-version="2.14.0",
org.eclipse.xtend.lib;bundle-version="2.14.0";resolution:=optional
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: ghidra.xtext.sleigh.ui.internal,
ghidra.xtext.sleigh.ui.contentassist,
ghidra.xtext.sleigh.ui.quickfix

View File

@ -0,0 +1,40 @@
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 {
project {
name = 'Eclipse SleighEditor UI'
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'
}
}
}
}

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Automatic-Module-Name: ghidra.xtext.sleigh
Bundle-ManifestVersion: 2
Bundle-Name: ghidra.xtext.sleigh
Bundle-Vendor: My Company
Bundle-Vendor: Ghidra
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: ghidra.xtext.sleigh; singleton:=true
Bundle-ActivationPolicy: lazy
@ -15,7 +15,7 @@ Require-Bundle: org.eclipse.xtext,
org.eclipse.emf.common,
org.eclipse.xtend.lib;bundle-version="2.14.0",
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: ghidra.xtext.sleigh.formatting2,
ghidra.xtext.sleigh,
ghidra.xtext.sleigh.sleigh.impl,

View File

@ -0,0 +1,40 @@
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 {
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'
}
}
}
}

View File

@ -27,6 +27,7 @@ includeProject('RuntimeScripts', 'Ghidra', true)
includeProject('IDAPro', 'GhidraBuild', true)
includeProject('GhidraDocs', '.', true)
includeProjects('GhidraBuild/EclipsePlugins/GhidraDev') // requires Eclipse PDE
includeProjects('GhidraBuild/EclipsePlugins/SleighEditor') // requires Eclipse DSL
/*******************************************************************************************
* Apply additional Ghidra respositories
@ -44,4 +45,4 @@ if (extensionsList.isFile()) {
apply from: extraSettings.absolutePath
}
}
}
}