Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
999ae3a
added javafx-graphics with mac classifier
Death111 Jan 13, 2023
91d24aa
Update pom.xml
Death111 Jan 13, 2023
75b81e9
skip tests
Death111 Jan 13, 2023
1d64a14
test java 17
Death111 Jan 13, 2023
3028b59
try with classifier mac-aarch64
Death111 Jan 13, 2023
58405c7
changed logic to not check if "linux" but check "not windows" to fix …
Death111 Jan 13, 2023
c2a6bbe
Merge branch 'develop' into feature/macSupport
Death111 Apr 24, 2023
ca48f01
Update to 17 and SpringBoot 3
sesturm May 2, 2023
2320dca
added openjfx-monocle
sesturm May 2, 2023
a983ef2
added openjfx-monocle
sesturm May 2, 2023
ef4b07a
removed workaround
sesturm May 3, 2023
9163834
cleanup
sesturm May 4, 2023
019ae92
upgrade Spring Boot to 3.1.3
Sep 19, 2023
64bb287
checks imported h2 version is 1 oder newer
Oct 17, 2023
cc804ea
add log statement when option is used
Nov 10, 2023
1c600bd
update to latest spring patch release
Death111 Apr 7, 2024
f3bd78e
Merge pull request #168 from doubleSlashde/feature/update_dependencies
Death111 Apr 7, 2024
ab2f4f0
update to javafx 22
Death111 Apr 7, 2024
39cd801
update git-commit plugin coordinates
Death111 Apr 7, 2024
7e113b0
start auto save separately to fix unit test
Death111 Apr 7, 2024
3c19ba2
update dependencies and move finalname to build
Death111 Apr 7, 2024
9fb21c4
update github actions to latest version
Death111 Apr 7, 2024
a40c11f
adapted logging statements to be more accurate. reverted pom version …
Death111 Jan 8, 2025
2209928
Implement support for opening URLs on macOS in BrowserHelper; add isM…
sesturm Jan 8, 2025
109af13
Remove TODO comment for macOS support in FileOpenHelper
sesturm Jan 8, 2025
5cee4bb
Refactor OS class to optimize OS name retrieval
sesturm Jan 8, 2025
a783b27
Upgrade Spring Boot and Maven Dependency Check versions in pom.xml
sesturm Jan 8, 2025
e87b12d
undo version change
sesturm Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .github/workflows/mavenCi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,28 @@ jobs:
runs-on: ubuntu-latest

