Skip to content

Commit

Permalink
Now multi-project to also build game jars
Browse files Browse the repository at this point in the history
  • Loading branch information
Ventus218 committed Jul 8, 2024
1 parent 4c41828 commit 78e9f25
Show file tree
Hide file tree
Showing 80 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: |
SGE.jar
*.jar
Documentazione.pdf
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# generated jars (sbt assembly)
SGE.jar
*.jar

# macOS
.DS_Store
Expand Down
10 changes: 10 additions & 0 deletions ExampleGame/src/main/scala/ExampleGame.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import sge.core.*
import sge.swing.*

object ExampleGame extends App:
val e = Engine(
SwingIO.withTitle("ExampleGame").withSize(400, 400).build(),
Storage(),
60
).run(() => Seq())
println("ExampleGame")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 13 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
val scala3Version = "3.4.2"

lazy val root = project
.in(file("."))
lazy val sge = project
.in(file("./ScalaGameEngine"))
.settings(
name := "ScalaGameEngine",
version := "0.1.0-SNAPSHOT",

scalaVersion := scala3Version,

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.18" % Test,

assembly / assemblyOutputPath := file("./SGE.jar")
)

lazy val exampleGame = project
.in(file("./ExampleGame"))
.dependsOn(sge)
.settings(
name := "ExampleGame",
version := "0.1.0-SNAPSHOT",
scalaVersion := scala3Version,
assembly / assemblyOutputPath := file("./ExampleGame.jar"),
assembly / mainClass := Some("ExampleGame")
)

0 comments on commit 78e9f25

Please sign in to comment.