Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle: Fix bundle_examples compilation #4975

Conversation

ekilmer
Copy link
Contributor

@ekilmer ekilmer commented Feb 12, 2023

Similar to #4974, without these fixes, gradle compilation for the relevant tasks fails on the command line.

The bundle_examples project dynamically creates sourceSets for each directory in Ghidra/Extensions/bundle_examples, but it fails to set up the compile classpath dependencies between those sourceSets.

The list of the 8 created sourceSets is as follows: scripts_jar1, scripts_jar2, scripts_lib, scripts_lib_user, scripts_uses_jar, scripts_uses_jar_version, scripts_with_activator, scripts_with_manifest.

To test that this PR fixes the compilation, we can run a simple bash script

declare -a SOURCE_SETS=(scripts_jar1 scripts_jar2 scripts_lib scripts_lib_user scripts_uses_jar scripts_uses_jar_version scripts_with_activator scripts_with_manifest)

declare -a TASKS=()
for sourceSet in "${SOURCE_SETS[@]}"
do
    TASKS+=(":bundle_examples:compile${sourceSet}java")
done

gradle --continue --rerun-tasks "${TASKS[@]}"

On master branch, I see 6 task failures due to missing dependencies on the compilation classpath. On this branch, everything passes.

@ekilmer ekilmer force-pushed the ekilmer/gradle-fix-bundle_examples-compilation branch from 32a251f to 0a6eb4f Compare March 9, 2023 18:57
@ryanmkurtz ryanmkurtz self-assigned this Mar 13, 2023
@ryanmkurtz ryanmkurtz added Feature: Build Status: Triage Information is being gathered labels Mar 13, 2023
@ryanmkurtz ryanmkurtz self-requested a review March 13, 2023 17:20
@ryanmkurtz ryanmkurtz added Status: Internal This is being tracked internally by the Ghidra team and removed Status: Triage Information is being gathered labels Mar 13, 2023
@ryanmkurtz ryanmkurtz added this to the 10.3 milestone Mar 13, 2023
@ryanmkurtz
Copy link
Collaborator

I just tested this...looks good. It will make it's way up to github soon. Thanks for rebasing.

@ryanmkurtz ryanmkurtz merged commit d84d6df into NationalSecurityAgency:master Mar 14, 2023
@ekilmer ekilmer deleted the ekilmer/gradle-fix-bundle_examples-compilation branch March 14, 2023 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Build Status: Internal This is being tracked internally by the Ghidra team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants