Skip to content

Commit

Permalink
* Honor the skip property in BuildTask (pull #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
junlarsen authored Oct 28, 2020
1 parent 8e797c4 commit 3bfc84a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 3bfc84a

Please sign in to comment.