Skip to content

Commit

Permalink
* Fix BuildPlugin incorrectly resetting `javacppBuildParser.output…
Browse files Browse the repository at this point in the history
…Directory` in subprojects (pull #12)
  • Loading branch information
devjeonghwan authored May 5, 2021
1 parent 7380cd9 commit 962d358
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

* Fix `BuildPlugin` incorrectly resetting `javacppBuildParser.outputDirectory` in subprojects ([pull #12](/~https://github.com/bytedeco/gradle-javacpp/issues/12))

### March 8, 2021 version 1.5.5
* Add `javacppPlatformExtension` property to `BuildPlugin` and map it to `platform.extension` property
* Add instructions to integrate `BuildTask` with Android Studio ([issue #5](/~https://github.com/bytedeco/gradle-javacpp/issues/5))
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/bytedeco/gradle/javacpp/BuildPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ boolean isLibraryPath(String path) {
task.propertyKeysAndValues = new Properties();
task.propertyKeysAndValues.setProperty("platform.extension", getPlatformExtension());
}
task.outputDirectory = main.getJava().getSrcDirs().iterator().next();
if (task.outputDirectory == null) {
task.outputDirectory = main.getJava().getSrcDirs().iterator().next();
}
task.dependsOn("javacppCompileJava");
task.doFirst(t -> { main.getJava().srcDir(task.outputDirectory); });
});
Expand Down

0 comments on commit 962d358

Please sign in to comment.