Skip to content

Commit

Permalink
try basic support for gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
privat committed Jul 7, 2024
1 parent 2a8bb8a commit 7a9df5e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: gradle
on:
push:
braches:
- master
pull_request:
braches:
- master

jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- uses: gradle/gradle-build-action@v2
with:
arguments: check

- uses: gradle/gradle-build-action@v2
with:
arguments: jar

- uses: gradle/gradle-build-action@v2
with:
arguments: shadowJar

- uses: actions/upload-artifact@v4
with:
path: build/libs/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
out
.idea
*.class
.gradle

# Build products
build
Expand Down
40 changes: 40 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
plugins {
id 'application'
id 'java'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

java {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
archivesBaseName = 'rars'
}

repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
var flatlafVersion = "3.4"
implementation( "com.formdev:flatlaf:${flatlafVersion}" )
implementation( "com.formdev:flatlaf:${flatlafVersion}:linux-x86_64@so" )
implementation( "com.formdev:flatlaf:${flatlafVersion}:macos-arm64@dylib" )
implementation( "com.formdev:flatlaf:${flatlafVersion}:macos-x86_64@dylib" )
implementation( "com.formdev:flatlaf:${flatlafVersion}:windows-x86_64@dll" )
}

sourceSets.main {
java.srcDirs = ['src/']
resources.srcDirs = ["src/"]
}

application {
mainClass = 'rars.Launch'
}

jar {
manifest {
attributes 'Main-Class': 'rars.Launch'
}
}

0 comments on commit 7a9df5e

Please sign in to comment.