/* ### * 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 from: "${rootProject.projectDir}/gradle/javaProject.gradle" apply from: "${rootProject.projectDir}/gradle/helpProject.gradle" apply from: "${rootProject.projectDir}/gradle/jacocoProject.gradle" apply from: "${rootProject.projectDir}/gradle/javaTestProject.gradle" apply from: "${rootProject.projectDir}/gradle/distributableGhidraModule.gradle" apply from: "${rootProject.projectDir}/gradle/hasProtobuf.gradle" apply from: "${rootProject.projectDir}/gradle/hasPythonPackage.gradle" apply plugin: 'eclipse' eclipse.project.name = 'Debug Debugger-rmi-trace' dependencies { api project(':ProposedUtils') api project(':Pty') api project(':Debugger') api project(':Debugger-api') testImplementation project(path: ':Generic', configuration: 'testArtifacts') testImplementation project(path: ':Debugger', configuration: 'testArtifacts') testImplementation project(path: ':Framework-TraceModeling', configuration: 'testArtifacts') } task configureGenerateProtoPy { dependsOn(configurations.protocArtifact) doLast { def exe = configurations.protocArtifact.first() if (!isCurrentWindows()) { exe.setExecutable(true) } generateProtoPy.commandLine exe generateProtoPy.args "--python_out=${generateProtoPy.outdir}" generateProtoPy.args "--pyi_out=${generateProtoPy.stubsOutdir}" generateProtoPy.args "-I${generateProtoPy.srcdir}" generateProtoPy.args generateProtoPy.src } } // Can't use providers.exec, or else we see no output task generateProtoPy(type:Exec) { dependsOn(configureGenerateProtoPy) ext.srcdir = file("src/main/proto") ext.src = fileTree(srcdir) { include "**/*.proto" } ext.outdir = file("build/generated/source/proto/main/py") ext.stubsOutdir = file("build/generated/source/proto/main/pyi/ghidratrace") outputs.dir(outdir) outputs.dir(stubsOutdir) inputs.files(src) } tasks.assemblePyPackage { from(generateProtoPy) { into "src/ghidratrace" } } distributePyDep("protobuf-3.20.3-py2.py3-none-any.whl") distributePyDep("psutil-5.9.8.tar.gz") distributePyDep("setuptools-68.0.0-py3-none-any.whl") distributePyDep("wheel-0.37.1-py2.py3-none-any.whl")