2015-01-22 20:26:34 +02:00
|
|
|
/**
|
2017-01-04 17:37:10 +01:00
|
|
|
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
|
2015-01-22 20:26:34 +02:00
|
|
|
*/
|
|
|
|
|
package akka
|
|
|
|
|
|
2015-02-19 15:49:02 +01:00
|
|
|
import sbt._
|
2016-03-10 10:45:35 +02:00
|
|
|
import sbt.Keys._
|
|
|
|
|
import com.typesafe.tools.mima.plugin.MimaPlugin
|
|
|
|
|
import com.typesafe.tools.mima.plugin.MimaPlugin.autoImport._
|
2015-01-22 20:26:34 +02:00
|
|
|
|
|
|
|
|
object MiMa extends AutoPlugin {
|
|
|
|
|
|
2017-07-27 13:33:14 +03:00
|
|
|
private val latestMinorOf25 = 3
|
|
|
|
|
private val latestMinorOf24 = 18
|
|
|
|
|
|
2016-03-10 10:45:35 +02:00
|
|
|
override def requires = MimaPlugin
|
2015-01-22 20:26:34 +02:00
|
|
|
override def trigger = allRequirements
|
|
|
|
|
|
2016-03-10 10:45:35 +02:00
|
|
|
override val projectSettings = Seq(
|
|
|
|
|
mimaPreviousArtifacts := akkaPreviousArtifacts(name.value, organization.value, scalaBinaryVersion.value)
|
2015-01-22 20:26:34 +02:00
|
|
|
)
|
2015-05-21 09:48:49 +03:00
|
|
|
|
2016-03-10 10:45:35 +02:00
|
|
|
def akkaPreviousArtifacts(projectName: String, organization: String, scalaBinaryVersion: String): Set[sbt.ModuleID] = {
|
2016-12-15 16:01:32 +01:00
|
|
|
val versions: Seq[String] = {
|
2016-03-10 10:45:35 +02:00
|
|
|
val akka24NoStreamVersions = Seq("2.4.0", "2.4.1")
|
2017-07-27 13:33:14 +03:00
|
|
|
val akka25Versions = (0 to latestMinorOf25).map(patch => s"2.5.$patch")
|
2016-12-13 19:58:59 +08:00
|
|
|
val akka24StreamVersions = (2 to 12) map ("2.4." + _)
|
2017-09-12 10:48:15 +02:00
|
|
|
val akka24WithAtLeastScala212 =
|
2017-07-27 13:33:14 +03:00
|
|
|
(13 to latestMinorOf24)
|
2017-02-14 12:32:42 +01:00
|
|
|
.map ("2.4." + _)
|
|
|
|
|
.filterNot(_ == "2.4.15") // 2.4.15 was released from the wrong branch and never announced
|
|
|
|
|
|
2016-03-10 10:45:35 +02:00
|
|
|
val akka242NewArtifacts = Seq(
|
|
|
|
|
"akka-stream",
|
!htp #18919 #19519 New JavaDSL for Akka HTTP (#20518)
* !htt #18919 #19519 Align Java HTTP server DSL with Scala
This commits replaces the Java HTTP server DSL with a Java-8 centric one
which exposes all scala DSL concepts to be usable from Java, including
custom directives, (un)marshallers, rejections, headers, and type safety
for path and query parameters.
* Add RequestContext and RouteResult to Java DSL
fix websockets
WIP bring java docs up to date.
This applies some updates to the root-level documentation
* [htp] Fix java documentation to correctly mention timeouts
Timeouts are configured the same in Java and Scala. Hence, linking to the
scala docs for timeouts from Java.
* =htc fix optionalHeaderValueByType in Java
* =htt #20200 fix java testkit always using NoLogging instead logger
* +htt actually run new javadsl tests, allow overriding config
* =htt improve javadsl test infra with more details when fails
* =htt fix bug in wrong path matcher exposed
* +htp add missing remaining path matcher
* =htp Java DSL cookie tests fixed
* =htt Java DSL ParameterDirectivesTest fixed
Protect the tweets from scalariform
Incorrect response expectations in cache condition directives spec fixed
* =htt Path directives for Java DSL
* +!htt PathMatchers rewritten, made uniform and tests passing
* Bugfix in java reject and a little test-boyscouting
* Revert "Incorrect response expectations in cache condition directives spec fixed"
This reverts commit cd50e89d45db010309f8249b090ea654ebb11c7a.
* +htc HttpAPIsTest is compile time only, not for running
Also, moved from the client package since not strictly a client test.
SecurityDirectives passing
Two faulty tests and two actual bugs.
Fix for cache condition spec not working
* Not sending in Unit instad of the implicit magnet in the test
* HeaderMagnet now works as expected
* Java API added for - and + on DateTime
PetStore example and test fixed
* Annotations to make marshalling work without default constructor
* Made model class immutable
Incorrect tests fixed
Some scaladoc boyscouting as bonus
* =htt RequestValTest sprinkled out across multiple directive tests
Client ip extraction test with incorrect header name fixed.
* =htt Incorrect CodingDirectivesTest fixed.
* =htt Bugfix for Java Unmarshaller.firstOf and fixes to JavaRouteTest
* =htt MarshallerTest fixed
* Missing seal signature added to JavaDSL
* More consistent (with Scala) test kit setup for Java
* missing Javadocs added
* Thread.sleep in default exception handler removed
* =htt copy directive docs, prepare for finishing it up
* +htt SecurityDirectives.authorize variants and test coverage added
* +htt Custom headers in Java DSL
* =htt WIP on java docs
* +htp add missing parameterOrDefault directive
Fixed a lot of doc warnings
* =htc intense progress on javadsl docs
* =htc #20470 Link to issue about docs and fix compile error
compile, migration guide
don't mima check http-experimental
* =htt Java DSL doc warnings fixed.
Only `Could not lex literal_block` ones left now
* =htc fix mima settings
* =doc fix MethodDirectives doc test with custom method
* =htc fix coding directives spec after bad merge
* =htc fix concat being corresponding to route() in javadsl
* =htt Disable consistency check for route/concat as it fails only on ci server
* !htt Minor fixes to PathMatchers
2016-05-16 10:38:40 +02:00
|
|
|
"akka-stream-testkit"
|
2016-03-10 10:45:35 +02:00
|
|
|
)
|
2016-12-15 16:01:32 +01:00
|
|
|
val akka250NewArtifacts = Seq(
|
|
|
|
|
"akka-persistence-query"
|
|
|
|
|
)
|
|
|
|
|
|
2016-03-10 10:45:35 +02:00
|
|
|
scalaBinaryVersion match {
|
2016-12-15 16:01:32 +01:00
|
|
|
case "2.11" =>
|
|
|
|
|
if (akka250NewArtifacts.contains(projectName)) akka25Versions
|
|
|
|
|
else {
|
|
|
|
|
if (!akka242NewArtifacts.contains(projectName)) akka24NoStreamVersions
|
|
|
|
|
else Seq.empty
|
2017-09-12 10:48:15 +02:00
|
|
|
} ++ akka24StreamVersions ++ akka24WithAtLeastScala212 ++ akka25Versions
|
2017-05-22 16:51:29 +02:00
|
|
|
|
|
|
|
|
case "2.12" =>
|
2017-09-12 10:48:15 +02:00
|
|
|
akka24WithAtLeastScala212 ++ akka25Versions
|
|
|
|
|
|
|
|
|
|
case "2.13" =>
|
|
|
|
|
// no Akka released for 2.13 yet, no jars to check BC against
|
|
|
|
|
Seq.empty
|
2016-03-10 10:45:35 +02:00
|
|
|
}
|
|
|
|
|
}
|
2017-05-22 16:51:29 +02:00
|
|
|
|
2017-01-24 11:27:24 +01:00
|
|
|
val akka25PromotedArtifacts = Set(
|
|
|
|
|
"akka-distributed-data"
|
|
|
|
|
)
|
2016-03-10 10:45:35 +02:00
|
|
|
|
|
|
|
|
// check against all binary compatible artifacts
|
2017-01-24 11:27:24 +01:00
|
|
|
versions.map { v =>
|
|
|
|
|
val adjustedProjectName =
|
|
|
|
|
if (akka25PromotedArtifacts(projectName) && v.startsWith("2.4"))
|
|
|
|
|
projectName + "-experimental"
|
2017-05-22 16:51:29 +02:00
|
|
|
else
|
2017-01-24 11:27:24 +01:00
|
|
|
projectName
|
|
|
|
|
organization %% adjustedProjectName % v
|
|
|
|
|
}.toSet
|
2016-03-10 10:45:35 +02:00
|
|
|
}
|
2015-01-22 20:26:34 +02:00
|
|
|
}
|