Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit f6d2498

Browse files
committed
Cleanup project
1 parent e903f99 commit f6d2498

122 files changed

Lines changed: 5110 additions & 4855 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: CI
2-
on: [push]
2+
on: [ push ]
33

44
jobs:
55
build-binaries-unix:
66
strategy:
77
fail-fast: false
88
matrix:
9-
os: [macos-latest, ubuntu-latest]
9+
os: [ macos-latest, ubuntu-latest ]
1010

1111
name: ${{ matrix.os }} build
1212
runs-on: ${{ matrix.os }}
@@ -20,10 +20,10 @@ jobs:
2020
uses: actions/setup-java@v1
2121
with:
2222
java-version: 8
23-
- name: Build native with gradle (Windows)
23+
- name: Build native with gradle
2424
run: "./gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight ultralight-java-native:build"
2525
shell: bash
26-
- name: Build gpu driver native with gradle (Windows)
26+
- name: Build gpu driver native with gradle
2727
run: "./gradlew -PCI=true -Pultralight-java.base.native-binaries-folder=native-binaries/ultralight -Pultralight-java.gpu.native-binaries-folder=native-binaries/ultralight-gpu ultralight-java-gpu-native:build"
2828
shell: bash
2929
- name: Upload artifacts
@@ -68,8 +68,7 @@ jobs:
6868
path: native-binaries/ultralight-gpu/Debug
6969

7070
build-jars:
71-
needs: [build-binaries-unix, build-binaries-windows]
72-
# needs: [build-binaries-windows]
71+
needs: [ build-binaries-unix, build-binaries-windows ]
7372
runs-on: ubuntu-latest # Doesn't matter, but linux tends to be the fastest
7473

7574
name: Build final jars
File renamed without changes.

