Skip to content

Commit

Permalink
Merge pull request #125 from darxriggs/fix-generate-test-hpl-dependency
Browse files Browse the repository at this point in the history
Fix generate-test-hpl task dependency for running tests
  • Loading branch information
sghill authored Jan 2, 2020
2 parents 77f4977 + 7854ee0 commit ae67d06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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)

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

0 comments on commit ae67d06

Please sign in to comment.