Skip to content

Commit

Permalink
Fix execution of main example and jpro-media example as desktop apps
Browse files Browse the repository at this point in the history
  • Loading branch information
besidev committed Jan 11, 2024
1 parent 6430863 commit b5a6e37
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
10 changes: 6 additions & 4 deletions example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'org.bytedeco.gradle-javacpp-platform' version "$JAVACPP_VERSION"
id "org.javamodularity.moduleplugin" version "$MODULE_PLUGIN_VERSION"
id 'org.openjfx.javafxplugin'
id 'jpro-gradle-plugin'
}
Expand All @@ -23,8 +24,9 @@ javafx {
}

application {
mainClass = "$mainClassName"
applicationDefaultJvmArgs = [
"--add-exports", "javafx.base/com.sun.javafx.event=one.jpro.platform.media"
]
mainClass = "$mainClassName"
mainModule = 'one.jpro.platform.example'
applicationDefaultJvmArgs = [
"--add-exports", "javafx.base/com.sun.javafx.event=one.jpro.platform.media"
]
}
23 changes: 8 additions & 15 deletions jpro-media/example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,17 @@ javafx {
}

def examples = [
'media-player' : 'one.jpro.platform.media.example.MediaPlayerSample',
'media-recorder' : 'one.jpro.platform.media.example.MediaRecorderSample',
'media-recorder-and-player' : 'one.jpro.platform.media.example.MediaRecorderAndPlayerSample'
'media-player' : 'one.jpro.platform.media.example.MediaPlayerSample',
'media-recorder' : 'one.jpro.platform.media.example.MediaRecorderSample',
'media-recorder-and-player': 'one.jpro.platform.media.example.MediaRecorderAndPlayerSample'
]

mainClassName = project.hasProperty("sample") ? examples[project.getProperties().get("sample")] : examples["media-recorder-and-player"]

run {
doFirst {
jvmArgs = [
'--add-exports', 'javafx.base/com.sun.javafx.event=one.jpro.platform.media'
]
}
}

application {
mainClass = "$mainClassName"
applicationDefaultJvmArgs = [
"--add-exports", "javafx.base/com.sun.javafx.event=one.jpro.platform.media"
]
mainClass = "$mainClassName"
mainModule = 'one.jpro.platform.media.example'
applicationDefaultJvmArgs = [
"--add-exports", "javafx.base/com.sun.javafx.event=one.jpro.platform.media"
]
}

0 comments on commit b5a6e37

Please sign in to comment.