-
Notifications
You must be signed in to change notification settings - Fork 2
Switch build to Mill #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| *~ | ||
| project/target/ | ||
| target/ | ||
| out/ | ||
|
|
||
| .bsp/ | ||
| .vscode/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| //| mill-version: 1.1.5 | ||
| //| mill-jvm-opts: ["-Xss8m"] | ||
| //| mvnDeps: | ||
| //| - com.github.lolgab::mill-mima_mill1:0.2.0 | ||
| package build | ||
|
|
||
| import mill._ | ||
| import mill.scalalib._ | ||
| import mill.scalalib.publish._ | ||
| import mill.scalajslib._ | ||
| import mill.scalanativelib._ | ||
| import com.github.lolgab.mill.mima._ | ||
|
|
||
| val scala3 = "3.3.7" | ||
| val scalaJS = "1.20.2" | ||
| val scalaNative = "0.5.10" | ||
| val upickle = "3.3.0" | ||
| val utest = "0.9.5" | ||
|
|
||
| trait CommonTestModule extends TestModule.Utest { | ||
| def mvnDeps = Seq(mvn"com.lihaoyi::utest::$utest") | ||
| } | ||
|
|
||
| trait CommonMimaModule extends Mima { | ||
| def mimaPreviousVersions: T[Seq[String]] = Seq.empty[String] | ||
|
|
||
| def mimaReportBinaryIssues() = { | ||
| if (this.isInstanceOf[ScalaNativeModule] || this.isInstanceOf[ScalaJSModule]) Task.Command {} | ||
| else super.mimaReportBinaryIssues() | ||
| } | ||
| } | ||
|
|
||
| trait CommonPublishModule extends ScalaModule with PublishModule with CommonMimaModule { | ||
| def scalaVersion = scala3 | ||
| def publishVersion = "0.3.0-SNAPSHOT" | ||
|
|
||
| def pomSettings = PomSettings( | ||
| description = "Spores3 provides abstractions for making closures in Scala safer and more flexible", | ||
| organization = "com.phaller", | ||
| url = "https://github.com/phaller/spores3", | ||
| licenses = Seq(License.`Apache-2.0`), | ||
| versionControl = VersionControl.github(owner = "phaller", repo = "spores3"), | ||
| developers = Seq( | ||
| Developer("phaller", "Philipp Haller", "https://github.com/phaller"), | ||
| Developer("jspenger", "Jonas Spenger", "https://github.com/jspenger") | ||
| ) | ||
| ) | ||
|
|
||
| def versionScheme: T[Option[VersionScheme]] = Some(VersionScheme.SemVerSpec) | ||
| } | ||
|
|
||
| trait CommonPlatformModule extends ScalaModule with PlatformScalaModule { | ||
| def platformSources = Task.Sources( | ||
| platformCrossSuffix match { | ||
| case "jvm" => Seq(os.sub / "src-jvm-native") | ||
| case "js" => Seq(os.sub / "src-js-native") | ||
| case "native" => Seq(os.sub / "src-js-native", os.sub / "src-jvm-native") | ||
| }* | ||
| ) | ||
|
|
||
| override def sources = Task { super.sources() ++ platformSources() } | ||
| } | ||
|
|
||
| object spores3 extends Module { | ||
|
|
||
| trait Shared extends CommonPublishModule with CommonPlatformModule { | ||
| def artifactName = "spores3" | ||
| def mvnDeps = Seq(mvn"com.lihaoyi::upickle::$upickle") | ||
| } | ||
|
|
||
| object jvm extends Shared { | ||
| object test extends ScalaTests with CommonTestModule | ||
| } | ||
|
|
||
| object js extends Shared with ScalaJSModule { | ||
| def scalaJSVersion = scalaJS | ||
| object test extends ScalaJSTests with CommonTestModule | ||
| } | ||
|
|
||
| object native extends Shared with ScalaNativeModule { | ||
| def scalaNativeVersion = scalaNative | ||
| object test extends ScalaNativeTests with CommonTestModule | ||
| } | ||
| } | ||
|
|
||
| object sample extends Module { | ||
|
|
||
| trait Shared extends ScalaModule with CommonPlatformModule { | ||
| def scalaVersion = scala3 | ||
| def mvnDeps = Seq(mvn"com.lihaoyi::upickle::$upickle") | ||
| } | ||
|
|
||
| object jvm extends Shared { | ||
| def moduleDeps = Seq(spores3.jvm) | ||
| } | ||
|
|
||
| object js extends Shared with ScalaJSModule { | ||
| def scalaJSVersion = scalaJS | ||
| def moduleDeps = Seq(spores3.js) | ||
| def scalaJSUseMainModuleInitializer = true | ||
| } | ||
|
|
||
| object native extends Shared with ScalaNativeModule { | ||
| def scalaNativeVersion = scalaNative | ||
| def moduleDeps = Seq(spores3.native) | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to upgrade this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into upgrading uPickle to 4.X and this will require some changes to the test cases as the newer uPickle versions produce different serialized output. I have another PR that addresses this and bumps the uPickle version to 4.X. So I will leave the uPickle version at 3.3.0 for this PR.