Skip to content

Ready for v0.9.7-RC1 #192

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 56 commits into from
Nov 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
2685ae5
Remove unused method
Oct 24, 2016
286692a
Updating code to 2.10
Oct 26, 2016
749d9e3
Remove obsolete sample files
Oct 26, 2016
f15bfd0
Work towards sbt 1.0 compatibility
Oct 9, 2016
ca1f54f
More work on sbt 1.0 compatibility
Oct 9, 2016
ad02323
Changes to Dependencies, work in progress
Oct 11, 2016
2630995
wip - working on logger
Oct 11, 2016
4af1d63
Finally compatible with both 1.0.0-M4 and 0.13 and 0.12 up to logging
Oct 12, 2016
4794c23
Started work on subproject deploy
Oct 12, 2016
a1ea19d
Compatible for deploy as well
Oct 12, 2016
db0a395
Subproject metadata now compatible with 0.13 and 1.0 (but not 0.12)
Oct 12, 2016
52d8bbd
missing file
Oct 13, 2016
3c9ce4f
Changes to build files, working towards .sbt-based build
Oct 13, 2016
91090d0
Compatibility for repo subproject
Oct 14, 2016
a76afb1
Compatibility for core
Oct 14, 2016
4a4414f
Subproject "proj" adapted for 1.0
Oct 14, 2016
dd6050a
Moving 0.12/0.13/1.0 adapter code in a separate project; logging
Oct 14, 2016
c031c8f
Refactored adapter for deploy
Oct 14, 2016
a9c9f17
Rename 'Proj' to 'SubProj' to avoid warnings
Oct 14, 2016
c9d07c5
Refactored adapter for repo
Oct 14, 2016
4f1d7f6
Refactored adapter for core
Oct 14, 2016
ee6c171
Refactored adapter for proj
Oct 14, 2016
38a40f2
Added actorProj
Oct 14, 2016
f7d7a26
Significant adjustments needed for 1.0 compat in project "support"
Oct 14, 2016
6c6a9f7
Added supportGit
Oct 14, 2016
1486b79
Adding (non working) plugin section
Oct 14, 2016
a80e156
Working towards getting the plugin compiled
Oct 17, 2016
1c677b1
More work towards getting the plugin compiled
Oct 18, 2016
d49ac2b
TEMPORARY workaround to the now-removed ScalaInstance constructor
Oct 19, 2016
8d73eef
change to build.properties
Oct 21, 2016
2c1d104
Bump version in new build.sbt file
Oct 21, 2016
ae42fa6
Deep refactoring and cleanup, 0.13/1.0 compatibility
Oct 28, 2016
eae503e
Solve conflict with '/' applied to File
Oct 28, 2016
7bd55da
Re-enable bintray publishing
Oct 28, 2016
2041eb8
Adapt docs building settings and plugins
Oct 28, 2016
421f7bb
Disambiguate ambiguous implicit conversion
Oct 28, 2016
6b2892d
More uses of Adapter, compatibility
Oct 28, 2016
b468501
Disabled again bintray
Oct 28, 2016
0da9458
Some additional ugly compatibility changes
Oct 28, 2016
8e04347
Remove obsolete .scala build file
Oct 28, 2016
0b072ab
Cleanup of dependencies, now split according to Scala version
Nov 2, 2016
700f7ae
Reorganized Adapter
Nov 2, 2016
7ef6be7
Reset the publish task to the standard value
Nov 2, 2016
05f1d75
Add missing Adapter to root aggregate
Nov 2, 2016
2ad1161
Look at the artifacts name, rather than the project name, to detect c…
Nov 2, 2016
e0a3493
Some tricky magic to include bintray both in 0.13 and 1.0.0-M4
Nov 2, 2016
ceccd91
Turn sbt dependencies into "provided" ones
Nov 3, 2016
79deaa2
Must provide sbt dependencies to the dbuild main
Nov 3, 2016
9b7003d
Improve and clean up docs generation.
Nov 3, 2016
f4b15ce
Updated README and CHANGELOG
Nov 3, 2016
b463253
Fix licenses
Nov 4, 2016
6c54b60
Reorganize syntax adapters for the metabuild
Nov 4, 2016
43ed12d
Travis updates
Nov 4, 2016
8caecd7
Changes to serialization/deserialization and companion objects
Nov 4, 2016
e6959d6
Last fixes to integration tests
Nov 4, 2016
9b87ad4
Bump version to 0.9.7-RC1
Nov 3, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/project/project/
target/
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: scala

