Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DatepollSystems/WaiterRobot-Desktop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.3
Choose a base ref
...
head repository: DatepollSystems/WaiterRobot-Desktop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.1.0
Choose a head ref
  • 8 commits
  • 22 files changed
  • 1 contributor

Commits on Oct 6, 2023

  1. Remove detekt push hook

    dev-Fabi committed Oct 6, 2023
    Copy the full SHA
    d8c4640 View commit details

Commits on Nov 22, 2023

  1. Init Conveyor

    dev-Fabi committed Nov 22, 2023
    Copy the full SHA
    95d4677 View commit details

Commits on Nov 29, 2023

  1. Copy the full SHA
    7cd4fb7 View commit details
  2. Delete old release workflow

    dev-Fabi committed Nov 29, 2023
    Copy the full SHA
    6a631f1 View commit details
  3. Change to app.dir

    dev-Fabi committed Nov 29, 2023
    Copy the full SHA
    a2b14be View commit details
  4. Fix readme

    dev-Fabi committed Nov 29, 2023
    Copy the full SHA
    99185d3 View commit details
  5. Fix runs-on

    dev-Fabi committed Nov 29, 2023
    Copy the full SHA
    ebfe3bd View commit details
  6. Supply version

    dev-Fabi committed Nov 29, 2023
    Copy the full SHA
    de66417 View commit details
57 changes: 57 additions & 0 deletions .github/workflows/Conveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Conveyor Deploy
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Test
run: ./gradlew test --stacktrace
env:
env: CI
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"

- name: Build
run: ./gradlew jar -PversionString="${{ github.ref_name }}" # TODO use "proguardReleaseJars" as this also uses Pro-Guard (but there needs to be more configuration [ProGuard, gradle and conveyor])
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3g"

- name: Extract secrets
run: |
echo "${{ secrets.KEYS_TAR_ASC }}" > .keys.tar.gz.asc
gpg -d --passphrase "${{ secrets.KEYS_PASSPHRASE }}" --batch .keys.tar.gz.asc > .keys.tar.gz
tar xzf .keys.tar.gz
- name: Run Conveyor
uses: hydraulic-software/conveyor/actions/build@v12.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
WAITERROBOT_VERSION_STRING: ${{ github.ref_name }}
with:
command: make copied-site
extra_flags: -f ci.conveyor.conf
signing_key: ${{ secrets.SIGNING_KEY }}
agree_to_license: 1
69 changes: 0 additions & 69 deletions .github/workflows/Release.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -232,5 +232,6 @@ gradle-app.setting

# End of https://www.toptal.com/developers/gitignore/api/macos,intellij,kotlin,gradle,windows,linux

# Application generated files
/WaiterRobot/config/mediatorConfig.json
#Conveyor
output
.keys*
1 change: 0 additions & 1 deletion .idea/runConfigurations/App.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/runConfigurations/Conveyor_run.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/runDistributable.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# WaiterRobot-Mediator

## Run

