From 33514bffeb6c2f6f98aeec16bd3268e7b3e74c6c Mon Sep 17 00:00:00 2001 From: Badbird-5907 Date: Thu, 26 Aug 2021 19:18:09 -0400 Subject: [PATCH 01/16] fix mentioned ConcurrentModificationException --- src/main/java/net/nuggetmc/tplus/bot/Bot.java | 3 ++- src/main/java/net/nuggetmc/tplus/bot/BotManager.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/nuggetmc/tplus/bot/Bot.java b/src/main/java/net/nuggetmc/tplus/bot/Bot.java index 4c57d3b..8e3c116 100644 --- a/src/main/java/net/nuggetmc/tplus/bot/Bot.java +++ b/src/main/java/net/nuggetmc/tplus/bot/Bot.java @@ -498,7 +498,8 @@ public class Bot extends EntityPlayer { private void dieCheck() { if (removeOnDeath) { - scheduler.runTask(plugin, () -> plugin.getManager().remove(this)); // maybe making this later will fix the concurrentmodificationexception? + //scheduler.runTask(plugin, () -> plugin.getManager().remove(this)); // maybe making this later will fix the concurrentmodificationexception? + plugin.getManager().remove(this); //this should fix the concurrentmodificationexception mentioned above, I used the ConcurrentHashMap.newKeySet to make a "ConcurrentHashSet" scheduler.runTaskLater(plugin, this::setDead, 30); this.removeTab(); diff --git a/src/main/java/net/nuggetmc/tplus/bot/BotManager.java b/src/main/java/net/nuggetmc/tplus/bot/BotManager.java index a3c74b3..5600623 100644 --- a/src/main/java/net/nuggetmc/tplus/bot/BotManager.java +++ b/src/main/java/net/nuggetmc/tplus/bot/BotManager.java @@ -18,6 +18,7 @@ import org.bukkit.util.Vector; import java.text.NumberFormat; import java.util.*; +import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; public class BotManager implements Listener { @@ -30,7 +31,7 @@ public class BotManager implements Listener { public BotManager() { this.agent = new LegacyAgent(this); - this.bots = new HashSet<>(); + this.bots = ConcurrentHashMap.newKeySet(); this.numberFormat = NumberFormat.getInstance(Locale.US); } From 745bfb73190a603abeec395a74638d812cbb8428 Mon Sep 17 00:00:00 2001 From: Badbird-5907 Date: Thu, 26 Aug 2021 19:33:51 -0400 Subject: [PATCH 02/16] check if the world is the nether without checking the name (make this work with worlds that have a custom name) --- .../tplus/bot/agent/legacyagent/LegacyAgent.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/nuggetmc/tplus/bot/agent/legacyagent/LegacyAgent.java b/src/main/java/net/nuggetmc/tplus/bot/agent/legacyagent/LegacyAgent.java index df644a2..eba3835 100644 --- a/src/main/java/net/nuggetmc/tplus/bot/agent/legacyagent/LegacyAgent.java +++ b/src/main/java/net/nuggetmc/tplus/bot/agent/legacyagent/LegacyAgent.java @@ -297,7 +297,7 @@ public class LegacyAgent extends Agent { Material itemType; - if (bot.getBukkitEntity().getWorld().getName().equals("world_nether")) { + if (bot.getBukkitEntity().getWorld().getEnvironment() == World.Environment.NETHER) { itemType = Material.TWISTING_VINES; } else { itemType = Material.WATER_BUCKET; @@ -339,7 +339,7 @@ public class LegacyAgent extends Agent { Material placeType; Sound sound; - if (world.getName().equals("world_nether")) { + if (bot.getBukkitEntity().getWorld().getEnvironment() == World.Environment.NETHER) { itemType = Material.TWISTING_VINES; sound = Sound.BLOCK_WEEPING_VINES_PLACE; placeType = itemType; @@ -934,7 +934,7 @@ public class LegacyAgent extends Agent { Location loc = bot.getLocation(); if (bot.isOnFire()) { - if (!worldName.equals("world_nether")) { + if (bot.getBukkitEntity().getWorld().getEnvironment() != World.Environment.NETHER) { placeWaterDown(bot, world, loc); } } @@ -942,7 +942,7 @@ public class LegacyAgent extends Agent { Material atType = loc.getBlock().getType(); if (atType == Material.FIRE || atType == Material.SOUL_FIRE) { - if (!worldName.equals("world_nether")) { + if (bot.getBukkitEntity().getWorld().getEnvironment() != World.Environment.NETHER) { placeWaterDown(bot, world, loc); world.playSound(loc, Sound.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1, 1); } else { @@ -954,7 +954,7 @@ public class LegacyAgent extends Agent { } if (atType == Material.LAVA) { - if (worldName.equals("world_nether")) { + if (bot.getBukkitEntity().getWorld().getEnvironment() == World.Environment.NETHER) { bot.attemptBlockPlace(loc, Material.COBBLESTONE, false); } else { placeWaterDown(bot, world, loc); @@ -965,7 +965,7 @@ public class LegacyAgent extends Agent { Material headType = head.getBlock().getType(); if (headType == Material.LAVA) { - if (worldName.equals("world_nether")) { + if (bot.getBukkitEntity().getWorld().getEnvironment() == World.Environment.NETHER) { bot.attemptBlockPlace(head, Material.COBBLESTONE, false); } else { placeWaterDown(bot, world, head); @@ -973,7 +973,7 @@ public class LegacyAgent extends Agent { } if (headType == Material.FIRE || headType == Material.SOUL_FIRE) { - if (worldName.equals("world_nether")) { + if (bot.getBukkitEntity().getWorld().getEnvironment() == World.Environment.NETHER) { bot.look(BlockFace.DOWN); bot.punch(); world.playSound(head, Sound.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 1, 1); From 436c718c4848c959edba325ae4f1b85ecd48ef47 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:28:25 +0100 Subject: [PATCH 03/16] automate code scanning + potential building --- .github/workflows/codeql-analysis.yml | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..769a547 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '41 17 * * 6' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 0c40291252c7abd4303b7efbe2fee64424e59659 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:39:35 +0100 Subject: [PATCH 04/16] clean up pom --- pom.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6f00317..b41d23f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - net.nuggetmc TerminatorPlus 3.1-BETA @@ -62,12 +61,20 @@ + + + spigot-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + org.spigotmc spigot 1.16.4-R0.1-SNAPSHOT + provided - \ No newline at end of file + From 3a4daec2ea20b7697638b9868cf7674624353727 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 00:45:07 +0100 Subject: [PATCH 05/16] oop --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b41d23f..ca41839 100644 --- a/pom.xml +++ b/pom.xml @@ -71,8 +71,8 @@ org.spigotmc - spigot - 1.16.4-R0.1-SNAPSHOT + spigot-api + 1.16.5-R0.1-SNAPSHOT provided From 9c69965ee7f52cc0b9655b3d9eca552419c3efba Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 01:05:07 +0100 Subject: [PATCH 06/16] Create build.yml --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9a536b1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Build TerminatorPlus + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 16 + uses: actions/setup-java@v2 + with: + java-version: '16' + distribution: 'adopt' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml From a249f53d6a243e845a6372c0da6a4421bce93214 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 01:46:23 +0100 Subject: [PATCH 07/16] now we talkin --- pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca41839..c6fa560 100644 --- a/pom.xml +++ b/pom.xml @@ -66,12 +66,16 @@ spigot-repo https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + dre-repo + http://erethon.de/repo/ + org.spigotmc - spigot-api + spigot 1.16.5-R0.1-SNAPSHOT provided From dfd2c7f2950cb30752e6b73404d392591eb4b58b Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 01:48:57 +0100 Subject: [PATCH 08/16] switch to https --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c6fa560..d9b22b1 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ dre-repo - http://erethon.de/repo/ + https://erethon.de/repo/ From 2e56f9b7fc25cf2bdbf67cf08c77a1435d2ba5a1 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 01:53:49 +0100 Subject: [PATCH 09/16] remove legacy workflow --- .github/workflows/build.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 9a536b1..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,27 +0,0 @@ -# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created -# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path - -name: Build TerminatorPlus - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 16 - uses: actions/setup-java@v2 - with: - java-version: '16' - distribution: 'adopt' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Build with Maven - run: mvn -B package --file pom.xml From 1ec1c026ff5ab8a7107fc2494d81a602ee00ce80 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 02:10:23 +0100 Subject: [PATCH 10/16] small changes --- pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index d9b22b1..4c201f0 100644 --- a/pom.xml +++ b/pom.xml @@ -17,6 +17,7 @@ org.apache.maven.plugins maven-compiler-plugin + 3.8.1 8 8 @@ -25,7 +26,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.1 + 3.2.4 package @@ -48,9 +49,6 @@ org.apache.maven.plugins maven-jar-plugin 2.3.1 - - D:\Minecraft Server\plugins - @@ -62,10 +60,12 @@ + spigot-repo https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + dre-repo https://erethon.de/repo/ @@ -73,6 +73,7 @@ + org.spigotmc spigot @@ -80,5 +81,4 @@ provided - From 960b8999be8c3e9a7bddc56d5175d8ca0655a43f Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 02:20:48 +0100 Subject: [PATCH 11/16] Autopost artifacts --- .github/workflows/codeql-analysis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 769a547..efea012 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -69,3 +69,6 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.2.4 From dc08361c72decd23abd9ec48df582534a60c6815 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 02:28:50 +0100 Subject: [PATCH 12/16] add path --- .github/workflows/codeql-analysis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index efea012..f41c585 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -72,3 +72,6 @@ jobs: - name: Upload a Build Artifact uses: actions/upload-artifact@v2.2.4 + run: mkdir -p target/ + with: + path: target/ From 48df6280f257d7566588c140b6d7bad7cfcf73c4 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 02:32:01 +0100 Subject: [PATCH 13/16] move run to checkout step --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f41c585..6e1eb6f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -40,6 +40,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + run: mkdir -p target/ # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -72,6 +73,5 @@ jobs: - name: Upload a Build Artifact uses: actions/upload-artifact@v2.2.4 - run: mkdir -p target/ with: path: target/ From f833a0d8909bfa595687a7f52f4ed9c7f31669c3 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 02:35:20 +0100 Subject: [PATCH 14/16] oops --- .github/workflows/codeql-analysis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6e1eb6f..7c5b787 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -40,6 +40,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + + - name: Create directory run: mkdir -p target/ # Initializes the CodeQL tools for scanning. From 94d3decf5b77964c2e9aa611f6a6abbf0823675c Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 10:39:29 +0100 Subject: [PATCH 15/16] update++ --- .github/workflows/codeql-analysis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7c5b787..f326ff8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -41,9 +41,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Create directory - run: mkdir -p target/ - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1 @@ -75,5 +72,7 @@ jobs: - name: Upload a Build Artifact uses: actions/upload-artifact@v2.2.4 + if: success() with: + name: TerminatorPlus path: target/ From d7a46b306057041f7a4d61ff94f407c4dab27636 Mon Sep 17 00:00:00 2001 From: Legit4K <44619264+Legit4K@users.noreply.github.com> Date: Tue, 31 Aug 2021 11:00:00 +0100 Subject: [PATCH 16/16] finalize git devflow --- .github/workflows/codeql-analysis.yml | 78 --------------------------- .github/workflows/dev-analysis.yml | 51 ++++++++++++++++++ 2 files changed, 51 insertions(+), 78 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/dev-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index f326ff8..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,78 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '41 17 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 - - - name: Upload a Build Artifact - uses: actions/upload-artifact@v2.2.4 - if: success() - with: - name: TerminatorPlus - path: target/ diff --git a/.github/workflows/dev-analysis.yml b/.github/workflows/dev-analysis.yml new file mode 100644 index 0000000..b718f63 --- /dev/null +++ b/.github/workflows/dev-analysis.yml @@ -0,0 +1,51 @@ +name: "CodeQL" + +on: [push, pull_request] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Cache local repo + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.2.4 + if: success() + with: + name: TerminatorPlus + path: target/