Skip to content
This repository was archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
Fixed gradle scripts (#19)
Browse files Browse the repository at this point in the history
Upgraded gradle to 6.6.1

Related to #5

Polished the build file

Closes #15

Upgraded JFoenix to 9.0.10

Related to #5

Minor readme enhancements
  • Loading branch information
agcom authored Sep 17, 2020
1 parent d53ac98 commit a00d50c
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 60 deletions.
58 changes: 30 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Have a look,

## Ingredients

Built on top of [Java](https://en.wikipedia.org/wiki/Java_(programming_language)) language with help of the following awesome tools,
Built on top of [Java virtual machine](https://en.wikipedia.org/wiki/Java_virtual_machine) with help of the following awesome tools,

- [JavaFX](https://openjfx.io/)

Expand All @@ -38,35 +38,37 @@ To get a local copy **up and running** follow these simple steps,

1. Make sure **Java 11** or higher is installed.

> Word *Java* is used as a substitution for *JVM*; Java virtual machine.

2. Clone the repository.

> You can do this either by using the `git` command,
>
> ```sh
> git clone https://github.com/agcom/quad-tree.git
> ```
>
> or downloading and extracting the [project `zip` artifact](https://github.com/agcom/quad-tree/archive/master.zip).
> You can do this either by using the `git` command,
>
> ```sh
> git clone https://github.com/agcom/quad-tree.git
> ```
>
> or downloading and extracting the [project's `zip` artifact](https://github.com/agcom/quad-tree/archive/master.zip).
3. Run the application.
> You need to invoke the gradle `run` task to get the application running.
>
> You can use the pre-made **gradle scripts** even if you don't have the required gradle bundle installed.
>
> - On Linux,
>
> ```sh
> ./gradlew run
> ```
>
> - On Windows,
>
> ```powershell
> ./gradlew.bat run
> ```
>
> For more information on running batch files on Windows visit this [tutorial](https://www.wikihow.com/Run-a-Batch-File-from-the-Command-Line-on-Windows).
> You need to invoke the gradle `run` task to get the application running.
>
> You can use the pre-made **gradle scripts** even if you don't have the required gradle bundle installed.
>
> - On Linux,
>
> ```sh
> ./gradlew run
> ```
>
> - On Windows,
>
> ```powershell
> ./gradlew.bat run
> ```
>
> For more information on running batch files on Windows visit this [tutorial](https://www.wikihow.com/Run-a-Batch-File-from-the-Command-Line-on-Windows).
## Usage
Expand Down Expand Up @@ -96,15 +98,15 @@ Let's review the application's interesting features,
> This may seem strange, but trust me, it's a cool feature!
>
> Check the *eraser* box and click/drag the cursor on top of some points. This is where the magic happens! Division redo!
> Check the *eraser* box and click/drag the cursor on top of some points. This is where the magic happens! Division undo!
- Adjust the input processing delays
> Being eager isn't always the best option.
>
> Delays are necessary to guarantee a lag free experience!
>
> If you're feeling **lags**, try increasing the delays, most importantly the *draw delay*.
> If you're feeling **lags**, try increasing the delays, especially the *draw delay*.
- Some cool statistics about your query efficiency!
Expand All @@ -124,7 +126,7 @@ If you've gone far, share your code with us. **Pull requests** are appreciated.
## Contact us
Got questions? Two ways just for you.
Got questions? Two ways, just for you.
- Create an issue with the ![question-lable](https://img.shields.io/github/labels/agcom/quad-tree/question?style=flat-square) label.
- Directly contact the [project owner](https://github.com/agcom).
26 changes: 16 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
plugins {
id 'application'
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.jetbrains.kotlin.jvm' version "$kotlin_version"
id 'org.openjfx.javafxplugin' version "$javafx_plugin_version"
}

group 'ir.agcom'
version '0.1'
group = 'ir.agcom'
version = '1.0.0'

mainClassName = 'Launcher'
sourceCompatibility = 11
application {
mainClass = 'Launcher'
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'io.reactivex.rxjava2:rxjavafx:2.2.2'
implementation 'io.reactivex.rxjava2:rxjava:2.2.17'
implementation 'com.jfoenix:jfoenix:9.0.8'
implementation "io.reactivex.rxjava2:rxjavafx:$rxjavafx_version"
implementation "io.reactivex.rxjava2:rxjava:$rxjava_version"
implementation "com.jfoenix:jfoenix:$jfoenix_version"
}

javafx {
version = '11'
version = "$javafx_version"
modules = ['javafx.controls', 'javafx.fxml', 'javafx.base', 'javafx.graphics', 'javafx.swing']
}

Expand Down
8 changes: 7 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
kotlin.code.style=official
kotlin.code.style = official
kotlin_version = 1.3.61
javafx_plugin_version = 0.0.8
rxjavafx_version = 2.2.2
rxjava_version = 2.2.17
jfoenix_version = 9.0.10
javafx_version = 11
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand Down Expand Up @@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
Expand Down
25 changes: 7 additions & 18 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

Expand All @@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -51,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -61,28 +64,14 @@ echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
rootProject.name = 'quad-tree'

rootProject.name = 'quad-tree'

0 comments on commit a00d50c

Please sign in to comment.