Skip to content

Commit

Permalink
Replaced sbt with gradle as the build system
Browse files Browse the repository at this point in the history
  • Loading branch information
Martomate committed Aug 25, 2024
1 parent fd91642 commit 442135c
Show file tree
Hide file tree
Showing 13 changed files with 480 additions and 90 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,15 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Coursier cache
uses: coursier/cache-action@v6
- name: Setup
uses: coursier/setup-action@v1

- uses: actions/setup-java@v4
with:
jvm: "[email protected]"
- name: Run tests
run: sbt coverage test
shell: bash
- name: Coveralls
run: sbt coverageAggregate coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Clean up cache
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
shell: bash
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Build
run: ./gradlew build

- name: Test
run: ./gradlew check
70 changes: 0 additions & 70 deletions .github/workflows/release.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
.idea/**/gradle.xml
.idea/**/libraries

.gradle
**/build/
!src/**/build/
gradle-app.setting
!gradle-wrapper.jar
!gradle-wrapper.properties
.gradletasknamecache

# CMake
cmake-build-debug/

Expand Down
45 changes: 45 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
plugins {
scala
application
id("org.openjfx.javafxplugin") version "0.1.0"
id("org.beryx.runtime") version "1.13.1"
}

application {
mainClass = "tripaint.TriPaint"
}

runtime {
options = listOf("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages")
launcher {
noConsole = true
}

jpackage {
installerName = "tripaint"
imageName = "TriPaint"
imageOptions.addAll(listOf("--icon", "src/main/resources/icon.icns"))
}
}

javafx {
version = "22.0.2"
modules(
"javafx.base",
"javafx.controls",
"javafx.graphics",
"javafx.media",
"javafx.swing",
)
}

dependencies {
implementation(project(":tripaint-ui"))
implementation(project(":tripaint-core"))

implementation("org.scala-lang:scala3-library_3:3.4.2")
testImplementation("org.scalameta:munit_3:1.0.0")
testImplementation("org.scalatestplus:mockito-4-5_3:3.2.12.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
testRuntimeOnly("org.junit.platform:junit-platform-runner")
}
Binary file added app/src/main/resources/icon.icns
Binary file not shown.
27 changes: 27 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
plugins {
scala
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

allprojects {
repositories {
mavenCentral()
}

group = "tripaint"
version = "1.3.4"
}

dependencies {
implementation("org.scala-lang:scala3-library_3:3.4.2")
testImplementation("org.scalameta:munit_3:1.0.0")
testImplementation("org.scalatestplus:mockito-4-5_3:3.2.12.0")

testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
testRuntimeOnly("org.junit.platform:junit-platform-runner")
}
11 changes: 11 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugins {
scala
}

dependencies {
implementation("org.scala-lang:scala3-library_3:3.4.2")
testImplementation("org.scalameta:munit_3:1.0.0")
testImplementation("org.scalatestplus:mockito-4-5_3:3.2.12.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
testRuntimeOnly("org.junit.platform:junit-platform-runner")
}
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 442135c

Please sign in to comment.