From 5307298dae439968ac969c5d5966c88e89ea0ed6 Mon Sep 17 00:00:00 2001 From: Jannik Reimers Date: Tue, 1 Oct 2024 12:57:44 +0200 Subject: [PATCH] Initial commit --- .editorconfig | 12 + .env.example | 7 + .gitattributes | 6 + .github/boring-cyborg.yml | 2 + .github/config.yml | 2 + .github/dependabot.yml | 15 + .github/settings.yml | 2 + .github/workflows/ci.yml | 43 ++ .github/workflows/develop.yml | 40 ++ .github/workflows/root.yml | 43 ++ .gitignore | 116 +++ .idea/.gitignore | 8 + .idea/compiler.xml | 13 + .idea/discord.xml | 6 + .idea/file.template.settings.xml | 8 + .idea/fileTemplates/KordEx Extension.kt | 14 + .idea/git_toolbox_blame.xml | 6 + .idea/git_toolbox_prj.xml | 20 + .idea/jarRepositories.xml | 80 +++ .idea/kotlinc.xml | 6 + .idea/libraries-with-intellij-classes.xml | 65 ++ .idea/markdown.xml | 9 + .idea/misc.xml | 11 + .idea/runConfigurations/Build.xml | 23 + .idea/runConfigurations/Run.xml | 28 + .idea/vcs.xml | 6 + LICENSE | 24 + README.md | 62 ++ build.gradle.kts | 87 +++ detekt.yml | 679 ++++++++++++++++++ gradle.properties | 7 + gradle/libs.versions.toml | 20 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43453 bytes gradle/wrapper/gradle-wrapper.properties | 7 + gradlew | 249 +++++++ gradlew.bat | 92 +++ settings.gradle.kts | 18 + src/main/kotlin/template/App.kt | 40 ++ .../template/extensions/TestExtension.kt | 130 ++++ src/main/resources/logback.groovy | 27 + src/main/resources/logbackCompiler.groovy | 452 ++++++++++++ 41 files changed, 2485 insertions(+) create mode 100644 .editorconfig create mode 100644 .env.example create mode 100644 .gitattributes create mode 100644 .github/boring-cyborg.yml create mode 100644 .github/config.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/settings.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/develop.yml create mode 100644 .github/workflows/root.yml create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/compiler.xml create mode 100644 .idea/discord.xml create mode 100644 .idea/file.template.settings.xml create mode 100644 .idea/fileTemplates/KordEx Extension.kt create mode 100644 .idea/git_toolbox_blame.xml create mode 100644 .idea/git_toolbox_prj.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/kotlinc.xml create mode 100644 .idea/libraries-with-intellij-classes.xml create mode 100644 .idea/markdown.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/runConfigurations/Build.xml create mode 100644 .idea/runConfigurations/Run.xml create mode 100644 .idea/vcs.xml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 build.gradle.kts create mode 100644 detekt.yml create mode 100644 gradle.properties create mode 100644 gradle/libs.versions.toml create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100755 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle.kts create mode 100644 src/main/kotlin/template/App.kt create mode 100644 src/main/kotlin/template/extensions/TestExtension.kt create mode 100644 src/main/resources/logback.groovy create mode 100644 src/main/resources/logbackCompiler.groovy diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..09a36aa --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +insert_final_newline = true +indent_style = tab +trim_trailing_whitespace = true +max_line_length = 120 + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..a77ad0b --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +# THIS IS A TEMPLATE FILE. MAKE A COPY AND RENAME TO `.env` TO USE. + +# https://discord.com/developers +TOKEN=BOT_TOKEN + +# ID of the server to use for testing +TEST_SERVER=123 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..00a51af --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# These are explicitly windows files and should use crlf +*.bat text eol=crlf + diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml new file mode 100644 index 0000000..b6071de --- /dev/null +++ b/.github/boring-cyborg.yml @@ -0,0 +1,2 @@ +# Boring Cyborg: https://probot.github.io/apps/boring-cyborg/ +_extends: ".github" diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 0000000..b3cd5de --- /dev/null +++ b/.github/config.yml @@ -0,0 +1,2 @@ +# to-do: https://probot.github.io/apps/todo/ +_extends: ".github" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e1d211c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +version: 2 +enable-beta-ecosystems: true + +updates: + - package-ecosystem: "gradle" + directory: "/" + + schedule: + interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + + schedule: + interval: "weekly" diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..862a003 --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,2 @@ +# Settings: https://probot.github.io/apps/settings/ +_extends: ".github" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..38d1392 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: Build (CI) + +on: + push: + branches-ignore: + - root + - develop + + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v4 + + with: + java-version: 17 + distribution: temurin + + - name: Gradle (Setup) + uses: gradle/actions/setup-gradle@v4 + + - name: Gradle (Build) + run: "./gradlew build" + + - name: Upload artifacts (Main JAR) + uses: actions/upload-artifact@v4 + + with: + name: Main JAR + path: build/libs/*-all.jar + + - name: Upload artifacts (JARs) + uses: actions/upload-artifact@v4 + + with: + name: JARs + path: build/libs/*.jar diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 0000000..85f8586 --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,40 @@ +name: Build & Publish + +on: + push: + branches: + - develop + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v4 + + with: + java-version: 17 + distribution: temurin + + - name: Gradle (Setup) + uses: gradle/actions/setup-gradle@v4 + + - name: Gradle (Build) + run: "./gradlew build" + + - name: Upload artifacts (Main JAR) + uses: actions/upload-artifact@v4 + + with: + name: Main JAR + path: build/libs/*-all.jar + + - name: Upload artifacts (JARs) + uses: actions/upload-artifact@v4 + + with: + name: JARs + path: build/libs/*.jar diff --git a/.github/workflows/root.yml b/.github/workflows/root.yml new file mode 100644 index 0000000..9346b75 --- /dev/null +++ b/.github/workflows/root.yml @@ -0,0 +1,43 @@ +name: Build & Publish + +on: + push: + branches: + - root + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v4 + + with: + java-version: 17 + distribution: temurin + + - name: Gradle (Setup) + uses: gradle/actions/setup-gradle@v4 + + with: + dependency-graph: generate-and-submit + + - name: Gradle (Build) + run: "./gradlew build" + + - name: Upload artifacts (Main JAR) + uses: actions/upload-artifact@v4 + + with: + name: Main JAR + path: build/libs/*-all.jar + + - name: Upload artifacts (JARs) + uses: actions/upload-artifact@v4 + + with: + name: JARs + path: build/libs/*.jar diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79cf6b4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,116 @@ +# Created by .ignore support plugin (hsz.mobi) +### Kotlin template +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Custom rules + +# Don't ignore Gradle wrapper +!gradle/**/* + +# Local Gradle cache +.gradle + +# Gradle build output folder +build/ +.kotlin/ + +# Data files generated by the bot in testing +data/ + +# Env vars - don't commit this! +.env diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..c074b8e --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/../../../../../../../:\Users\coles\IdeaProjects\kordex\template\.idea/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..ed2ab47 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..cd711a0 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/file.template.settings.xml b/.idea/file.template.settings.xml new file mode 100644 index 0000000..550b607 --- /dev/null +++ b/.idea/file.template.settings.xml @@ -0,0 +1,8 @@ + + + + +