-
Notifications
You must be signed in to change notification settings - Fork 36
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
Ignore jcenter and scala-tools-releases #104
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 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,2 @@ | ||
target | ||
metals.sbt |
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 |
---|---|---|
|
@@ -2,7 +2,9 @@ import Deps._ | |
import Util._ | ||
import com.typesafe.tools.mima.core._, ProblemFilters._ | ||
|
||
lazy val keepFullClasses = settingKey[Seq[String]]("Fully qualified names of classes that proguard should preserve the non-private API of.") | ||
lazy val keepFullClasses = settingKey[Seq[String]]( | ||
"Fully qualified names of classes that proguard should preserve the non-private API of." | ||
) | ||
|
||
Global / onChangedBuildSource := ReloadOnSourceChanges | ||
ThisBuild / dynverSonatypeSnapshots := true | ||
|
@@ -12,7 +14,7 @@ ThisBuild / version := { | |
else orig | ||
} | ||
ThisBuild / description := "Standalone launcher for maven/ivy deployed projects" | ||
ThisBuild / scalaVersion := "2.13.6" | ||
ThisBuild / scalaVersion := "2.13.14" | ||
ThisBuild / publishMavenStyle := true | ||
ThisBuild / crossPaths := false | ||
ThisBuild / resolvers += Resolver.typesafeIvyRepo("releases") | ||
|
@@ -31,9 +33,9 @@ lazy val root = (project in file(".")) | |
packageDoc in Compile := (packageDoc in Compile in launchSub).value | ||
commands += Command.command("release") { state => | ||
"clean" :: | ||
"test" :: | ||
"publishSigned" :: | ||
state | ||
"test" :: | ||
"publishSigned" :: | ||
state | ||
} | ||
validNamespaces ++= Set("xsbt", "xsbti", "scala", "org.apache.ivy", "org.fusesource.jansi") | ||
validEntries ++= Set("LICENSE", "NOTICE", "module.properties") | ||
|
@@ -56,19 +58,26 @@ def proguardedLauncherSettings = Seq( | |
|
||
def launchSettings = | ||
inConfig(Compile)(Transform.configSettings) ++ | ||
inConfig(Compile)(Transform.transSourceSettings ++ Seq( | ||
// TODO - these should be shared between sbt core + sbt-launcher... | ||
Transform.inputSourceDirectory := sourceDirectory.value / "input_sources", | ||
Transform.sourceProperties := Map("cross.package0" -> "xsbt", "cross.package1" -> "boot") | ||
)) | ||
inConfig(Compile)( | ||
Transform.transSourceSettings ++ Seq( | ||
// TODO - these should be shared between sbt core + sbt-launcher... | ||
Transform.inputSourceDirectory := sourceDirectory.value / "input_sources", | ||
Transform.sourceProperties := Map("cross.package0" -> "xsbt", "cross.package1" -> "boot") | ||
) | ||
) | ||
|
||
// The interface JAR for projects which want to be launched by sbt. | ||
lazy val launchInterfaceSub = (project in file("launcher-interface")) | ||
.settings(javaOnly) | ||
.settings(nocomma { | ||
name := "Launcher Interface" | ||
resourceGenerators in Compile += Def.task{ | ||
generateVersionFile("sbt.launcher.version.properties")(version.value, resourceManaged.value, streams.value, (compile in Compile).value) | ||
resourceGenerators in Compile += Def.task { | ||
generateVersionFile("sbt.launcher.version.properties")( | ||
version.value, | ||
resourceManaged.value, | ||
streams.value, | ||
(compile in Compile).value | ||
) | ||
}.taskValue | ||
description := "Interfaces for launching projects with the sbt launcher" | ||
mimaPreviousArtifacts := Set(organization.value % moduleName.value % "1.0.1") | ||
|
@@ -119,10 +128,10 @@ lazy val launchSub = (project in file("launcher-implementation")) | |
Proguard / proguardOptions ++= keepFullClasses.value map ("-keep public class " + _ + " {\n\tpublic protected * ;\n}") | ||
Proguard / proguardInputFilter := { file => | ||
file.name match { | ||
case x if x.startsWith("scala-library") => Some(libraryFilter) | ||
case x if x.startsWith("ivy-2.3.0") => Some(ivyFilter) | ||
case x if x.startsWith("scala-library") => Some(libraryFilter) | ||
case x if x.startsWith("ivy-2.3.0") => Some(ivyFilter) | ||
case x if x.startsWith("launcher-implementation") => None | ||
case _ => Some(generalFilter) | ||
case _ => Some(generalFilter) | ||
} | ||
} | ||
Proguard / proguardOptions += ProguardOptions.keepMain("xsbt.boot.Boot") | ||
|
@@ -156,7 +165,6 @@ def ivyFilter = { | |
excludeString(ivyResources) | ||
} | ||
|
||
|
||
// used to test the retrieving and loading of an application: sample app is packaged and published to the local repository | ||
lazy val testSamples = (project in file("test-sample")) | ||
.dependsOn(launchInterfaceSub) | ||
|
@@ -169,20 +177,25 @@ lazy val testSamples = (project in file("test-sample")) | |
}) | ||
|
||
ThisBuild / organization := "org.scala-sbt" | ||
ThisBuild / pomIncludeRepository := { x => false } | ||
ThisBuild / pomIncludeRepository := { x => | ||
false | ||
} | ||
ThisBuild / homepage := Some(url("https://scala-sbt.org")) | ||
ThisBuild / licenses += "Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt") | ||
ThisBuild / scmInfo := Some(ScmInfo( | ||
browseUrl = url("https://github.com/sbt/launcher"), | ||
connection = "scm:[email protected]:sbt/launcher.git" | ||
)) | ||
ThisBuild / scmInfo := Some( | ||
ScmInfo( | ||
browseUrl = url("https://github.com/sbt/launcher"), | ||
connection = "scm:[email protected]:sbt/launcher.git" | ||
) | ||
) | ||
ThisBuild / developers := List( | ||
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", url("https://github.com/eed3si9n")), | ||
Developer("jsuereth", "Josh Suereth", "@jsuereth", url("https://github.com/jsuereth")), | ||
Developer("dwijnand", "Dale Wijnand", "@dwijnand", url("https://github.com/dwijnand")) | ||
) | ||
ThisBuild / publishTo := { | ||
val nexus = "https://oss.sonatype.org/" | ||
if (version.value.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots") | ||
else Some("releases" at nexus + "service/local/staging/deploy/maven2") | ||
if (version.value.trim.endsWith("SNAPSHOT")) | ||
Some("snapshots" at nexus + "content/repositories/snapshots") | ||
else Some("releases" at nexus + "service/local/staging/deploy/maven2") | ||
} |
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 |
---|---|---|
|
@@ -93,5 +93,5 @@ object Boot { | |
} | ||
|
||
private def exit(code: Int): Nothing = | ||
System.exit(code).asInstanceOf[Nothing] | ||
sys.exit(code) | ||
} |
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
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
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.
This is the main change.