Skip to content

Commit

Permalink
Initial Commit (JavaFX Template)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomarrelli committed Feb 2, 2024
0 parents commit 42b5737
Show file tree
Hide file tree
Showing 36 changed files with 1,858 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto eol=lf
*.[cC][mM][dD] text eol=crlf
*.[bB][aA][tT] text eol=crlf
*.[pP][sS]1 text eol=crlf
33 changes: 33 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on:
push:
tags: '*'
branches-ignore:
- 'autodelivery**'
- 'bump-**'
- 'renovate/**'
paths-ignore:
- 'CHANGELOG.md'
- 'LICENSE'
- 'README.md'
- 'renovate.json'
pull_request:
workflow_dispatch:

jobs:
Build:
if: contains(github.repository, 'sample-javafx-project') && !github.event.repository.fork
strategy:
matrix:
os: [windows, macos, ubuntu]
jvm_version: [17, 18, 19]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: DanySK/[email protected]
- uses: DanySK/[email protected]
with:
java-version: ${{ matrix.jvm_version }}
should-run-codecov: false
should-deploy: false
should-validate-wrapper: ${{ matrix.os == 'ubuntu' && matrix.jvm_version == '17' }}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build

bin/

.idea

.settings
30 changes: 30 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pull_request_rules:
- name: Auto-update with merge if appropriately labeled
conditions:
- label=auto-update-merge
- -draft
- -conflict
actions:
update:
- name: rebase-merge working updates
conditions:
- or: &authors_are_bots
- author=renovate[bot]
- author=dependabot[bot]
- author=renovate[bot]
- label=dependencies
- -draft
- -conflict
actions:
merge:
method: rebase
- name: ask to resolve conflict
conditions:
- conflict
actions:
comment:
message: |
Hi @{{author}}! :wave:
I could not help but notice that this pull request has conflicts. :confounded:
Could you fix it? :wrench:
Thank you! :pray:
63 changes: 63 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
plugins {
// Apply the java plugin to add support for Java
java

// Apply the application plugin to add support for building a CLI application
// You can run your app via task "run": ./gradlew run
application

/*
* Adds tasks to export a runnable jar.
* In order to create it, launch the "shadowJar" task.
* The runnable jar will be found in build/libs/projectname-all.jar
*/
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.danilopianini.gradle-java-qa") version "1.36.0"
}

repositories {
mavenCentral()
}

val javaFXModules = listOf(
"base",
"controls",
"fxml",
"swing",
"graphics"
)

val supportedPlatforms = listOf("linux", "mac", "win") // All required for OOP

dependencies {
// Suppressions for SpotBugs
compileOnly("com.github.spotbugs:spotbugs-annotations:4.8.3")

// Example library: Guava. Add what you need (and remove Guava if you don't use it)
// implementation("com.google.guava:guava:28.1-jre")

// JavaFX: comment out if you do not need them
val javaFxVersion = 15
for (platform in supportedPlatforms) {
for (module in javaFXModules) {
implementation("org.openjfx:javafx-$module:$javaFxVersion:$platform")
}
}

val jUnitVersion = "5.10.1"
// JUnit API and testing engine
testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitVersion")
}

tasks.withType<Test> {
// Enables JUnit 5 Jupiter module
useJUnitPlatform()
}

val main: String by project

application {
// Define the main class for the application
mainClass.set(main)
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main=it.unibo.samplejavafx.App
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 42b5737

Please sign in to comment.