diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index 5766447..d4c63fa 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -1,23 +1,23 @@ name: "Build and Deploy" on: release: - types: [published,edited] + types: [published, edited] jobs: build: # Set up the OS runs-on: ubuntu-latest env: # Sonatype Credentials & GitHub token - SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}' - SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}' - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + SONATYPE_USERNAME: "${{ secrets.SONATYPE_USERNAME }}" + SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}" + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" # Set environment - ENV: 'prod' - PROJECT_NAME: 'NetworkingModule' + ENV: "prod" + PROJECT_NAME: "NetworkingModule" steps: # Checkout the Code - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Set up git hashes environment variables - name: Git Hashes uses: Im-Fran/git-hashes-action@v1.0.3 @@ -25,14 +25,14 @@ jobs: - name: Version from Tag Action uses: Im-Fran/version-from-tag-action@v1.0.3 with: - remove-first-character: 'v' + remove-first-character: "v" # Set up the JDK - name: Set up JDK 11 uses: actions/setup-java@v3 with: distribution: adopt java-version: 11 - cache: 'gradle' + cache: "gradle" # Make gradle executable - name: Make gradle executable run: chmod +x gradlew @@ -52,7 +52,7 @@ jobs: args: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar application/java-archive # Now we deploy the documents to GitHub pages - name: Deploy Dokka - uses: JamesIves/github-pages-deploy-action@v4.4.1 + uses: JamesIves/github-pages-deploy-action@v4.4.3 with: branch: gh-pages folder: build/dokka diff --git a/.github/workflows/gradle-test.yml b/.github/workflows/gradle-test.yml index e2bcf6e..751318f 100644 --- a/.github/workflows/gradle-test.yml +++ b/.github/workflows/gradle-test.yml @@ -7,26 +7,26 @@ jobs: fail-fast: false max-parallel: 4 matrix: - java-version: [11,16,17] + java-version: [11, 16, 17] # Set up OS runs-on: ubuntu-latest # Set up environment variables env: - ENV: 'local' # Set to local, so it won't deploy the jar to the repos + ENV: "local" # Set to local, so it won't deploy the jar to the repos steps: # Checkout code - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Setup java and maven - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v3 with: distribution: adopt java-version: ${{ matrix.java-version }} - cache: 'gradle' + cache: "gradle" # Setup executable gradle - name: Make Gradle executable run: chmod +x gradlew # Test building without dokka - name: Build Jar with Java ${{ matrix.java-version }} - run: ./gradlew clean shadowJar test -x dokkaHtml -no-daemon \ No newline at end of file + run: ./gradlew clean shadowJar test -x dokkaHtml -no-daemon diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 91e75b3..b63fdf3 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -6,5 +6,5 @@ jobs: name: "Validation" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: gradle/wrapper-validation-action@v1 \ No newline at end of file + - uses: actions/checkout@v4 + - uses: gradle/wrapper-validation-action@v1 diff --git a/build.gradle.kts b/build.gradle.kts index fdfa7dc..6993f43 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,18 +4,18 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { `maven-publish` id("io.github.gradle-nexus.publish-plugin") version "1.3.0" - id("com.github.johnrengelman.shadow") version "8.1.0" + id("com.github.johnrengelman.shadow") version "8.1.1" id("cl.franciscosolis.blossom-extended") version "1.3.1" - kotlin("jvm") version "1.8.10" - id("org.jetbrains.dokka") version "1.8.10" + kotlin("jvm") version "1.9.10" + id("org.jetbrains.dokka") version "1.9.0" } val env = project.rootProject.file(".env").let { file -> if(file.exists()) file.readLines().filter { it.isNotBlank() && !it.startsWith("#") && it.split("=").size == 2 }.associate { it.split("=")[0] to it.split("=")[1] } else emptyMap() }.toMutableMap().apply { putAll(System.getenv()) } -val projectVersion = env["VERSION"] ?: "0.2.0-SNAPSHOT" +val projectVersion = env["VERSION"] ?: "0.3.0-SNAPSHOT" group = "xyz.theprogramsrc" version = projectVersion @@ -26,19 +26,22 @@ repositories { mavenCentral() maven("https://s01.oss.sonatype.org/content/groups/public/") + maven("https://oss.sonatype.org/content/repositories/snapshots/") + maven("https://oss.sonatype.org/content/repositories/releases/") maven("https://oss.sonatype.org/content/groups/public/") maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") + maven("https://repo.papermc.io/repository/maven-public/") maven("https://repo.codemc.org/repository/maven-public/") maven("https://jitpack.io/") } dependencies { - compileOnly("xyz.theprogramsrc:simplecoreapi:0.6.2-SNAPSHOT") + compileOnly("xyz.theprogramsrc:simplecoreapi:0.8.0-SNAPSHOT") - compileOnly("org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT") - compileOnly("net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT") + compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT") + compileOnly("net.md-5:bungeecord-api:1.20-R0.2-SNAPSHOT") - testImplementation("org.junit.jupiter:junit-jupiter:5.9.2") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") } diff --git a/src/main/kotlin/xyz/theprogramsrc/networkingmodule/Main.kt b/src/main/kotlin/xyz/theprogramsrc/networkingmodule/Main.kt deleted file mode 100644 index 7e2c6df..0000000 --- a/src/main/kotlin/xyz/theprogramsrc/networkingmodule/Main.kt +++ /dev/null @@ -1,5 +0,0 @@ -package xyz.theprogramsrc.networkingmodule - -import xyz.theprogramsrc.simplecoreapi.global.module.Module - -class Main: Module() \ No newline at end of file diff --git a/src/main/kotlin/xyz/theprogramsrc/networkingmodule/NetworkingModule.kt b/src/main/kotlin/xyz/theprogramsrc/networkingmodule/NetworkingModule.kt new file mode 100644 index 0000000..a663c46 --- /dev/null +++ b/src/main/kotlin/xyz/theprogramsrc/networkingmodule/NetworkingModule.kt @@ -0,0 +1,22 @@ +package xyz.theprogramsrc.networkingmodule + +import xyz.theprogramsrc.simplecoreapi.global.models.module.Module +import xyz.theprogramsrc.simplecoreapi.global.models.module.ModuleDescription + +class NetworkingModule: Module { + + override val description: ModuleDescription = + ModuleDescription( + name = "@name@", + version = "@version@", + authors = listOf("Im-Fran") + ) + + override fun onDisable() { + + } + + override fun onEnable() { + + } +} \ No newline at end of file diff --git a/src/main/resources/module.properties b/src/main/resources/module.properties deleted file mode 100644 index 9ae98a4..0000000 --- a/src/main/resources/module.properties +++ /dev/null @@ -1,6 +0,0 @@ -main=xyz.theprogramsrc.networkingmodule.Main -name=NetworkingModule -description=@description@ -version=@version@ -author=TheProgramSrc -module-id=networkingmodule