-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
307 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
import org.apache.tools.ant.filters.ReplaceTokens | ||
|
||
plugins { | ||
java | ||
application | ||
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
kotlin("jvm") version "1.9.10" | ||
} | ||
|
||
group = "org.magmaoffenburg.roboviz" | ||
version = "2.0.0-SNAPSHOT" | ||
application { | ||
mainClass.set("org.magmaoffenburg.roboviz.MainKt") | ||
applicationDefaultJvmArgs = listOf("--add-exports=java.desktop/sun.awt=ALL-UNNAMED") | ||
} | ||
|
||
val javaVersion by extra(17) | ||
val joglVersion by extra("2.4.0") | ||
val log4jVersion by extra("2.20.0") | ||
|
||
subprojects { | ||
apply(plugin = "java") | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(url = "https://www.jogamp.org/deployment/maven/") | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(javaVersion)) | ||
} | ||
} | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(javaVersion)) | ||
} | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(javaVersion) | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(url = "https://www.jogamp.org/deployment/maven/") | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib") | ||
implementation("org.jetbrains.kotlin:kotlin-reflect") | ||
implementation("com.github.weisj:darklaf-core:3.0.2") | ||
implementation("org.jogamp.jogl:jogl-all-main:$joglVersion") | ||
implementation("org.jogamp.gluegen:gluegen-rt-main:$joglVersion") | ||
implementation("org.apache.commons:commons-compress:1.24.0") | ||
implementation("org.apache.logging.log4j:log4j-api-kotlin:1.2.0") | ||
implementation("org.apache.logging.log4j:log4j-api:$log4jVersion") | ||
implementation("org.apache.logging.log4j:log4j-core:$log4jVersion") | ||
|
||
implementation(project(":jsgl")) | ||
} | ||
|
||
tasks.jar { | ||
manifest { | ||
// We need to set Multi-Release to true so that log4j can determine the correct class names | ||
attributes("Multi-Release" to "true") | ||
} | ||
} | ||
|
||
tasks.withType<ShadowJar> { | ||
archiveFileName.set("${project.name}.jar") | ||
} | ||
|
||
tasks.register<Copy>("binDir") { | ||
dependsOn(tasks.withType<ShadowJar>()) | ||
|
||
val binPath = layout.projectDirectory.dir("bin") | ||
from( | ||
layout.buildDirectory.file("libs/${project.name}.jar"), | ||
layout.projectDirectory.file("config.txt"), | ||
layout.projectDirectory.file("scripts/roboviz.sh"), | ||
layout.projectDirectory.file("scripts/roboviz.bat"), | ||
layout.projectDirectory.file("LICENSE.md"), | ||
layout.projectDirectory.file("NOTICE.md"), | ||
layout.projectDirectory.file("CHANGELOG.md") | ||
) | ||
into(binPath) | ||
} | ||
|
||
// Creates an application bundle for macOS | ||
tasks.register("macOSApp") { | ||
dependsOn(tasks.withType<ShadowJar>()) | ||
|
||
doLast { | ||
copy { | ||
from(layout.projectDirectory.file("macos/Info.plist")) | ||
into(layout.buildDirectory.dir("macos/${project.name}.app/Contents")) | ||
filter(ReplaceTokens::class, "tokens" to mapOf( | ||
"CFBundleExecutable" to "launcher", | ||
"CFBundleIconFile" to "icon", | ||
"CFBundleIdentifier" to group.toString(), | ||
"CFBundleName" to project.name, | ||
"CFBundleShortVersionString" to version.toString(), | ||
"CFBundleVersion" to version.toString(), | ||
)) | ||
} | ||
copy { | ||
from(layout.projectDirectory.file("scripts/roboviz.sh")) | ||
into(layout.buildDirectory.dir("macos/${project.name}.app/Contents/MacOS")) | ||
rename(".*", "launcher") | ||
} | ||
copy { | ||
from(layout.projectDirectory.file("macos/icon.icns")) | ||
into(layout.buildDirectory.dir("macos/${project.name}.app/Contents/Resources")) | ||
} | ||
copy { | ||
from(layout.buildDirectory.file("libs/${project.name}.jar")) | ||
into(layout.buildDirectory.dir("macos/${project.name}.app/Contents/MacOS")) | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
val joglVersion: String by rootProject.extra | ||
val log4jVersion: String by rootProject.extra | ||
|
||
dependencies { | ||
implementation("org.jogamp.gluegen:gluegen-rt-main:$joglVersion") | ||
implementation("org.jogamp.jogl:jogl-all-main:$joglVersion") | ||
implementation("org.apache.logging.log4j:log4j-api:$log4jVersion") | ||
} | ||
|
||
group = "magmaOffenburg" | ||
description = "jsgl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleExecutable</key> | ||
<string>@CFBundleExecutable@</string> | ||
<key>CFBundleIconFile</key> | ||
<string>@CFBundleIconFile@</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>@CFBundleIdentifier@</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>@CFBundleName@</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>@CFBundleShortVersionString@</string> | ||
<key>CFBundleVersion</key> | ||
<string>@CFBundleVersion@</string> | ||
<key>LSApplicationCategoryType</key> | ||
<string>public.app-category.developer-tools</string> | ||
<key>NSHighResolutionCapable</key> | ||
<false/> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Copyright 2011-2023 The RoboViz authors</string> | ||
<key>NSPrincipalClass</key> | ||
<string>NSApplication</string> | ||
</dict> | ||
</plist> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,6 @@ | ||
cd .. | ||
|
||
set BIN=bin\ | ||
|
||
IF EXIST %BIN% GOTO COMPILE | ||
mkdir %BIN% | ||
|
||
:COMPILE | ||
call gradlew.bat clean shadowJar | ||
|
||
copy build\libs\RoboViz.jar %BIN%\ | ||
copy config.txt %BIN%\ | ||
copy scripts\roboviz.sh %BIN%\ | ||
copy scripts\roboviz.bat %BIN%\ | ||
copy LICENSE.md %BIN%\ | ||
copy NOTICE.md %BIN%\ | ||
copy CHANGELOG.md %BIN%\ | ||
call gradlew.bat clean binDir | ||
|
||
gradlew.bat clean | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,6 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
BIN=../bin | ||
../gradlew -p .. clean binDir | ||
|
||
# create a bin folder in the RoboViz root directory | ||
mkdir -p $BIN | ||
|
||
../gradlew -p .. clean shadowJar | ||
|
||
# copy over resources and libraries to bin folder | ||
cp ../build/libs/RoboViz.jar $BIN/ | ||
cp ../config.txt $BIN/ | ||
cp ../scripts/roboviz.sh $BIN/ | ||
cp ../scripts/roboviz.bat $BIN/ | ||
cp ../LICENSE.md $BIN/ | ||
cp ../NOTICE.md $BIN/ | ||
cp ../CHANGELOG.md $BIN/ | ||
|
||
# clean up the gradle build directorys | ||
# clean up the gradle build directories | ||
../gradlew -p .. clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.