diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index 52bf30c..d2df7bf 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -7,22 +7,23 @@ jobs: # Set up the OS runs-on: ubuntu-latest env: - # Nexus credentials and GitHub token - NEXUS_USERNAME: '${{ secrets.NEXUS_USERNAME }}' - NEXUS_PASSWORD: '${{ secrets.NEXUS_PASSWORD }}' + # Sonatype Credentials & GitHub token + SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}' + SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}' GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' # Set environment - env: 'prod' + ENV: 'prod' + PROJECT_NAME: 'LoggingModule' 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.0 + uses: Im-Fran/git-hashes-action@v1.0.3 # Set up version from tag environment variables - name: Version from Tag Action - uses: Im-Fran/version-from-tag-action@v1.0.1 + uses: Im-Fran/version-from-tag-action@v1.0.3 with: remove-first-character: 'v' # Set up the JDK @@ -31,22 +32,30 @@ jobs: with: distribution: adopt java-version: 11 + cache: 'gradle' # Make gradle executable - name: Make gradle executable run: chmod +x gradlew # Clean, Test, Publish and Build (in that order to save the artifact to the action) - name: Test, Deploy and Build with Gradle - run: ./gradlew clean test publish shadow dokkaHtml + run: ./gradlew clean test shadowJar dokkaHtml publish publishToSonatype closeAndReleaseSonatypeStagingRepository -no-daemon # Now we store the artifact in the action - name: Upload the artifact uses: actions/upload-artifact@v3 with: - name: LoggingModule - path: ./build/libs/LoggingModule-${{ env.VERSION }}.jar + name: ${{ env.PROJECT_NAME }} + path: ./build/libs/${{ env.PROJECT_NAME }}-${{ env.VERSION }}.jar + # Here we upload the binary to the release + - name: Upload to release + uses: JasonEtco/upload-to-release@master + with: + 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.3.3 + uses: JamesIves/github-pages-deploy-action@v4.4.3 with: branch: gh-pages folder: build/dokka - clean: true \ No newline at end of file + clean: true + clean-exclude: | + CNAME diff --git a/.github/workflows/gradle-test.yml b/.github/workflows/gradle-test.yml index f9e1e13..751318f 100644 --- a/.github/workflows/gradle-test.yml +++ b/.github/workflows/gradle-test.yml @@ -1,31 +1,32 @@ name: "Test" # Only execute this workflow when a PR is opened or when something is pushed to the master branch -on: [push, pull_request] +on: [pull_request] jobs: testBuilds: strategy: 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 - # Setup java and maven - - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: ${{ matrix.java-version }} - # 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 publish shadow -x dokkaHtml \ No newline at end of file + # Checkout code + - name: Checkout Code + 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" + # 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 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/CHANGELOG.md b/CHANGELOG.md index 6d7cd9c..51a0e4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## v0.3.1 - Snapshot +* Fix module.properties file +* Update README.md + +## v0.3.0 - Snapshot +* Updated to gradle kotlin dsl +* Added sonatype +* Updated dependencies +* Updated workflows +* Added JitPack + ## v0.2.2 - Snapshot * Added `Logger#debug` method * Added `Logger#severe(String, Exception)` method diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f9adeb --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +[![](https://jitci.com/gh/TheProgramSrc/SimpleCore-LoggingModule/svg)](https://jitci.com/gh/TheProgramSrc/SimpleCore-LoggingModule) +[![](https://jitpack.io/v/TheProgramSrc/SimpleCore-LoggingModule.svg)](https://jitpack.io/#TheProgramSrc/SimpleCore-LoggingModule) +[![](https://img.shields.io/nexus/s/xyz.theprogramsrc/loggingmodule?server=https%3A%2F%2Fs01.oss.sonatype.org)]() + + +# SimpleCore-LoggingModule +Just a logger for the SimpleCore API + +# Documentation +* [Wiki](https://github.com/TheProgramSrc/SimpleCore-LoggingModule/wiki) +* [JavaDocs](https://docs.theprogramsrc.xyz/SimpleCore-LoggingModule/) \ No newline at end of file diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 98ec37a..0000000 --- a/build.gradle +++ /dev/null @@ -1,116 +0,0 @@ -plugins { - id 'org.jetbrains.kotlin.jvm' version '1.7.0' - id 'maven-publish' - id 'com.github.johnrengelman.shadow' version '7.1.2' - id 'net.kyori.blossom' version '1.2.0' - id 'org.jetbrains.dokka' version '1.6.21' -} - -def projectVersion = (System.getenv("VERSION") ?: '0.2.2-SNAPSHOT').replaceFirst("v", "").replace('/', '') - -group 'xyz.theprogramsrc' -version projectVersion -description 'Just a logger for the SimpleCore API' - -repositories { - mavenLocal() - mavenCentral() - - maven { url 'https://repo.theprogramsrc.xyz/repository/maven-public/' } - maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } - maven { url 'https://oss.sonatype.org/content/repositories/releases/' } - maven { url 'https://oss.sonatype.org/content/groups/public/' } - maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } - maven { url 'https://repo.codemc.org/repository/maven-public/' } - maven { url 'https://jitpack.io/' } -} - -dependencies { - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.7.0' - compileOnly 'xyz.theprogramsrc:simplecoreapi:0.4.0-SNAPSHOT' - - compileOnly 'org.apache.logging.log4j:log4j-api:2.17.2' - compileOnly 'org.apache.logging.log4j:log4j-core:2.17.2' - - testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2' -} - -shadowJar { - mergeServiceFiles() - exclude('**/*.kotlin_metadata') - exclude('**/*.kotlin_builtins') - - archiveBaseName.set('LoggingModule') - archiveClassifier.set('') -} - -test { - useJUnitPlatform() -} - -java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - withSourcesJar() -} - -blossom { - replaceToken '@name@', rootProject.name - replaceToken '@version@', project.version.toString() - replaceToken '@description@', project.description - replaceToken '@git_short@', System.getenv("GIT_COMMIT_SHORT_HASH") ?: "unknown" - replaceToken '@git_full@', System.getenv("GIT_COMMIT_LONG_HASH") ?: "unknown" -} - -tasks.withType(JavaCompile) { - options.encoding = 'UTF-8' -} - -tasks.withType(Copy) { - duplicatesStrategy = DuplicatesStrategy.EXCLUDE -} - -tasks.withType(Jar) { - duplicatesStrategy = DuplicatesStrategy.EXCLUDE -} - -configurations { - testImplementation { - extendsFrom(compileOnly) - } -} - -tasks.named("dokkaHtml") { - outputDirectory.set(file(project.buildDir.absolutePath + '/dokka')) -} - -publishing { - repositories { - if(System.getenv('env') == 'prod'){ - maven { - name = 'TheProgramSrcRepository' - credentials.username = System.getenv('NEXUS_USERNAME') - credentials.password = System.getenv('NEXUS_PASSWORD') - url = uri("https://repo.theprogramsrc.xyz/repository/simplecoreapi-modules/") - } - }else{ - mavenLocal() - } - } - publications { - mavenKotlin(MavenPublication) { publication -> - artifactId = 'loggingmodule' - - from components.java - - pom.withXml { - asNode().appendNode('packaging', 'jar') - if(asNode().get('dependencies')[0] != null){ - asNode().remove(asNode().get('dependencies')[0]) - } - } - } - } -} - -publish.dependsOn clean, test, jar, shadowJar \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..1ce4111 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,193 @@ +import com.github.jengelman.gradle.plugins.shadow.ShadowExtension +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.1" + id("cl.franciscosolis.blossom-extended") version "1.3.1" + + kotlin("jvm") version "1.9.10" + id("org.jetbrains.dokka") version "1.9.10" +} + +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.4.1-SNAPSHOT" + +group = "xyz.theprogramsrc" +version = projectVersion +description = "Just a logger for the SimpleCore API" + +repositories { + mavenLocal() + 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.8.0-SNAPSHOT") + + implementation("org.apache.logging.log4j:log4j-api:2.21.0") + implementation("org.apache.logging.log4j:log4j-core:2.21.0") + + testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") +} + +blossom { + replaceToken("@name@", rootProject.name) + replaceToken("@version@", project.version.toString()) + replaceToken("@description@", project.description) + replaceToken("@git_short@", env["GIT_COMMIT_SHORT_HASH"] ?: "unknown") + replaceToken("@git_full@", env["GIT_COMMIT_LONG_HASH"] ?: "unknown") +} + +tasks { + named("shadowJar") { + mergeServiceFiles() + exclude("**/*.kotlin_metadata") + exclude("**/*.kotlin_builtins") + + archiveBaseName.set(rootProject.name) + archiveClassifier.set("") + } + + test { + useJUnitPlatform() + } + + java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + withSourcesJar() + withJavadocJar() + } + + compileKotlin { + kotlinOptions { + jvmTarget = "11" + } + } + + compileTestKotlin { + kotlinOptions { + jvmTarget = "11" + } + } + + compileJava { + options.encoding = "UTF-8" + } + + jar { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + } + + copy { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + } + + dokkaHtml { + outputDirectory.set(layout.buildDirectory.dir("dokka/")) + } +} + +configurations { + testImplementation { + extendsFrom(configurations.compileOnly.get()) + } +} + +val dokkaJavadocJar by tasks.register("dokkaJavadocJar") { + dependsOn(tasks.dokkaJavadoc, tasks.dokkaHtml) + from(tasks.dokkaJavadoc.flatMap { it.outputDirectory }) + archiveClassifier.set("javadoc") +} + +publishing { + repositories { + if (env["ENV"] == "prod") { + if (env.containsKey("GITHUB_ACTOR") && env.containsKey("GITHUB_TOKEN")) { + maven { + name = "GithubPackages" + url = uri("https://maven.pkg.github.com/TheProgramSrc/SimpleCore-${rootProject.name}") + credentials { + username = env["GITHUB_ACTOR"] + password = env["GITHUB_TOKEN"] + } + } + } + } else { + mavenLocal() + } + } + + publications { + create("shadow") { + project.extensions.configure { + artifactId = rootProject.name.lowercase() + + component(this@create) + artifact(dokkaJavadocJar) + artifact(tasks.kotlinSourcesJar) + + pom { + name.set(rootProject.name) + description.set(project.description) + url.set("https://github.com/TheProgramSrc/SimpleCore-${rootProject.name}") + + licenses { + license { + name.set("GNU GPL v3") + url.set("https://github.com/TheProgramSrc/SimpleCore-${rootProject.name}/blob/master/LICENSE") + } + } + + developers { + developer { + id.set("ImFran") + name.set("Francisco Solis") + email.set("imfran@duck.com") + } + } + + scm { + url.set("https://github.com/TheProgramSrc/SimpleCore-${rootProject.name}") + } + } + } + } + } +} + +if(env["ENV"] == "prod") { + nexusPublishing { + repositories { + sonatype { + nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) + snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) + + username.set(env["SONATYPE_USERNAME"]) + password.set(env["SONATYPE_PASSWORD"]) + } + } + } +} + +tasks.withType { + dependsOn(tasks.test, tasks.kotlinSourcesJar, dokkaJavadocJar, tasks.jar, tasks.shadowJar) +} + +tasks.withType { + dependsOn(tasks.test, tasks.kotlinSourcesJar, tasks.jar, dokkaJavadocJar, tasks.shadowJar) +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..35d2cc9 --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927..7f93135 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fc..3fa8f86 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +214,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd3..93e3f59 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index cb12792..0000000 --- a/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'LoggingModule' - diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..bd180cc --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "LoggingModule" \ No newline at end of file diff --git a/src/main/kotlin/xyz/theprogramsrc/loggingmodule/Main.kt b/src/main/kotlin/xyz/theprogramsrc/loggingmodule/Main.kt index 8e5d820..6bf9fc0 100644 --- a/src/main/kotlin/xyz/theprogramsrc/loggingmodule/Main.kt +++ b/src/main/kotlin/xyz/theprogramsrc/loggingmodule/Main.kt @@ -1,5 +1,22 @@ package xyz.theprogramsrc.loggingmodule -import xyz.theprogramsrc.simplecoreapi.global.module.Module +import xyz.theprogramsrc.simplecoreapi.global.models.module.Module +import xyz.theprogramsrc.simplecoreapi.global.models.module.ModuleDescription -class Main: Module() \ No newline at end of file +class FilesModule: Module { + + override val description: ModuleDescription = + ModuleDescription( + name = "@name@", + version = "@version@", + authors = listOf("Im-Fran") + ) + + override fun onEnable() { + // Do nothing + } + + override fun onDisable() { + // Do nothing + } +} \ No newline at end of file diff --git a/src/main/kotlin/xyz/theprogramsrc/loggingmodule/filter/LogFilter.kt b/src/main/kotlin/xyz/theprogramsrc/loggingmodule/filter/LogFilter.kt index 2f5c715..ea9cf31 100644 --- a/src/main/kotlin/xyz/theprogramsrc/loggingmodule/filter/LogFilter.kt +++ b/src/main/kotlin/xyz/theprogramsrc/loggingmodule/filter/LogFilter.kt @@ -14,7 +14,7 @@ import org.apache.logging.log4j.message.Message * @param result The result to use if the filter matches * @param filteredStrings The strings that a message must contain to be filtered */ -open class LogFilter(val result: FilterResult = FilterResult.NEUTRAL, val filteredStrings: Array): AbstractFilter() { +open class LogFilter(private val result: FilterResult = FilterResult.NEUTRAL, private val filteredStrings: Array): AbstractFilter() { /** * Extra requirements for a string filter to be matched diff --git a/src/main/resources/module.properties b/src/main/resources/module.properties deleted file mode 100644 index 7678ff7..0000000 --- a/src/main/resources/module.properties +++ /dev/null @@ -1,6 +0,0 @@ -main=xyz.theprogramsrc.loggingmodule.Main -name=LoggingModule -description=@description@ -version=@version@ -author=TheProgramSrc -repository-id=loggingmodule