Skip to content

Commit

Permalink
Add sources of synthetic classes to sources jar
Browse files Browse the repository at this point in the history
[Cherry-picked 27bd975]
  • Loading branch information
Florian3k authored and prolativ committed Nov 21, 2024
1 parent 602f659 commit a03fb8d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
7 changes: 7 additions & 0 deletions library-aux/src/scala/AnyKind.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package scala

/** The super-type of all types.
*
* See [[https://docs.scala-lang.org/scala3/reference/other-new-features/kind-polymorphism.html]].
*/
final abstract class AnyKind
7 changes: 7 additions & 0 deletions library-aux/src/scala/Matchable.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package scala

/** The base trait of types that can be safely pattern matched against.
*
* See [[https://docs.scala-lang.org/scala3/reference/other-new-features/matchable.html]].
*/
trait Matchable
7 changes: 7 additions & 0 deletions library-aux/src/scala/andType.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package scala

/** The intersection of two types.
*
* See [[https://docs.scala-lang.org/scala3/reference/new-types/intersection-types.html]].
*/
type &[A, B] = A & B
7 changes: 7 additions & 0 deletions library-aux/src/scala/orType.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package scala

/** The union of two types.
*
* See [[https://docs.scala-lang.org/scala3/reference/new-types/union-types.html]].
*/
type |[A, B] = A | B
6 changes: 5 additions & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,11 @@ object Build {
"-sourcepath", (Compile / sourceDirectories).value.map(_.getAbsolutePath).distinct.mkString(File.pathSeparator),
"-Yexplicit-nulls",
),
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings
(Compile / doc / scalacOptions) ++= ScaladocConfigs.DefaultGenerationSettings.value.settings,
(Compile / packageSrc / mappings) ++= {
val auxBase = (ThisBuild / baseDirectory).value / "library-aux/src"
auxBase ** "*.scala" pair io.Path.relativeTo(auxBase)
},
)

lazy val `scala3-library` = project.in(file("library")).asDottyLibrary(NonBootstrapped)
Expand Down

0 comments on commit a03fb8d

Please sign in to comment.