Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.prmr:Solitaire:'
}
dependencies {
implementation("com.github.prmr:Solitaire:")
}
<dependency>
<groupId>com.github.prmr</groupId>
<artifactId>Solitaire</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.prmr" % "Solitaire" % ""
:dependencies [[com.github.prmr/Solitaire ""]]
Implementation of the Solitaire card game with JavaFX
Demonstration application used in the book Introduction to Software Design with Java.
This repository is configured to build automatically in Eclipse with Java 21 and JavaFX 21.
However, when first imported, the project will show a compilation error because the JavaFX dependency is missing.
To add JavaFX:
User Library
under Eclipse -> Window -> Preferences -> Java -> Build Path -> User Libraries -> New
. Name it JavaFX21
and include the jars under the lib
folder from the location where you extracted the JavaFX download.The project should then build properly.
Right-click on the project and select Run As -> Java Application
. Select Solitaire
from the list.
To run the tests, select Run As - > JUnit Test
.
There are also two driver programs, Driver
and CrashTest
, which run the application in headless mode (that is, without the GUI).