Skip to content

Commit

Permalink
Merge pull request #44 from Ultraviolet-Ninja/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Ultraviolet-Ninja authored Dec 20, 2022
2 parents a1f2739 + da328af commit 9d0c4cd
Show file tree
Hide file tree
Showing 275 changed files with 1,405 additions and 772 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
jacoco:
docker:
# specify the version you desire here
- image: cimg/openjdk:17.0.1
- image: cimg/openjdk:17.0.2

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
path: ./build/reports
pitest:
docker:
- image: cimg/openjdk:17.0.1
- image: cimg/openjdk:17.0.2
parallelism: 6
resource_class: large

Expand Down
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
allow:
- dependency-name: "com.opencsv:opencsv"
- dependency-name: "org.javatuples:javatuples"
- dependency-name: "org.jgrapht:jgrapht-ext"
- dependency-name: "org.jetbrains:annotations"
- dependency-name: "org.testng:testng"
- dependency-name: "org.slf4j:slf4j-api"
- dependency-name: "org.slf4j:slf4j-simple"
- dependency-name: "nl.jqno.equalsverifier:equalsverifier"
ignore:
- dependency-name: "com.jfoenix:jfoenix"
- dependency-name: "io.github.palexdev:materialfx"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
allow:
- dependency-type: "all"
60 changes: 60 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "CodeQL"

on:
push:
branches: [ "dev" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "dev" ]
schedule:
- cron: '30 10 * * 1'

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', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
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.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
check-latest: true

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
48 changes: 0 additions & 48 deletions .github/workflows/gradle.yml

This file was deleted.

112 changes: 112 additions & 0 deletions .github/workflows/publish_executables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Publishing Executable files using Gradle

on:
push:
branches:
- main

jobs:
windows-pipeline:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
check-latest: true

- name: Grant execute permission for gradlew
run: chmod +x gradlew

# - name: Build with Gradle
# run: ./gradlew build

- name: Creating the Executable
run: ./gradlew jpackageImage

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
#
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
#
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: Docker Build and Push
# id: docker_build
# run: ./gradlew dockerPushDockerHub

- name: Upload Releases
run: ./gradlew releaseToGitHub -PauthToken=${{ secrets.GITHUB_TOKEN }}

linux-pipeline:

runs-on: ubuntu-latest
needs: windows-pipeline

steps:
- uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
check-latest: true

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

# - name: Linking Dependencies with Gradle
# run: ./gradlew jlink

# - name: Packaging with Gradle
# run: ./gradlew jpackage

# - name: Auto-Upload Releases
# run: ./gradlew releaseToGitHub -PauthToken=${{ secrets.GITHUB_TOKEN }}

mac-pipeline:

runs-on: macos-latest
needs: linux-pipeline

steps:
- uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'
check-latest: true

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

# - name: Linking Dependencies with Gradle
# run: ./gradlew jlink

# - name: Packaging with Gradle
# run: ./gradlew jpackage

# - name: Auto-Upload Releases
# run: ./gradlew releaseToGitHub -PauthToken=${{ secrets.GITHUB_TOKEN }}
4 changes: 0 additions & 4 deletions .lgtm.yml

This file was deleted.

6 changes: 0 additions & 6 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion Learned.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Another thing we talked about while he was on the project was moving back to Jav
- Using the build.gradle file to organize dependencies and plugins, facilitate testing, set up distributions in zip and tar files, and releases for GitHub.
- Making custom tasks and using parameters for CI pipelines to test certain parts of the code.
- Automating tests with CircleCI using this [video](https://www.youtube.com/watch?v=9PgZCJNzY9M) as a guide.
- Coming across [LGTM](https://lgtm.com/) and taking advantage of its code quality checking for flaws in my Java code.
- Coming across ~~LGTM~~ (when it was still around) and taking advantage of its code quality checking for flaws in my Java code.
## Graphs and their Algorithms
- Creating graphs by looking up the concept or using the JGraphT library.
- Making use of Dijkstra's Shortest Path and A* to solve different problems.
Expand Down
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
*101 modules, 100 minutes, exponentially more problems.*

[![CircleCI](https://circleci.com/gh/Ultraviolet-Ninja/GradleCenturion/tree/main.svg?style=shield)](https://circleci.com/gh/Ultraviolet-Ninja/GradleCenturion/tree/main)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/Ultraviolet-Ninja/GradleCenturion.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Ultraviolet-Ninja/GradleCenturion/context:java)
![Project Version](https://img.shields.io/badge/version-0.22.0-blueviolet)
![Project Version](https://img.shields.io/badge/version-0.22.3-blueviolet)

## Intro
This project is designed to solve all puzzles found on the Centurion Bomb from Keep Talking and Nobody Explodes, which is a combination of many community-made puzzles and some from the base game set in different languages.<br>

This is a huge project for one man to tackle, but I've [learned a lot](Learned.md) from the challenges I've faced.

## Technologies
- Java 16
- Java 17
- Gradle 7.4
### Plugins
- JavaFX
Expand All @@ -22,26 +21,22 @@ This is a huge project for one man to tackle, but I've [learned a lot](Learned.m
- JFoenix ver. 9.0.4
- JavaTuple ver. 1.2
- JGraphT ver. 1.5.1
- OpenCSV ver. 5.5.2
- OpenCSV ver. 5.7.1
### Other Technologies
- Circle CI
- LGTM Code Quality
- CodeMR Free Trial

## Status - In progress
See the running list of modules [here](Progress.md)

## How to run the program
*Disclaimer:* Make sure you have Java [16](https://www.oracle.com/java/technologies/javase/jdk16-archive-downloads.html) or [17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
and the JAVA_HOME is set.
1. Grab the latest .zip/tar of the GradleCenturion-X.X.X and unzip it
2. Using the command line, navigate to the unzipped directory
3. Run the command
- Windows: `gradlew run`
- Linux: `./gradlew run`
*Disclaimer*: This is referring to program versions `0.22.2` onward
- The `source code` option of the [Release Page](https://github.com/Ultraviolet-Ninja/GradleCenturion/releases) contains an executable, a Windows batch file and all the necessary jar files to run the program
- The `Gradle-Centurion-[VERSION]-[OPERATING SYSTEM]` contains a OS-specific executable file with a runtime environment for the program to run in
- *Only supports Windows currently*

## Inspiration
After my first manual turning out to be successful in solving the main-game bombs, I thought "Why stop there?".
After my first manual turning out to be successful in solving the main-game bombs, I thought "*Why stop there?*".
I started creating this project working on the auto-solver for the vanilla game, which was, by comparison, much easier.

### Example Bomb
Expand Down
Loading

0 comments on commit 9d0c4cd

Please sign in to comment.