README.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,47 @@
11
[Ultralight Discord](https://chat.ultralig.ht) | [Ultralight Upstream](https://github.com/Ultralight-ux/Ultralight) |
22
![CI](https://github.com/LabyMod/ultralight-java/workflows/CI/badge.svg)
3+
34
# Ultralight Java
5+
46
###### Java wrapper for the [Ultralight](https://ultralig.ht) web engine
57

68
## Discord Chat
9+
710
Got a question about Ultralight or Ultralight Java? Come chat with us on Discord!
811

912
[**Join the #java channel on the Ultralight Discord!** <img src="artwork/public/discord.svg">](https://chat.ultralig.ht)
1013

1114
# About
15+
1216
Ultralight Java is a complete wrapper over the Ultralight API including the JavaScriptCore API. Ultralight Java allows
1317
you to use the powerful Ultralight engine without leaving the Java platform.
1418

1519
## What is Ultralight?
16-
Ultralight is a lightweight, cross-platform, HTML rendering engine for desktop apps and games. It supports most modern
20+
21+
Ultralight is a lightweight, cross-platform, HTML rendering engine for desktop apps and games. It supports most modern
1722
HTML5 and JavaScript features while still remaining small in binary size and memory usage.
1823

1924
See the [Ultralight Upstream](https://github.com/Ultralight-ux/Ultralight) for more information.
2025

2126
## What makes Ultralight Java different from JCEF or JavaFX WebView?
27+
2228
Other than JCEF and the JavaFX WebView, Ultralight aims to be a lightweight UI engine. While it is capable of displaying
2329
fully fledged websites, it does so without using as much memory and CPU. It is the ideal solution for a simple, HTML
2430
based UI, while staying with the Java platform.
2531

26-
Moreover, the databind API is capable of translating Java objects directly to JavaScript, allowing interop and Java
32+
Moreover, the databind API is capable of translating Java objects directly to JavaScript, allowing interop and Java
2733
calls directly from within your JavaScript code, making integration with the UI even easier.
2834

2935
# Using the library
30-
The library requires the Ultralight SDK, which can be downloaded
36+
37+
The library requires the Ultralight SDK, which can be downloaded
3138
[here](https://github.com/ultralight-ux/Ultralight/blob/master/README.md#getting-the-latest-sdk). The native binaries of
3239
the SDK need to be available at runtime and can be loaded using the provided Java methods.
3340

3441
### Maven
42+
3543
Using the library with maven:
44+
3645
```xml
3746
<dependency>
3847
<groupId>com.labymedia</groupId>
@@ -43,6 +52,7 @@ Using the library with maven:
4352
```
4453

4554
If you need Javascript interop:
55+
4656
```xml
4757
<dependency>
4858
<groupId>com.labymedia</groupId>
@@ -53,6 +63,7 @@ If you need Javascript interop:
5363
```
5464

5565
### Gradle
66+
5667
```kotlin
5768
dependencies {
5869
// Replace with latest version from https://search.maven.org/artifact/com.labymedia/ultralight-java-base
@@ -64,22 +75,26 @@ dependencies {
6475
}
6576
```
6677

67-
The latest version can usually also be found in the
78+
The latest version can usually also be found in the
6879
[VERSION file on the master branch](https://github.com/LabyMod/ultralight-java/blob/master/VERSION).
6980

70-
**You will also need to download the Ultralight SDK and extract the `bin` folder into a directory given to
71-
the Library in order to provide the natives!**
81+
**You will also need to download the Ultralight SDK and extract the `bin` folder into a directory given to the Library
82+
in order to provide the natives!**
7283

7384
See [Examples](https://github.com/LabyMod/ultralight-java/tree/develop/example) for more info.
7485

7586
# Sponsors
87+
7688
[<img src="https://www.yourkit.com/images/yklogo.png"/>](https://www.yourkit.com/)
7789

78-
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications.
79-
YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).
90+
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET
91+
applications. YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/)
92+
, [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/),
93+
and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).
8094

8195
# Licensing
96+
8297
For Ultralight Java [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html) is being used, however, Ultralight itself is
8398
licensed under a custom proprietary license. See
84-
[Ultralight licensing](https://github.com/ultralight-ux/Ultralight/blob/master/README.md#licensing) for further
99+
[Ultralight licensing](https://github.com/ultralight-ux/Ultralight/blob/master/README.md#licensing) for further
85100
information.

artwork/public/discord.svg

Lines changed: 10 additions & 1 deletion
Loading

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
plugins{
1+
plugins {
22
id("java-gradle-plugin")
33
}
44

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
package com.labymedia.gradle.cmake;
22

3-
import javax.annotation.Nonnull;
4-
53
import com.labymedia.gradle.cmake.extension.GradleCMakeExtensionGlobal;
64
import org.gradle.api.Plugin;
75
import org.gradle.api.Project;
86
import org.gradle.api.tasks.Delete;
97

8+
import javax.annotation.Nonnull;
9+
1010
public class GradleCMakePlugin implements Plugin<Project> {
11-
private static GradleCMakePlugin instance;
12-
private GradleCMakeExtensionGlobal cmakeExtension;
11+
private static GradleCMakePlugin instance;
12+
private GradleCMakeExtensionGlobal cmakeExtension;
1313

14-
@Nonnull
15-
public static GradleCMakePlugin getInstance() {
16-
return instance;
17-
}
14+
@Nonnull
15+
public static GradleCMakePlugin getInstance() {
16+
return instance;
17+
}
1818

19-
public GradleCMakePlugin() {
20-
instance = this;
21-
}
19+
public GradleCMakePlugin() {
20+
instance = this;
21+
}
2222

23-
public void apply(@Nonnull Project target) {
24-
this.cmakeExtension = target.getExtensions().create("cmake", GradleCMakeExtensionGlobal.class, target);
25-
target.getTasks().register("clean", Delete.class, delete -> delete.delete(target.getBuildDir()));
26-
}
23+
public void apply(@Nonnull Project target) {
24+
this.cmakeExtension = target.getExtensions().create("cmake", GradleCMakeExtensionGlobal.class, target);
25+
target.getTasks().register("clean", Delete.class, delete -> delete.delete(target.getBuildDir()));
26+
}
2727

28-
public GradleCMakeExtensionGlobal getCMakeExtension() {
29-
return this.cmakeExtension;
30-
}
28+
public GradleCMakeExtensionGlobal getCMakeExtension() {
29+
return this.cmakeExtension;
30+
}
3131
}
Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
package com.labymedia.gradle.cmake;
22

33

4-
import java.io.OutputStream;
54
import org.gradle.api.logging.LogLevel;
65
import org.gradle.api.logging.Logger;
76

8-
public class GradleLogOutputStream extends OutputStream {
9-
private String prefix;
10-
private Logger logger;
11-
private LogLevel level;
12-
private StringBuilder buffer;
7+
import java.io.OutputStream;
138

14-
public GradleLogOutputStream(String prefix, Logger logger, LogLevel level) {
15-
this.prefix = prefix;
16-
this.logger = logger;
17-
this.level = level;
18-
this.buffer = new StringBuilder(1024);
19-
this.buffer.append("[").append(prefix).append("] ");
20-
}
9+
public class GradleLogOutputStream extends OutputStream {
10+
private String prefix;
11+
private Logger logger;
12+
private LogLevel level;
13+
private StringBuilder buffer;
2114

22-
public void write(int b) {
23-
char c = (char)b;
24-
if (c == '\n') {
25-
this.logger.log(this.level, this.buffer.toString());
26-
this.buffer.setLength(0);
27-
this.buffer.append("[").append(this.prefix).append("] ");
28-
} else {
29-
this.buffer.append(c);
15+
public GradleLogOutputStream(String prefix, Logger logger, LogLevel level) {
16+
this.prefix = prefix;
17+
this.logger = logger;
18+
this.level = level;
19+
this.buffer = new StringBuilder(1024);
20+
this.buffer.append("[").append(prefix).append("] ");
3021
}
3122

32-
}
23+
public void write(int b) {
24+
char c = (char) b;
25+
if (c == '\n') {
26+
this.logger.log(this.level, this.buffer.toString());
27+
this.buffer.setLength(0);
28+
this.buffer.append("[").append(this.prefix).append("] ");
29+
} else {
30+
this.buffer.append(c);
31+
}
32+
33+
}
3334
}

0 commit comments

Comments
 (0)