Skip to content
New issue

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

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

Already on GitHub? # to your account

Exit entire build command if skip was specified #7

Merged
merged 2 commits into from
Oct 28, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Honor the `skip` property in `BuildTask` ([pull #7](https://github.com/bytedeco/gradle-javacpp/issues/7))
* Add `BuildExtension` helper for `maven-publish` and update zlib sample project
* Add builds for Android to zlib sample project ([issue #5](https://github.com/bytedeco/gradle-javacpp/issues/5))

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/bytedeco/gradle/javacpp/BuildTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ public BuildTask() {

@TaskAction public void build() throws IOException, ClassNotFoundException, NoClassDefFoundError, InterruptedException, ParserException {
Logger logger = new Slf4jLogger(Builder.class);

if (getSkip()) {
logger.info("Skipping execution of JavaCPP Builder");
return;
}

Builder builder = new Builder(logger)
.classPaths(getClassPath())
.encoding(getEncoding())
Expand Down