jdk:
# - openjdk6
- oraclejdk7
- oraclejdk8

sudo: false

Expand All @@ -11,9 +11,9 @@ env:
- JVM_OPTS="-Xms1024m -Xmx1024m -XX:ReservedCodeCacheSize=128m -XX:MaxPermSize=256m"

script:
- sbt "^ test"
- sbt "^ publishLocal"
- sbt "^ it:test"
- sbt "test"
- sbt "publishLocal"
- sbt "it:test"

notifications:
email:
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# dbuild release notes

### 0.9.7

- This release is compatible with sbt 1.0.0-M4. The source
code and the build files have been reorganized, and
moved to the .sbt format. The supported sbt versions are
1.0.0-M4 and 0.13.*; support for the old 0.12.4 has
been removed.

- Fixes for issues #190, #158, #188

- The dbuild sbt plugin .pom no longer directly refers to
sbt jars, but uses those provided by the running sbt
environment. Fixes scala/community-builds#384.

### 0.9.6

- Fixed the "deploy" option when the target is a Bintray
repository.

### 0.9.5

- It is now possible to use different versions of the JDK on the
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@ though each of them may evolve independently.
You can find the complete dbuild documentation at the
[dbuild web site](http://typesafehub.github.com/dbuild).

To recompile, publish, etc., just type the following in the root project:

^command

where command is one of compile, clean, test, publish, publishLocal, etc.

To create a dbuild release (if you belong to the Typesafe organization on Bintray):

1. Type "^release" (please do not use "^publish", as some additional preparation is necessary)
1. Type "release" (please do not use "^publish", as some additional preparation is necessary)
2. Check https://bintray.com/typesafe/ivy-releases/dbuild/view to ensure files are as expected (Optional)
3. Type "root/bintrayRelease" to make the release public

Expand All @@ -43,8 +37,13 @@ Bintray yet, you can use:
set every publishTo := Some(Resolver.url("somelabel", new URL("http://artifactoryhost/artifactory/repository/"))(Resolver.ivyStylePatterns))
set every credentials := Seq(Credentials(Path.userHome / "some" / "path" / "credentials-file"))

Then, proceed with "^release" as usual to issue the snapshot to your Artifactory server.
Then, proceed with "release" as usual to issue the snapshot to your Artifactory server.

IMPORTANT: the publishing process needs to be repeated twice, changing
project/build.properties in the meantime, in order to publish artifacts
for both sbt 0.13/scala 2.10 and sbt 1.0/scala 2.11 (currently 1.0.0-M4)
All the artifacts are published for 2.10, while only those relevant to
the sbt plugin are published for 2.11.

## Get Involved

Expand Down
55 changes: 55 additions & 0 deletions adapter/src/main/scala-2.10/Adapter.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package sbt.dbuild.hack {
object DbuildHack {
val Load = sbt.Load
}
}

package com.typesafe.dbuild.adapter {
import java.io.File

object LoggingInterface {
val Level = sbt.Level
type Logger = sbt.Logger
type LogEvent = sbt.LogEvent
val ControlEvent = sbt.ControlEvent
val StackTrace = sbt.StackTrace
type BasicLogger = sbt.BasicLogger
}

import LoggingInterface.Level._
trait StreamLoggerAdapter {
def log(level: Value, message: => String): Unit
def log(label: String, message: String): Unit
def err(s: => String): Unit = log(Error, s)
def out(s: => String): Unit = log(Info.toString, s)
}

object Adapter {
val IO = sbt.IO
val Path = sbt.Path
type RichFile = sbt.RichFile
type FileFilter = sbt.FileFilter
def toFF = sbt.FileFilter.globFilter _
val DirectoryFilter = sbt.DirectoryFilter
type ExactFilter = sbt.ExactFilter
type NameFilter = sbt.NameFilter
type FileRepository = sbt.FileRepository
type Logger = sbt.Logger
import Path._
def allPaths(f:File) = sbt.PathFinder(f).***
val syntax = new {}
val syntaxio = syntax
type ModuleID = sbt.ModuleID
type Artifact = sbt.Artifact
type ProjectResolver = sbt.ProjectResolver
type ScalaInstance = sbt.ScalaInstance
lazy val ScalaInstance = sbt.ScalaInstance
lazy val Load = sbt.dbuild.hack.DbuildHack.Load
val applyCross: (String, Option[String => String]) => String =
sbt.CrossVersion.applyCross
def defaultID(base: File, prefix: String = "default") =
sbt.Build.defaultID(base, prefix)
def scalaInstance(libraryJar: File, compilerJar: File, launcher: xsbti.Launcher, extraJars: File*): ScalaInstance =
ScalaInstance(libraryJar, compilerJar, launcher, extraJars:_*)
}
}
86 changes: 86 additions & 0 deletions adapter/src/main/scala-2.11/Adapter.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
package sbt.dbuild.hack {
object DbuildHack {
val Load = sbt.internal.Load
val applyCross: (String, Option[String => String]) => String =
sbt.librarymanagement.CrossVersion.applyCross
val defaultID: (java.io.File,String) => String =
sbt.internal.BuildDef.defaultID
}
}
package com.typesafe.dbuild.adapter {
import java.io.File

object LoggingInterface {
val Level = sbt.util.Level
type Logger = sbt.util.Logger
type LogEvent = sbt.util.LogEvent
val ControlEvent = sbt.util.ControlEvent
val StackTrace = sbt.internal.util.StackTrace
type BasicLogger = sbt.internal.util.BasicLogger
}

trait StreamLoggerAdapter

object Adapter {
val IO = sbt.io.IO
val Path = sbt.io.Path
type RichFile = sbt.io.RichFile
type FileFilter = sbt.io.FileFilter
def toFF = sbt.io.FileFilter.globFilter _
val DirectoryFilter = sbt.io.DirectoryFilter
type ExactFilter = sbt.io.ExactFilter
type NameFilter = sbt.io.NameFilter
type FileRepository = sbt.librarymanagement.FileRepository
type Logger = sbt.util.Logger
def allPaths(f:File) = sbt.io.PathFinder(f).allPaths
val syntaxio = sbt.io.syntax
val syntax = sbt.syntax
type ModuleID = sbt.librarymanagement.ModuleID
type Artifact = sbt.librarymanagement.Artifact
type ProjectResolver = sbt.internal.librarymanagement.ProjectResolver
type ScalaInstance = sbt.internal.inc.ScalaInstance
val ScalaInstance = sbt.internal.inc.ScalaInstance
val Load = sbt.dbuild.hack.DbuildHack.Load
val applyCross = sbt.dbuild.hack.DbuildHack.applyCross
def defaultID(base: File, prefix: String = "default") =
sbt.dbuild.hack.DbuildHack.defaultID(base, prefix)

// these bits are inappropriately copied from zinc v1.0.0-X1, where they
// are private now, and exactly from:
// internal/zinc-classpath/src/main/scala/sbt/internal/inc/ScalaInstance.scala
private val VersionPrefix = "version "
private def fastActualVersion(scalaLoader: ClassLoader): String =
{
val stream = scalaLoader.getResourceAsStream("compiler.properties")
try {
val props = new java.util.Properties
props.load(stream)
props.getProperty("version.number")
} finally stream.close()
}
import java.net.{ URL, URLClassLoader }
private def scalaLoader(launcher: xsbti.Launcher): Seq[File] => ClassLoader = jars =>
new URLClassLoader(jars.map(_.toURI.toURL).toArray[URL], launcher.topLoader)
private def actualVersion(scalaLoader: ClassLoader)(label: String) =
try fastActualVersion(scalaLoader)
catch { case e: Exception => slowActualVersion(scalaLoader)(label) }
private def slowActualVersion(scalaLoader: ClassLoader)(label: String) =
{
val v = try { Class.forName("scala.tools.nsc.Properties", true, scalaLoader).getMethod("versionString").invoke(null).toString }
catch { case cause: Exception => throw new sbt.internal.inc.InvalidScalaInstance("Scala instance doesn't exist or is invalid: " + label, cause) }
if (v.startsWith(VersionPrefix)) v.substring(VersionPrefix.length) else v
}
//
// The code below was deprecated and has been removed from ScalaInstance in zinc 1.0.x,
// however it may work for us.
//
// TODO: use one of the currently supported variants of ScalaInstance.apply()
//
def scalaInstance(libraryJar: File, compilerJar: File, launcher: xsbti.Launcher, extraJars: File*): ScalaInstance = {
val classLoader = scalaLoader(launcher)
val loader = classLoader(libraryJar :: compilerJar :: extraJars.toList)
val version = actualVersion(loader)(" (library jar " + libraryJar.getAbsolutePath + ")")
new ScalaInstance(VersionPrefix, loader, libraryJar, compilerJar, extraJars.toArray, None)
}
}
}
Loading