Skip to content

Commit 7c0588a

Browse files
authored
feat: comply with simplecoreapi 0.8.0 (#34)
* Updated some dependencies * Migrated to new module system
1 parent 5e0086f commit 7c0588a

File tree

7 files changed

+50
-36
lines changed

7 files changed

+50
-36
lines changed

.github/workflows/gradle-build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
name: "Build and Deploy"
22
on:
33
release:
4-
types: [published,edited]
4+
types: [published, edited]
55
jobs:
66
build:
77
# Set up the OS
88
runs-on: ubuntu-latest
99
env:
1010
# Sonatype Credentials & GitHub token
11-
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}'
12-
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}'
13-
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
11+
SONATYPE_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
12+
SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
13+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
1414
# Set environment
15-
ENV: 'prod'
16-
PROJECT_NAME: 'NetworkingModule'
15+
ENV: "prod"
16+
PROJECT_NAME: "NetworkingModule"
1717
steps:
1818
# Checkout the Code
1919
- name: Checkout Code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
# Set up git hashes environment variables
2222
- name: Git Hashes
2323
uses: Im-Fran/[email protected]
2424
# Set up version from tag environment variables
2525
- name: Version from Tag Action
2626
uses: Im-Fran/[email protected]
2727
with:
28-
remove-first-character: 'v'
28+
remove-first-character: "v"
2929
# Set up the JDK
3030
- name: Set up JDK 11
3131
uses: actions/setup-java@v3
3232
with:
3333
distribution: adopt
3434
java-version: 11
35-
cache: 'gradle'
35+
cache: "gradle"
3636
# Make gradle executable
3737
- name: Make gradle executable
3838
run: chmod +x gradlew
@@ -52,7 +52,7 @@ jobs:
5252
args: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar application/java-archive
5353
# Now we deploy the documents to GitHub pages
5454
- name: Deploy Dokka
55-
uses: JamesIves/[email protected].1
55+
uses: JamesIves/[email protected].3
5656
with:
5757
branch: gh-pages
5858
folder: build/dokka

.github/workflows/gradle-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ jobs:
77
fail-fast: false
88
max-parallel: 4
99
matrix:
10-
java-version: [11,16,17]
10+
java-version: [11, 16, 17]
1111
# Set up OS
1212
runs-on: ubuntu-latest
1313
# Set up environment variables
1414
env:
15-
ENV: 'local' # Set to local, so it won't deploy the jar to the repos
15+
ENV: "local" # Set to local, so it won't deploy the jar to the repos
1616
steps:
1717
# Checkout code
1818
- name: Checkout Code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020
# Setup java and maven
2121
- name: Set up JDK ${{ matrix.java-version }}
2222
uses: actions/setup-java@v3
2323
with:
2424
distribution: adopt
2525
java-version: ${{ matrix.java-version }}
26-
cache: 'gradle'
26+
cache: "gradle"
2727
# Setup executable gradle
2828
- name: Make Gradle executable
2929
run: chmod +x gradlew
3030
# Test building without dokka
3131
- name: Build Jar with Java ${{ matrix.java-version }}
32-
run: ./gradlew clean shadowJar test -x dokkaHtml -no-daemon
32+
run: ./gradlew clean shadowJar test -x dokkaHtml -no-daemon

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ jobs:
66
name: "Validation"
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- uses: gradle/wrapper-validation-action@v1
9+
- uses: actions/checkout@v4
10+
- uses: gradle/wrapper-validation-action@v1

build.gradle.kts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
44
plugins {
55
`maven-publish`
66
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
7-
id("com.github.johnrengelman.shadow") version "8.1.0"
7+
id("com.github.johnrengelman.shadow") version "8.1.1"
88
id("cl.franciscosolis.blossom-extended") version "1.3.1"
99

10-
kotlin("jvm") version "1.8.10"
11-
id("org.jetbrains.dokka") version "1.8.10"
10+
kotlin("jvm") version "1.9.10"
11+
id("org.jetbrains.dokka") version "1.9.0"
1212
}
1313

1414
val env = project.rootProject.file(".env").let { file ->
1515
if(file.exists()) file.readLines().filter { it.isNotBlank() && !it.startsWith("#") && it.split("=").size == 2 }.associate { it.split("=")[0] to it.split("=")[1] } else emptyMap()
1616
}.toMutableMap().apply { putAll(System.getenv()) }
1717

18-
val projectVersion = env["VERSION"] ?: "0.2.0-SNAPSHOT"
18+
val projectVersion = env["VERSION"] ?: "0.3.0-SNAPSHOT"
1919

2020
group = "xyz.theprogramsrc"
2121
version = projectVersion
@@ -26,19 +26,22 @@ repositories {
2626
mavenCentral()
2727

2828
maven("https://s01.oss.sonatype.org/content/groups/public/")
29+
maven("https://oss.sonatype.org/content/repositories/snapshots/")
30+
maven("https://oss.sonatype.org/content/repositories/releases/")
2931
maven("https://oss.sonatype.org/content/groups/public/")
3032
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
33+
maven("https://repo.papermc.io/repository/maven-public/")
3134
maven("https://repo.codemc.org/repository/maven-public/")
3235
maven("https://jitpack.io/")
3336
}
3437

3538
dependencies {
36-
compileOnly("xyz.theprogramsrc:simplecoreapi:0.6.2-SNAPSHOT")
39+
compileOnly("xyz.theprogramsrc:simplecoreapi:0.8.0-SNAPSHOT")
3740

38-
compileOnly("org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT")
39-
compileOnly("net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT")
41+
compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT")
42+
compileOnly("net.md-5:bungeecord-api:1.20-R0.2-SNAPSHOT")
4043

41-
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
44+
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
4245
}
4346

4447

src/main/kotlin/xyz/theprogramsrc/networkingmodule/Main.kt

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package xyz.theprogramsrc.networkingmodule
2+
3+
import xyz.theprogramsrc.simplecoreapi.global.models.module.Module
4+
import xyz.theprogramsrc.simplecoreapi.global.models.module.ModuleDescription
5+
6+
class NetworkingModule: Module {
7+
8+
override val description: ModuleDescription =
9+
ModuleDescription(
10+
name = "@name@",
11+
version = "@version@",
12+
authors = listOf("Im-Fran")
13+
)
14+
15+
override fun onDisable() {
16+
17+
}
18+
19+
override fun onEnable() {
20+
21+
}
22+
}

src/main/resources/module.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)