Skip to content

Commit

Permalink
Test Pull Request CI (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
charneykaye committed Aug 16, 2023
1 parent 7724250 commit cc667c6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
# JavaCV + JavaFX + Spring Boot + jlink/jpackage + Gradle + GitHub Actions

Based on a real project we're working on, this is a minimal example of how to build a JavaFX application with JavaCV, and package it as a native application using jlink/jpackage.

## Stackoverflow

**How to Gradle load JavaCV binaries only for current platform?**
https://stackoverflow.com/questions/76908209/how-to-gradle-load-javacv-binaries-only-for-current-platform
27 changes: 11 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,48 +53,43 @@ repositories {
}

javafx {
version = "${rootProject.ext.javaFxVersion}"
version = javaFxVersion
modules = ['javafx.base', 'javafx.controls', 'javafx.fxml', 'javafx.graphics']
}

//noinspection GroovyAssignabilityCheck
ext.os = org.gradle.internal.os.OperatingSystem.current() as org.gradle.internal.os.OperatingSystem

jlink {
// imageZip = file("$buildDir/image-zip/javacv-example.zip")
// options = ['--bind-services', '--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
addExtraDependencies 'javafx'

launcher {
name = 'javacv-example'
noConsole = true
}
jpackage {
if (os.windows) {
// installerOptions = ['--win-per-user-install', '--win-dir-chooser', '--win-menu']
}
}
}

dependencies {
implementation "ch.qos.logback:logback-classic:${rootProject.ext.logbackVersion}"
implementation "ch.qos.logback:logback-core:${rootProject.ext.logbackVersion}"
implementation "org.openjfx:javafx-base:${rootProject.ext.javaFxVersion}"
implementation "org.openjfx:javafx-controls:${rootProject.ext.javaFxVersion}"
implementation "org.openjfx:javafx-fxml:${rootProject.ext.javaFxVersion}"
implementation "org.openjfx:javafx-graphics:${rootProject.ext.javaFxVersion}"
implementation "org.springframework.boot:spring-boot-starter-logging:${rootProject.ext.springBootVersion}"
implementation "org.springframework.boot:spring-boot-starter:${rootProject.ext.springBootVersion}"
implementation "ch.qos.logback:logback-classic:${logbackVersion}"
implementation "ch.qos.logback:logback-core:${logbackVersion}"
implementation "org.openjfx:javafx-base:${javaFxVersion}"
implementation "org.openjfx:javafx-controls:${javaFxVersion}"
implementation "org.openjfx:javafx-fxml:${javaFxVersion}"
implementation "org.openjfx:javafx-graphics:${javaFxVersion}"
implementation "org.springframework.boot:spring-boot-starter-logging:${springBootVersion}"
implementation "org.springframework.boot:spring-boot-starter:${springBootVersion}"
implementation 'commons-codec:commons-codec:1.15'
implementation 'commons-io:commons-io:2.11.0'
implementation 'org.bytedeco:ffmpeg-platform-gpl:6.0-1.5.9' // Optional GPL builds with (almost) everything enabled
implementation 'org.bytedeco:flandmark-platform:1.07-1.5.8' // Required by org.bytedeco.javacv
implementation 'org.bytedeco:javacv-platform:1.5.9'
implementation 'org.reflections:reflections:0.10.2'
testImplementation "org.junit.jupiter:junit-jupiter-api:${rootProject.ext.junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation 'org.hamcrest:hamcrest-library:2.2'
testImplementation 'org.mockito:mockito-junit-jupiter'
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${rootProject.ext.junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}

//noinspection ConfigurationAvoidance
Expand Down

0 comments on commit cc667c6

Please sign in to comment.