Skip to content

Commit ac4c028

Browse files
committed
Initial commit
0 parents  commit ac4c028

29 files changed

+1840
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# How to contribute
2+
1. Fork the repository
3+
2. Make any changes inside your fork
4+
3. Create a new Pull Request
5+
4. Click on `compare across forks`
6+
5. Select your fork in the dropdown that says `head repository`
7+
6. Check all the information is correct and then click on the green `Create pull request` button
8+
7. Name your pull request and include a description of what you changed
9+
8. Wait for collaborators to review (they may ask you to change certain things)

.github/FUNDING.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
github: srnyx
2+
patreon: venoxnetwork
3+
open_collective: srnyx
4+
ko_fi: srnyx
5+
liberapay: srnyx
6+
issuehunt: srnyx
7+
otechie: srnyx
8+
custom: 'https://srnyx.com/donate'

.github/ISSUE_TEMPLATE/bug_report.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 🐛 Report a bug
2+
description: Let us know that something clearly doesn't work as expected / described.
3+
labels:
4+
- bug
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Before reporting a bug here, please make sure you search to see if the issue has already been reported.
10+
- type: textarea
11+
attributes:
12+
label: Expected behavior
13+
description: What behavior of the project do you expect?
14+
validations:
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: Actual behavior
19+
description: How does the project actually react?
20+
validations:
21+
required: true
22+
- type: textarea
23+
attributes:
24+
label: Steps to reproduce
25+
description: Can the behavior be reproduced consistently? If yes, how? Please also attach media (screenshots/videos) if they could help to understand the problem.
26+
validations:
27+
required: true
28+
- type: input
29+
id: version
30+
attributes:
31+
label: Version
32+
description: "Unless the problem is a completely different one, please specify the version you're using of the project."
33+
placeholder: "ex: 1.6.4"
34+
validations:
35+
required: false
36+
- type: checkboxes
37+
attributes:
38+
label: Checks
39+
description: "To help us avoid \"solving\" the same problems over and over, please check the following points before submitting:"
40+
options:
41+
- label: I asked in the Discord to see whether this issue is in fact a bug that needs to be fixed.
42+
required: true
43+
- type: textarea
44+
attributes:
45+
label: Anything else
46+
description: |
47+
If you can think of anything else that might help us, there's plenty of room for it here. 😉
48+
validations:
49+
required: false

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 💬 Support
4+
url: https://srnyx.com/discord
5+
about: "If you need help with the plugin or have a question please join the Discord server and ask there."

.github/ISSUE_TEMPLATE/suggestion.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 💡 Make a suggestion
2+
description: Suggest a change on the current behavior, a completely new feature, or something else.
3+
labels:
4+
- enhancement
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: What and How?
9+
description: How should the project behave after the change / what should it do differently than before? If you already have a concrete solution in mind, what does it look like?
10+
validations:
11+
required: true
12+
- type: textarea
13+
attributes:
14+
label: Why?
15+
description: Please tell us a little bit about why you want to change or add something. You can also paste images here.
16+
validations:
17+
required: true
18+
- type: textarea
19+
attributes:
20+
label: Are there alternatives?
21+
description: Maybe we can't implement your suggestion exactly like that. Can you think of alternative approaches that might work as well, or do you currently use other ways that work quite well for you?
22+
validations:
23+
required: true
24+
- type: checkboxes
25+
attributes:
26+
label: Checks
27+
description: "To help us avoid reading the same ideas over and over, please check the following before submitting:"
28+
options:
29+
- label: I have used the search at least once to check if my idea has already been suggested and perhaps already implemented.
30+
required: true
31+
- type: textarea
32+
attributes:
33+
label: Anything else
34+
description: |
35+
If want to add anything else that might help us understand your idea, there's plenty of room for it here. 😉
36+
validations:
37+
required: false

.github/PULL_REQUEST_TEMPLATE.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!--- We recommend getting rid of the comment lines (this is a comment line) -->
2+
## Description
3+
<!--- Describe your changes in detail -->
4+
5+
## Motivation and Context
6+
<!--- Why is this change required? What problem does it solve? -->
7+
<!--- If it fixes an open issue, please link to the issue here (`Fixes #issueid`). -->
8+
9+
## How Has This Been Tested?
10+
<!--- Please describe in detail how you tested your changes. -->
11+
<!--- Include details of your testing environment, and the tests you ran to -->
12+
<!--- see how your change affects other areas of the code, etc. -->
13+
14+
## Media:
15+
<!--- Screenshots/videos, only if applicable/appropriate. -->
16+
17+
## Types of changes
18+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
19+
- [ ] Bug fix (non-breaking change which fixes an issue)
20+
- [ ] New feature (non-breaking change which adds functionality)
21+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
22+
23+
## Checklist:
24+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
25+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
26+
- [ ] My code follows the code style of this project.
27+
- [ ] My change requires a change to the documentation.
28+
- [ ] I have read the **CONTRIBUTING** document.
29+
- [ ] All new and existing tests passed.

.github/SUPPORT.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If you're looking for support with the project, please ask in the Discord server.

.github/workflows/build.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
paths:
8+
- 'gradle/**'
9+
- 'src/**'
10+
- 'build.gradle.kts'
11+
- 'settings.gradle.kts'
12+
- 'gradlew'
13+
- 'gradlew.bat'
14+
workflow_dispatch:
15+
16+
jobs:
17+
build:
18+
uses: srnyx/tools/.github/workflows/build.yml@main
19+
with:
20+
name: "srnyx's Java Utilities"