To run the development version you have to supply the app version. This can be done in two ways:
## Install App
Download the latest Version [here](https://datepollsystems.github.io/waiterrobot-desktop/download.html).

- supply as system property / vm-option `-Djpackage.app-version="99.0.0"`
- run the distributable and supply as gradle property: `./gradlew runDistributable -PversionString=99.0.0`
## Run

> Use `99.0.0` as version so that the backend knows that all features are available or supply a specific version if you
> have checked out an old release or want to test with a "real" version string.
To run with a specific version you can supply the app version as system properties / vm-options
`-Dapp.version="99.99.99"`

The pre-configured IntelliJ run configurations already include this config.
> Use `99.99.99` as version so that the backend knows that all features are available or supply a specific
> version if you have checked out an old release or want to test with a "real" version string.
## Create Release

Releases are created by CI and are published to GitHub releases. There are executables for Windows, Mac and Linux
created. To create a new release just push a tag in the form of `vmajor.minor.patch` (e.g. `v1.0.0`) to GitHub. This
will start the CI. After a few minutes the artifacts can be downloaded
from [Releases](https://github.com/DatepollSystems/waiterrobot-desktop/releases).
from [here](https://datepollsystems.github.io/waiterrobot-desktop/download.html) (or
[GitHub Releases](https://github.com/DatepollSystems/waiterrobot-desktop/releases)).

## Recommendations

43 changes: 21 additions & 22 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.report.ReportMergeTask
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
@@ -9,18 +8,26 @@ plugins {
kotlin("plugin.serialization") version kotlinVersion
id("org.jetbrains.compose") version "1.4.3"
id("io.gitlab.arturbosch.detekt") version "1.23.1"
id("dev.hydraulic.conveyor") version "1.6"
}

group = "org.datepollsystems.waiterrobot.mediator"
version = "1.0.0"
version = (project.findProperty("versionString") as? String)?.removePrefix("v")
?: System.getenv("WAITERROBOT_VERSION_STRING")?.removePrefix("v")?.ifEmpty { null }
?: "99.99.99"

repositories {
google()
mavenCentral()
}

dependencies {
implementation(compose.desktop.currentOs)
linuxAmd64(compose.desktop.linux_x64)
linuxAarch64(compose.desktop.linux_arm64)
macAmd64(compose.desktop.macos_x64)
macAarch64(compose.desktop.macos_arm64)
windowsAmd64(compose.desktop.windows_x64)

implementation(compose.materialIconsExtended)

val ktorVersion = "2.3.2"
@@ -60,30 +67,14 @@ tasks.withType<KotlinCompile> {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

compose.desktop {
application {
mainClass = "org.datepollsystems.waiterrobot.mediator.App"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Exe, TargetFormat.Deb) // TODO add more?
packageName = "WaiterRobot Desktop"
packageVersion = (project.findProperty("versionString") as? String)?.removePrefix("v")

macOS {
iconFile.set(project.file("icon.icns"))
}
windows {
iconFile.set(project.file("icon.ico"))
}
linux {
iconFile.set(project.file("icon.png"))
}

includeAllModules = true // TODO figure out which modules are really needed -> reduces app size
}
}
}

@@ -113,3 +104,11 @@ tasks.withType<Detekt>().configureEach {
detektReportMergeSarif {
input.from(tasks.withType<Detekt>().map { it.sarifReportFile })
}

// Work around temporary Compose bugs.
configurations.all {
attributes {
// https://github.com/JetBrains/compose-jb/issues/1404#issuecomment-1146894731
attribute(Attribute.of("ui", String::class.java), "awt")
}
}
25 changes: 25 additions & 0 deletions ci.conveyor.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
include required("conveyor.conf")

app {

site {
github {
oauth-token = ${env.GITHUB_TOKEN}
pages-branch = gh-pages
}
}

signing-key = ${env.SIGNING_KEY}

mac.certificate = .keys/apple.cer

# We probably need to use a self-signed one here (certificates for windows cost around 400 - 500€ per year)
# Another option would be to distribute through the Microsoft-AppStore (~20€ a year)
#windows.certificate = .keys/windows.cer

mac.notarization {
issuer-id = ${env.APPLE_ISSUER_ID}
key-id = ${env.APPLE_KEY_ID}
private-key = .keys/api_key.p8
}
}
27 changes: 27 additions & 0 deletions conveyor.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// This is a hashbang include. You can run the command after the #! to see what
// configuration is being extracted from the Gradle build using the Conveyor plugin.
include "#!./gradlew -q printConveyorConfig"

// This enables native library extraction, which improves app startup time and robustness.
// It's optional but a good idea to have it. You can remove this if you get tired of specifying
// system properties for Java libraries with native components.
//
// See https://hydraulic.dev/blog/11-in-jar-signing.html for more.
include required("https://raw.githubusercontent.com/hydraulic-software/conveyor/master/configs/jvm/extract-native-libraries.conf")

// Config file documentation: https://conveyor.hydraulic.dev/latest/configs
app {
rdns-name = "org.datepollsystems.waiterrobot.mediator"
display-name = kellner.team
vendor = DatePollSystems
contact-email = "contact@kellner.team"

icons = icon.svg // TODO add and change loading of it in App.kt
windows.inputs += TASK/rendered-icons/windows
linux.inputs += TASK/rendered-icons/linux

vcs-url = github.com/DatepollSystems/waiterrobot-desktop
license = GPL-3.0
}

conveyor.compatibility-level = 12
Binary file removed icon.icns
Binary file not shown.
Binary file removed icon.ico
Binary file not shown.
Binary file removed icon.png
Binary file not shown.
Loading