Skip to content

Commit

Permalink
Merge the content of internal-openlink, internal-util, `freeze-de…
Browse files Browse the repository at this point in the history
…tector` and `tree-showing` modules under the (#48)

`jpro-utils` module
  • Loading branch information
besidev authored Nov 14, 2024
1 parent 204a544 commit caf5bbc
Show file tree
Hide file tree
Showing 35 changed files with 361 additions and 347 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* Updated **JPro** to version `2024.4.1`. Starting with this release `jpro-webapi` module is pulled from Maven Central
Repository.

#### Features
* Merge the content of `internal-openlink`, `internal-util`, `freeze-detector` and `tree-showing` modules under the
`jpro-utils` module. This module will offer essential tools to enhance the development of **JPro/JavaFX** applications.

----------------------

### 0.4.3 (October 31, 2024)
Expand Down
87 changes: 21 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,27 @@ dependencies {
}
```

## JPro Utils
This library offers essential tools for various functionalities to enhance the development of **JPro/JavaFX** applications.

#### Maven configuration
```xml
<dependency>
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>jpro-utils</artifactId>
<version>0.4.5-SNAPSHOT</version>
</dependency>
</dependency>
```

#### Gradle configuration
```groovy
dependencies {
implementation 'one.jpro.platform:jpro-utils:0.4.5-SNAPSHOT'
}
```

## JPro WebRTC
This library provides an API to use WebRTC in **JPro/JavaFX** applications. This technology allows for the direct
exchange of audio, video, and data between web browsers or devices, facilitating features like video conferencing,
Expand Down Expand Up @@ -416,72 +437,6 @@ dependencies {
}
```

## TreeShowing
#### Motivation
In JavaFX, when a node could be collected - it's often prevented by ongoing animation or background tasks.
For this reason, it's often necessary to stop the animation or background task,
when a node is no longer used.
Internally in JavaFX, the property "treeShowing" is used, to check whether a Node is still used.
But as an end-user, this property is not accessible in their application.
With this project, we want to make the property available to the common JavaFX Developer - allowing them to write
bug-free and leak-free applications.

#### Maven configuration
```xml
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>tree-showing</artifactId>
<version>0.4.5-SNAPSHOT</version>
</dependency>
```

#### Gradle configuration
```groovy
dependencies {
implementation 'one.jpro.platform:tree-showing:0.4.5-SNAPSHOT'
}
```

#### Typical Usage:
```
Timeline myTimeline = new Timeline();
myTimeline.setCycleCount(Timeline.INDEFINITE);
Node node = <MyNode>
treeShowing = TreeShowing.treeShowing(node);
treeShowing.addListener((p,o,showing) -> {
if(showing) {
myTimeline.start();
} else {
myTimeline.stop();
}
});
if(treeShowing.get()) {
myTimeline.start();
}
```

## Freeze Detector
This library allows you to track whether the JavaFX Application Thread is frozen for a given time.
This can be useful for debugging purposes, detecting deadlocks or other optimize performance.

#### Maven configuration
```xml
<dependency>
<dependency>
<groupId>one.jpro.platform</groupId>
<artifactId>freeze-detector</artifactId>
<version>0.4.5-SNAPSHOT</version>
</dependency>
</dependency>
```

#### Gradle configuration
```groovy
dependencies {
implementation 'one.jpro.platform:freeze-detector:0.4.5-SNAPSHOT'
}
```

## Launch the examples
To run the examples, you can use the following commands:

Expand Down
20 changes: 8 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ configure(subprojects.findAll { it.name != 'example' }) {
testImplementation "org.junit.jupiter:junit-jupiter-engine:$JUNIT_VERSION"

testImplementation "one.jpro:jmemorybuddy:$JMEMORYBUDDY_VERSION"
testImplementation "one.jpro.platform.jpms:testfx-junit5:$TESTFX_VERSION"
testImplementation "one.jpro.platform.jpms:testfx-core:$TESTFX_VERSION"
testImplementation "one.jpro.platform.jpms:openjfx-monocle:$MONOCLE_VERSION"
testImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
testImplementation "org.mockito:mockito-junit-jupiter:$MOCKITO_VERSION"
testImplementation "org.hamcrest:hamcrest:$HAMCREST_VERSION"
Expand Down Expand Up @@ -79,12 +82,11 @@ configure(subprojects.findAll { it.name != 'example' }) {
}
}

configure([project("tree-showing"), project("jpro-auth:core"), project("jpro-auth:routing"), project("jpro-file"),
configure([project("jpro-auth:core"), project("jpro-auth:routing"), project("jpro-file"),
project("jpro-image-manager"), project("jpro-mail"), project("jpro-mdfx"), project("jpro-media"),
project("jpro-scenegraph"), project("jpro-session"), project("jpro-sipjs"),
project("jpro-html-scrollpane"), project("freeze-detector"), project("jpro-routing:core"),
project("jpro-routing:dev"), project("jpro-routing:popup"), project("jpro-webrtc"), project("jpro-youtube"),
project("internal:openlink"), project("internal:util")]) {
project("jpro-scenegraph"), project("jpro-session"), project("jpro-sipjs"), project("jpro-utils"),
project("jpro-html-scrollpane"), project("jpro-routing:core"), project("jpro-routing:dev"),
project("jpro-routing:popup"), project("jpro-webrtc"), project("jpro-youtube")]) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'tech.yanand.maven-central-publish'
Expand All @@ -96,13 +98,7 @@ configure([project("tree-showing"), project("jpro-auth:core"), project("jpro-aut
publications {
mavenJava(MavenPublication) {
groupId = 'one.jpro.platform'

if (project.path.startsWith(":internal")) {
artifactId = "jpro-${isParentASubproject ? "${project.parent.name}-${project.name}" : "${project.name}"}"
} else {
artifactId = isParentASubproject ? "${project.parent.name}-${project.name}" : "${project.name}"
}

artifactId = isParentASubproject ? "${project.parent.name}-${project.name}" : "${project.name}"
version = JPRO_PLATFORM_VERSION

// Ensure only one component is included in the publication
Expand Down
10 changes: 0 additions & 10 deletions freeze-detector/src/main/java/module-info.java

This file was deleted.

16 changes: 0 additions & 16 deletions freeze-detector/src/test/java/module-info.java

This file was deleted.

25 changes: 0 additions & 25 deletions internal/openlink/build.gradle

This file was deleted.

14 changes: 0 additions & 14 deletions internal/openlink/src/main/java/module-info.java

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions internal/util/build.gradle

This file was deleted.

11 changes: 0 additions & 11 deletions internal/util/src/main/java/module-info.java

This file was deleted.

2 changes: 1 addition & 1 deletion jpro-auth/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

dependencies {
implementation project(":internal:openlink")
api project(":jpro-utils")
implementation "one.jpro:jpro-webapi:$JPRO_VERSION"
implementation "com.auth0:java-jwt:$AUTH0_JAVAJWT_VERSION"
implementation "one.jpro.platform.jpms:jwks-rsa:$AUTH0_JWKSRSA_VERSION"
Expand Down
2 changes: 1 addition & 1 deletion jpro-auth/core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
requires transitive javafx.controls;
requires transitive org.json;
requires transitive org.slf4j;
requires transitive one.jpro.platform.utils;

requires org.jetbrains.annotations;
requires java.net.http;
requires jpro.webapi;
requires jwks.rsa;
requires com.auth0.jwt;
requires one.jpro.platform.internal.openlink;

opens one.jpro.platform.auth.core;
opens one.jpro.platform.auth.core.authentication;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import one.jpro.platform.auth.core.http.HttpServer;
import one.jpro.platform.auth.core.http.HttpServerException;
import one.jpro.platform.auth.core.http.HttpStatus;
import one.jpro.platform.internal.openlink.OpenLink;
import one.jpro.platform.utils.OpenLink;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
Expand Down
8 changes: 3 additions & 5 deletions jpro-html-scrollpane/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
implementation project(":tree-showing")
api project(":jpro-utils")
implementation "one.jpro:jpro-webapi:$JPRO_VERSION"
implementation "one.jpro:jmemorybuddy:$JMEMORYBUDDY_VERSION"
implementation "org.slf4j:slf4j-api:$SLF4J_API_VERSION"
Expand All @@ -9,10 +9,8 @@ publishing {
publications {
mavenJava(MavenPublication) {
pom {
name = 'JPro Auth Core'
description = 'A module for adding advanced authentication and authorization to JPro/JavaFX ' +
'applications, supporting OAuth 2.0, OpenID Connect, integration with multiple identity ' +
'providers and asynchronous operations for enhanced performance.'
name = 'JPro HTML Scrollpane Skin'
description = 'A module containing a ScrollPane skin for HTML content'
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions jpro-html-scrollpane/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module one.jpro.platform.htmlscrollpane {
requires javafx.controls;
requires transitive one.jpro.platform.utils;
requires jpro.webapi;
requires one.jpro.jmemorybuddy;
requires one.jpro.platform.treeshowing;
requires org.slf4j;

exports one.jpro.platform.htmlscrollpane;
Expand Down
Loading

0 comments on commit caf5bbc

Please sign in to comment.