-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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 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 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
7 changes: 7 additions & 0 deletions
7
each/src/main/scala-2.13/com/thoughtworks/each/macrocompat.scala
This file contains 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,7 @@ | ||
package com.thoughtworks.each | ||
|
||
import scala.annotation.StaticAnnotation | ||
|
||
private[each] object macrocompat { | ||
class bundle extends StaticAnnotation | ||
} |
This file contains 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 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 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,22 @@ | ||
// An optional sbt file to replace Scala.js 1.0 with 0.6 | ||
dependencyOverrides += Defaults.sbtPluginExtra( | ||
"org.scala-js" % "sbt-scalajs" % "1.0.1", | ||
sbtBinaryVersion.value, | ||
scalaBinaryVersion.value, | ||
) | ||
|
||
Compile / sourceGenerators += Def.task { | ||
val file = (Compile / sourceManaged).value / "SkipPublishForNonScalaJSProjects.scala" | ||
IO.write(file, """ | ||
import scalajscrossproject.ScalaJSCrossPlugin.autoImport._ | ||
import sbtcrossproject.CrossPlugin.autoImport._ | ||
import sbt._, Keys._ | ||
object SkipPublishForNonScalaJSProjects extends AutoPlugin { | ||
override def trigger = allRequirements | ||
override def projectSettings = Seq( | ||
publish / skip := crossProjectPlatform.value != JSPlatform | ||
) | ||
} | ||
""") | ||
Seq(file) | ||
}.taskValue |