env:
version: 1.3.${{ github.run_number }}
version: 2.0.${{ github.run_number }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'corretto'
cache: maven

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: 'java'

- name: Build
run: mvn -V -B clean package org.jacoco:jacoco-maven-plugin:0.8.7:prepare-agent org.jacoco:jacoco-maven-plugin:0.8.7:report -Pcoverage -Dproject.version=${{ env.version }}-SNAPSHOT

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: KeepTime-${{ env.version }}
path: /home/runner/work/KeepTime/KeepTime/target/*-bin.zip
Expand All @@ -49,27 +49,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -V -B sonar:sonar
-Dsonar.host.url=${{ secrets.HOST_URL }}
-Dsonar.organization=${{ secrets.ORGANIZATION_NAME }}
-Dsonar.projectKey=${{ secrets.PROJECT_KEY }}
-Dsonar.java.binaries=.
-Dsonar.qualitygate.wait=false
run: mvn -V -B sonar:sonar -Dsonar.host.url=${{ secrets.HOST_URL }} -Dsonar.organization=${{ secrets.ORGANIZATION_NAME }} -Dsonar.projectKey=${{ secrets.PROJECT_KEY }} -Dsonar.java.binaries=. -Dsonar.qualitygate.wait=false

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

dependency-check:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'corretto'
cache: maven

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ You should put the .jar in an extra folder as a *logs* and a *db* folder will be
7. To see the changes just start the new KeepTime again

## Requirements

* Windows 7, 10
* Linux (tested on Ubuntu 18.04)
* Java 11
* Operating System
* Windows 7, 10, 11
* Linux (tested on Ubuntu 18.04)
* Mac (tested on MacBook M2 Pro (ARM based CPU))
* Java 17
150 changes: 81 additions & 69 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.10</version>
<relativePath />
<!-- lookup parent from repository -->
</parent>
<groupId>de.doubleslash</groupId>
<artifactId>keeptime</artifactId>
<version>${project.version}</version>
<packaging>jar</packaging>

<packaging>jar</packaging>
<name>KeepTime</name>

<description>Time tracker</description>

<organization>
<name>doubleSlash Net-Business GmbH</name>
<url>https://www.doubleslash.de/</url>
</organization>

<licenses>
<license>
<name>GNU General Public License (GPL) version 3.0</name>
Expand All @@ -19,26 +32,14 @@
</license>
</licenses>

<organization>
<name>doubleSlash Net-Business GmbH</name>
<url>https://www.doubleslash.de/</url>
</organization>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
<project.version>1.3.0-SNAPSHOT</project.version>
<project.version>2.0.0-SNAPSHOT</project.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<java.version>17</java.version>
<javafx.version>22</javafx.version>

<maven-dependency-check.version>8.0.2</maven-dependency-check.version>
<maven-dependency-check.version>9.1.0</maven-dependency-check.version>
<!-- USING HTML,XML (comma-separated list) did not work with plugin version 5.1.0 -->
<maven-dependency-check.format>ALL</maven-dependency-check.format>
<maven-dependency-check.failOnError>true</maven-dependency-check.failOnError>
Expand All @@ -50,34 +51,45 @@
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11.0.2</version>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>11</version>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11.0.2</version>
<version>${javafx.version}</version>
<classifier>win</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11.0.2</version>
<version>${javafx.version}</version>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>${javafx.version}</version>
<classifier>mac-aarch64</classifier>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
Expand Down Expand Up @@ -105,64 +117,32 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<version>3.7.1</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.1.2184</version>
<version>3.11.0.3922</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<finalName>keeptime-${project.version}</finalName>

<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<configuration>
<generateGitPropertiesFile>false</generateGitPropertiesFile>
</configuration>
Expand All @@ -181,7 +161,6 @@
<descriptors>
<descriptor>./assembly.xml</descriptor>
</descriptors>
<finalName>keeptime-${project.version}</finalName>
</configuration>
</execution>
</executions>
Expand All @@ -207,16 +186,15 @@
<suppressionFile>dependency-check-report_suppressions.xml</suppressionFile>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<!-- generate site with mvn site (including dependency check) -->
<reporting>
<plugins>
Expand All @@ -242,4 +220,38 @@
</plugin>
</plugins>
</reporting>
</project>

<profiles>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
6 changes: 5 additions & 1 deletion src/main/java/de/doubleslash/keeptime/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public void init() throws Exception {

model = springContext.getBean(Model.class);
controller = springContext.getBean(Controller.class);
controller.enableAutoSave();
model.setSpringContext(springContext);
}

Expand Down Expand Up @@ -144,6 +145,7 @@ private void initialiseApplication(final Stage primaryStage) throws Exception {
readSettings();

final List<Work> todaysWorkItems = model.getWorkRepository().findByStartDateOrderByStartTimeAsc(LocalDate.now());

LOG.info("Found {} past work items", todaysWorkItems.size());
model.getPastWorkItems().addAll(todaysWorkItems);

Expand Down Expand Up @@ -184,6 +186,7 @@ private void readSettings() {
final List<Settings> settingsList = model.getSettingsRepository().findAll();
final Settings settings;
if (settingsList.isEmpty()) {
LOG.info("Empty settings. Set default");
settings = new Settings();
settings.setTaskBarColor(model.taskBarColor.get());

Expand All @@ -197,6 +200,7 @@ private void readSettings() {
settings.setHideProjectsOnMouseExit(false);
model.getSettingsRepository().save(settings);
} else {
LOG.info("Got settings from database");
settings = settingsList.get(0);
}

Expand Down Expand Up @@ -239,7 +243,7 @@ private void initialisePopupUI(final Stage primaryStage) throws IOException {
final ViewControllerPopup viewControllerPopupController = loader.getController();
viewControllerPopupController.setStage(popupViewStage);

if (!OS.isLinux()) {
if (OS.isWindows()) {
globalScreenListener = new GlobalScreenListener();
globalScreenListener.register(model.useHotkey.get());
globalScreenListener.setViewController(viewControllerPopupController);
Expand Down
Loading
Loading