-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #439 from eed3si9n/wip/sbt1
1.5.2
- Loading branch information
Showing
7 changed files
with
71 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
### bug fixes | ||
|
||
- Replaces trailing underscore with `"u93"`. [#415][415] by [@varnerac][@varnerac] | ||
- Fixes BigDecimal formatting. [#417][417] by [@coutoPL][@coutoPL] | ||
|
||
### enhancements | ||
|
||
- Adds Gigahorse support. [#413][413] by [@alexdupre][@alexdupre] | ||
- Adds Scala 2.12 cross building. [#413][413]/[#419][419] by [@alexdupre][@alexdupre] and [@dwijnand][@dwijnand] | ||
|
||
[413]: https://github.com/eed3si9n/scalaxb/pull/413 | ||
[415]: https://github.com/eed3si9n/scalaxb/pull/415 | ||
[417]: https://github.com/eed3si9n/scalaxb/pull/417 | ||
[419]: https://github.com/eed3si9n/scalaxb/pull/419 | ||
[@alexdupre]: https://github.com/alexdupre | ||
[@varnerac]: https://github.com/varnerac | ||
[@coutoPL]: https://github.com/coutoPL | ||
[@dwijnand]: https://github.com/dwijnand |
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,8 @@ | ||
|
||
### enhancements | ||
|
||
- Adds support for Gigahorse 0.3 and different backends (OkHttp and AHC) #428 by @alexdupre | ||
|
||
### bug fixes | ||
|
||
- Splits `fromAnySchemaType` into smaller chunks to work around JVM code size limit. #429 by @fltt |
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 |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.13.15 | ||
sbt.version=0.13.16 |
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
38 changes: 38 additions & 0 deletions
38
sbt-scalaxb/src/main/scala-sbt-1.0/sbtscalaxb/ScalaxbCompile.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,38 @@ | ||
package sbtscalaxb | ||
|
||
import sbt._ | ||
import Keys._ | ||
import scalaxb.{compiler => sc} | ||
import scalaxb.compiler.{Config => ScConfig} | ||
import sc.ConfigEntry._ | ||
import scalaxb.BuildInfo | ||
|
||
object ScalaxbCompile { | ||
def apply(sources: Seq[File], packageName: String, outDir: File, cacheDir: File): Seq[File] = | ||
apply(sources, sc.Config.default.update(PackageNames(Map(None -> Some(packageName)))), outDir, cacheDir, false) | ||
|
||
def apply(sources: Seq[File], config: sc.Config, outDir: File, cacheDir: File, verbose: Boolean = false): Seq[File] = { | ||
import Tracked.{inputChanged, outputChanged} | ||
import FilesInfo.{lastModified, exists} | ||
import sbt.util.CacheImplicits._ | ||
|
||
def compile: Seq[File] = | ||
sources.headOption map { src => | ||
import sc._ | ||
sc.Log.configureLogger(verbose) | ||
val module = Module.moduleByFileName(src) | ||
module.processFiles(sources.toVector, config.update(Outdir(outDir))) | ||
} getOrElse {Nil} | ||
|
||
def cachedCompile = | ||
inputChanged(cacheDir / "scalaxb-inputs") { (inChanged, inputs: (Seq[File], FilesInfo[ModifiedFileInfo], String)) => | ||
outputChanged(cacheDir / "scalaxb-output") { (outChanged, outputs: FilesInfo[PlainFileInfo]) => | ||
if (inChanged || outChanged) compile | ||
else outputs.files.toSeq map {_.file} | ||
} | ||
} | ||
def inputs: (Seq[File], FilesInfo[ModifiedFileInfo], String) = | ||
(sources, lastModified(sources.toSet).asInstanceOf[FilesInfo[ModifiedFileInfo]], BuildInfo.version) | ||
cachedCompile(inputs)(() => exists((outDir ** "*.scala").get.toSet).asInstanceOf[FilesInfo[PlainFileInfo]]) | ||
} | ||
} |