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

Fix generate-test-hpl task dependency for running tests #125

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,13 @@ class JpiPlugin implements Plugin<Project> {

// generate test hpl manifest for the current plugin, to be used during unit test
def outputDir = project.layout.buildDirectory.dir('generated-resources/test')
project.tasks.register('generate-test-hpl', GenerateTestHpl) {
testSourceSet.output.dir(outputDir)

def generateTestHplTask = project.tasks.register('generate-test-hpl', GenerateTestHpl) {
it.hplDir.set(outputDir)
}
testSourceSet.output.dir(outputDir)
darxriggs marked this conversation as resolved.
Show resolved Hide resolved

project.tasks.named(JavaPlugin.TEST_CLASSES_TASK_NAME).configure { it.dependsOn(generateTestHplTask) }
}

private static void resolvePluginDependencies(Project project) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class JpiIntegrationSpec extends IntegrationSpec {
'processTestResources' | ':resolveTestDependencies' | TaskOutcome.NO_SOURCE
'jpi' | ':war' | TaskOutcome.SUCCESS
'compileTestJava' | ':insertTest' | TaskOutcome.SKIPPED
'testClasses' | ':generate-test-hpl' | TaskOutcome.SUCCESS
'compileJava' | ':localizer' | TaskOutcome.SUCCESS
}

Expand Down