Skip to content

Commit

Permalink
Fix broken gradle buildNative
Browse files Browse the repository at this point in the history
The task needs to be executed after assemble
  • Loading branch information
geoand committed Oct 23, 2019
1 parent 9c684e3 commit 47a5b64
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ private void registerTasks(Project project) {
quarkusBuild.dependsOn(classesTask);
});

Task buildNative = tasks.create("buildNative", QuarkusNative.class).dependsOn(quarkusBuild);
Task buildNative = tasks.create("buildNative", QuarkusNative.class);

// set up the source set for the testNative
JavaPluginConvention javaPlugin = project.getConvention().findPlugin(JavaPluginConvention.class);
if (javaPlugin != null) {
buildNative.dependsOn(tasks.getByName(BasePlugin.ASSEMBLE_TASK_NAME));

SourceSetContainer sourceSets = javaPlugin.getSourceSets();
SourceSet nativeTestSourceSet = sourceSets.create("native-test"); // this name has to be the same as the directory in which the tests reside
SourceSetOutput mainSourceSetOutput = sourceSets.getByName("main").getOutput();
Expand Down

0 comments on commit 47a5b64

Please sign in to comment.