From f78d1a7aeb686cbbbc58face552ac95e0f7df8ca Mon Sep 17 00:00:00 2001 From: Soren Date: Fri, 18 Sep 2020 11:51:04 -0700 Subject: [PATCH 1/2] Switch to Mill --- .gitignore | 32 ++++--------------------------- build.sbt | 6 ------ build.sc | 23 ++++++++++++++++++++++ core/src/tf/bug/fancade/Foo.scala | 7 +++++++ project/build.properties | 1 - project/plugins.sbt | 3 --- 6 files changed, 34 insertions(+), 38 deletions(-) delete mode 100644 build.sbt create mode 100644 build.sc create mode 100644 core/src/tf/bug/fancade/Foo.scala delete mode 100644 project/build.properties delete mode 100644 project/plugins.sbt diff --git a/.gitignore b/.gitignore index 66f14f8..d4ff1c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,28 +1,4 @@ - -# Created by https://www.toptal.com/developers/gitignore/api/scala,sbt,metals -# Edit at https://www.toptal.com/developers/gitignore?templates=scala,sbt,metals - -### Metals ### -.metals/ -.bloop/ -project/metals.sbt - -### SBT ### -# Simple Build Tool -# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control - -dist/* -target/ -lib_managed/ -src_managed/ -project/boot/ -project/plugins/project/ -.history -.cache -.lib/ - -### Scala ### -*.class -*.log - -# End of https://www.toptal.com/developers/gitignore/api/scala,sbt,metals +.bloop/* +.metals/* +.vscode/* +out/* diff --git a/build.sbt b/build.sbt deleted file mode 100644 index 965f2d3..0000000 --- a/build.sbt +++ /dev/null @@ -1,6 +0,0 @@ -lazy val core = (project in file("core")).settings( - organization := "tf.bug", - name := "fancade-core", - version := "2.0.0", - scalaVersion := "2.13.3", -) diff --git a/build.sc b/build.sc new file mode 100644 index 0000000..dd1c1fb --- /dev/null +++ b/build.sc @@ -0,0 +1,23 @@ +import mill._, scalalib._, publish._ + +object core extends ScalaModule with PublishModule { + override def scalaVersion = "2.13.3" + + override def artifactName = "fancade-core" + override def publishVersion = "2.0.0" + override def pomSettings = PomSettings( + description = "A library for representing Fancade scripts", + organization = "tf.bug", + url = "https://gitdab.com/s/fancadescala", + licenses = Seq(License.MIT), + versionControl = VersionControl( + browsableRepository = Some("https://gitdab.com/s/fancadescala"), + connection = Some(VersionControlConnection.gitGit("gitdab.com", "s/fancadescala.git")), + developerConnection = Some(VersionControlConnection.gitSsh("ssh.gitdab.com", ":s/fancadescala.git", username = Some("git"))), + tag = None, + ), + developers = Seq( + Developer("sorenbug", "Soren", "https://gitdab.com/s"), + ), + ) +} diff --git a/core/src/tf/bug/fancade/Foo.scala b/core/src/tf/bug/fancade/Foo.scala new file mode 100644 index 0000000..202d6b7 --- /dev/null +++ b/core/src/tf/bug/fancade/Foo.scala @@ -0,0 +1,7 @@ +package tf.bug.fancade + +object Foo { + def main(args: Array[String]): Unit = { + println("hi") + } +} diff --git a/project/build.properties b/project/build.properties deleted file mode 100644 index 302b6be..0000000 --- a/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version = 1.3.13 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt deleted file mode 100644 index 4ff411d..0000000 --- a/project/plugins.sbt +++ /dev/null @@ -1,3 +0,0 @@ -addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.13") -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10") -addSbtPlugin("org.jmotor.sbt" % "sbt-dependency-updates" % "1.2.2") From 23ee3d6822f766aac681b0c213c592b9eec2acf2 Mon Sep 17 00:00:00 2001 From: Soren Date: Fri, 18 Sep 2020 12:01:36 -0700 Subject: [PATCH 2/2] Add relevant plugins --- build.sc | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/build.sc b/build.sc index dd1c1fb..af4294e 100644 --- a/build.sc +++ b/build.sc @@ -1,6 +1,10 @@ import mill._, scalalib._, publish._ -object core extends ScalaModule with PublishModule { +import $ivy.`io.github.davidgregory084::mill-tpolecat:0.1.4` + +import io.github.davidgregory084.TpolecatModule + +object core extends TpolecatModule with PublishModule { override def scalaVersion = "2.13.3" override def artifactName = "fancade-core" @@ -21,3 +25,79 @@ object core extends ScalaModule with PublishModule { ), ) } + +object tagless extends TpolecatModule with PublishModule { + override def scalaVersion = "2.13.3" + + override def artifactName = "fancade-tagless" + override def publishVersion = "2.0.0" + override def pomSettings = PomSettings( + description = "A tagless DSL for building Fancade scripts", + organization = "tf.bug", + url = "https://gitdab.com/s/fancadescala", + licenses = Seq(License.MIT), + versionControl = VersionControl( + browsableRepository = Some("https://gitdab.com/s/fancadescala"), + connection = Some(VersionControlConnection.gitGit("gitdab.com", "s/fancadescala.git")), + developerConnection = Some(VersionControlConnection.gitSsh("ssh.gitdab.com", ":s/fancadescala.git", username = Some("git"))), + tag = None, + ), + developers = Seq( + Developer("sorenbug", "Soren", "https://gitdab.com/s"), + ), + ) + + override def moduleDeps = Seq(core) + + override def scalacPluginIvyDeps = Agg(ivy"org.typelevel:::kind-projector:0.11.0", ivy"com.olegpy::better-monadic-for:0.3.1") +} + +object scodec extends TpolecatModule with PublishModule { + override def scalaVersion = "2.13.3" + + override def artifactName = "fancade-scodec" + override def publishVersion = "2.0.0" + override def pomSettings = PomSettings( + description = "A library for reading and writing the Fancade level format", + organization = "tf.bug", + url = "https://gitdab.com/s/fancadescala", + licenses = Seq(License.MIT), + versionControl = VersionControl( + browsableRepository = Some("https://gitdab.com/s/fancadescala"), + connection = Some(VersionControlConnection.gitGit("gitdab.com", "s/fancadescala.git")), + developerConnection = Some(VersionControlConnection.gitSsh("ssh.gitdab.com", ":s/fancadescala.git", username = Some("git"))), + tag = None, + ), + developers = Seq( + Developer("sorenbug", "Soren", "https://gitdab.com/s"), + ), + ) + + override def moduleDeps = Seq(core) +} + +object recipe extends TpolecatModule with PublishModule { + override def scalaVersion = "2.13.3" + + override def artifactName = "fancade-recipe" + override def publishVersion = "2.0.0" + override def pomSettings = PomSettings( + description = "An application that creates Fancade levels from other data", + organization = "tf.bug", + url = "https://gitdab.com/s/fancadescala", + licenses = Seq(License.MIT), + versionControl = VersionControl( + browsableRepository = Some("https://gitdab.com/s/fancadescala"), + connection = Some(VersionControlConnection.gitGit("gitdab.com", "s/fancadescala.git")), + developerConnection = Some(VersionControlConnection.gitSsh("ssh.gitdab.com", ":s/fancadescala.git", username = Some("git"))), + tag = None, + ), + developers = Seq( + Developer("sorenbug", "Soren", "https://gitdab.com/s"), + ), + ) + + override def moduleDeps = Seq(tagless, scodec) + + override def scalacPluginIvyDeps = Agg(ivy"org.typelevel:::kind-projector:0.11.0", ivy"com.olegpy::better-monadic-for:0.3.1") +}