Skip to content

Commit

Permalink
Merge branch 'master' into renovate/gradle-8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Fran authored Oct 5, 2023
2 parents eb94361 + 7c0588a commit 3f721e5
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 36 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
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/[email protected]
# Set up version from tag environment variables
- name: Version from Tag Action
uses: Im-Fran/[email protected]
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
Expand All @@ -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/[email protected].1
uses: JamesIves/[email protected].3
with:
branch: gh-pages
folder: build/dokka
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gradle-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
run: ./gradlew clean shadowJar test -x dokkaHtml -no-daemon
4 changes: 2 additions & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ jobs:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
19 changes: 11 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
}


Expand Down
5 changes: 0 additions & 5 deletions src/main/kotlin/xyz/theprogramsrc/networkingmodule/Main.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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() {

}
}
6 changes: 0 additions & 6 deletions src/main/resources/module.properties

This file was deleted.

0 comments on commit 3f721e5

Please sign in to comment.