Skip to content

Commit

Permalink
Prepare for ContriHUB
Browse files Browse the repository at this point in the history
- Format code
- Update dependencies
- Update README

Signed-off-by: Shashank Verma <shashank.verma2002@gmail.com>
  • Loading branch information
shank03 committed Oct 5, 2023
1 parent 534f1e5 commit fd8ccdc
Show file tree
Hide file tree
Showing 20 changed files with 1,522 additions and 1,485 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Gradle Build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2.8.0
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
cache-overwrite-existing: true

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew build --parallel
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

### Get started
```
git clone https://github.com/Beesechurgers/OffCoder.git
git clone https://github.com/ContriHUB/OffCoder.git
```
- Requires Java 17 ([JDK 17](https://www.oracle.com/in/java/technologies/downloads/#java17))
- Import project in Intellij and you're good to go

## Screenshots of App
Expand Down
28 changes: 12 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.10'
id 'org.openjfx.javafxplugin' version '0.1.0'
}

group 'com.shank'
version '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

ext {
junitVersion = '5.8.2'
maven {
url "https://plugins.gradle.org/m2/"
}
}

tasks.withType(JavaCompile) {
Expand All @@ -25,29 +24,26 @@ application {
}

javafx {
version = '11.0.1'
version = '17'
modules = ['javafx.controls', 'javafx.fxml', 'javafx.web']
}

dependencies {
implementation('org.controlsfx:controlsfx:11.1.0')
implementation('com.dlsc.formsfx:formsfx-core:11.4.2') {
implementation('org.controlsfx:controlsfx:11.1.2')
implementation('com.dlsc.formsfx:formsfx-core:11.6.0') {
exclude(group: 'org.openjfx')
}
implementation('net.synedra:validatorfx:0.2.1') {
implementation('net.synedra:validatorfx:0.4.2') {
exclude(group: 'org.openjfx')
}
implementation('org.kordamp.ikonli:ikonli-javafx:12.2.0')
implementation('org.kordamp.ikonli:ikonli-javafx:12.3.1')
implementation('org.kordamp.bootstrapfx:bootstrapfx-core:0.4.0')
implementation('eu.hansolo:tilesfx:11.48') {
implementation('eu.hansolo:tilesfx:17.1.31') {
exclude(group: 'org.openjfx')
}
implementation('org.apache.httpcomponents:httpclient:4.5.13')
implementation('org.json:json:20210307')
implementation 'org.jsoup:jsoup:1.14.3'

testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
implementation('org.json:json:20230227')
implementation 'org.jsoup:jsoup:1.15.3'
}

test {
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
19 changes: 12 additions & 7 deletions src/main/java/com/shank/offcoder/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,23 @@

public class Launcher extends Application {

// Singleton instance of application
private static Launcher _instance = null;
public Stage mStage = null;
public FXMLLoader mFxmlLoader = null;

// Singleton instance of application
private static Launcher _instance = null;
public Launcher() {
_instance = this;
}

public Launcher() {_instance = this;}
public static Launcher get() {
return _instance;
}

public static Launcher get() {return _instance;}
// MAIN LAUNCHER
public static void main(String[] args) {
launch();
}

/**
* Method that starts main window
Expand Down Expand Up @@ -93,7 +101,4 @@ public void centerWindow(int width, int height) {
mStage.setX((screenBounds.getWidth() - width) / 2);
mStage.setY((screenBounds.getHeight() - height) / 2);
}

// MAIN LAUNCHER
public static void main(String[] args) {launch();}
}
Loading

0 comments on commit fd8ccdc

Please # to comment.