.github/workflows/build_pr.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build [PR]
2+
on:
3+
pull_request:
4+
paths:
5+
- 'gradle/**'
6+
- 'src/**'
7+
- 'build.gradle.kts'
8+
- 'settings.gradle.kts'
9+
- 'gradlew'
10+
- 'gradlew.bat'
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
uses: srnyx/tools/.github/workflows/build.yml@main
16+
with:
17+
name: "srnyx's Java Utilities"

.github/workflows/publish.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Publish
2+
on:
3+
release:
4+
types:
5+
- released
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
uses: srnyx/tools/.github/workflows/publish.yml@main
11+
secrets: inherit
12+
permissions:
13+
contents: write

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Intellij
2+
.idea/
3+
4+
# Gradle
5+
.gradle/
6+
build/

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 srnyx
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# srnyx's Java Utilities [![Release](https://jitpack.io/v/srnyx/srnyx-java-utilities.svg)](https://jitpack.io/#xyz.srnyx/srnyx-java-utilities)
2+
3+
A general Java utility library for srnyx's projects
4+
5+
### Wiki / Javadocs
6+
7+
- **Wiki:** [github.com/srnyx/srnyx-java-utilities/wiki](https://github.com/srnyx/srnyx-java-utilities/wiki)
8+
- **Javadocs:** [javadoc.jitpack.io/xyz/srnyx/srnyx-java-utilities/latest/javadoc/index.html](https://javadoc.jitpack.io/xyz/srnyx/srnyx-java-utilities/latest/javadoc/index.html)
9+
10+
## Importing
11+
12+
You can import the library using [Jitpack](https://jitpack.io/#xyz.srnyx/srnyx-java-utilities). Make sure to replace `VERSION` with the version you want. You **MUST** use `implementation`.
13+
14+
- **Gradle Kotlin** (`build.gradle.kts`)**:**
15+
```kotlin
16+
// Required plugins
17+
plugins {
18+
java
19+
id("com.github.johnrengelman.shadow") version "8.1.1" // https://github.com/johnrengelman/shadow/releases/latest
20+
}
21+
// Jitpack repository
22+
repositories {
23+
maven("https://jitpack.io")
24+
}
25+
// Lazy Library dependency declaration
26+
dependencies {
27+
implementation("xyz.srnyx", "srnyx-java-utilities", "VERSION")
28+
}
29+
```
30+
- **Gradle Groovy** (`build.gradle`)**:**
31+
```groovy
32+
// Required plugins
33+
plugins {
34+
id 'java'
35+
id 'com.github.johnrengelman.shadow' version '8.1.1' // https://github.com/johnrengelman/shadow/releases/latest
36+
}
37+
// Jitpack repository
38+
repositories {
39+
maven { url = 'https://jitpack.io' }
40+
}
41+
// Lazy Library dependency declaration
42+
dependencies {
43+
implementation 'xyz.srnyx:srnyx-java-utilities:VERSION'
44+
}
45+
```
46+
* **Maven** (`pom.xml`)**:**
47+
* Shade plugin
48+
```xml
49+
<build>
50+
<plugins>
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-shade-plugin</artifactId>
54+
<version>3.4.1</version>
55+
<executions>
56+
<execution>
57+
<phase>package</phase>
58+
<goals>
59+
<goal>shade</goal>
60+
</goals>
61+
</execution>
62+
</executions>
63+
<!-- Exclude META-INF to avoid conflicts (not sure if this is needed) -->
64+
<configuration>
65+
<filters>
66+
<filter>
67+
<artifact>xyz.srnyx:*</artifact>
68+
<excludes>
69+
<exclude>META-INF/*.MF</exclude>
70+
</excludes>
71+
</filter>
72+
</filters>
73+
</configuration>
74+
</plugin>
75+
</plugins>
76+
</build>
77+
```
78+
* Jitpack repository
79+
```xml
80+
<repositories>
81+
<repository>
82+
<id>jitpack</id>
83+
<url>https://jitpack.io</url>
84+
</repository>
85+
</repositories>
86+
```
87+
* Lazy Library dependency declaration
88+
```xml
89+
<dependencies>
90+
<dependency>
91+
<groupId>xyz.srnyx</groupId>
92+
<artifactId>srnyx-java-utilities</artifactId>
93+
<version>VERSION</version>
94+
</dependency>
95+
</dependencies>
96+
```

build.gradle.kts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import xyz.srnyx.gradlegalaxy.data.pom.DeveloperData
2+
import xyz.srnyx.gradlegalaxy.data.pom.LicenseData
3+
import xyz.srnyx.gradlegalaxy.utility.setupJava
4+
import xyz.srnyx.gradlegalaxy.utility.setupPublishing
5+
6+
7+
plugins {
8+
java
9+
id("xyz.srnyx.gradle-galaxy") version "1.1.2"
10+
id("com.github.johnrengelman.shadow") version "8.1.1"
11+
}
12+
13+
repositories.mavenCentral()
14+
dependencies.compileOnly("org.jetbrains:annotations:24.0.1")
15+
16+
setupJava("xyz.srnyx", "0.0.1", "General Java utility library for srnyx's projects", JavaVersion.VERSION_1_8)
17+
setupPublishing(
18+
artifactId = "srnyx-java-utilities",
19+
url = "https://java-utilities.srnyx.com",
20+
licenses = listOf(LicenseData.MIT),
21+
developers = listOf(DeveloperData.srnyx))

gradle/wrapper/gradle-wrapper.jar

60.6 KB
Binary file not shown.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
4+
networkTimeout=10000
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)