-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
051a798
commit 4f2330c
Showing
8 changed files
with
67 additions
and
71 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
50 changes: 0 additions & 50 deletions
50
src/main/scala/com/github/pjfanning/pekkobuild/PekkoHttpDependency.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 |
---|---|---|
@@ -1,50 +0,0 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* license agreements; and to You under the Apache License, version 2.0: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* This file is part of the Apache Pekko project, which was derived from Akka. | ||
*/ | ||
|
||
/* | ||
* Copyright (C) 2017-2020 Lightbend Inc. <https://www.lightbend.com> | ||
*/ | ||
|
||
package com.github.pjfanning.pekkobuild | ||
|
||
object PekkoHttpDependency extends VersionRegex { | ||
override val checkProject: String = "pekko-http-testkit" | ||
|
||
def pekkoHttpDependency(defaultVersion: String): Dependency = | ||
Option(System.getProperty("pekko.http.sources")) match { | ||
case Some(pekkoSources) => | ||
Sources(pekkoSources) | ||
case None => | ||
Option(System.getProperty("pekko.build.pekko.http.version")) match { | ||
case Some("main") => snapshotMain | ||
case Some("1.0.x") => snapshot10x | ||
case Some("latest-release") => latestRelease | ||
case Some("default") | None => Artifact(defaultVersion) | ||
case Some(other) => Artifact(other, true) | ||
} | ||
} | ||
|
||
private val defaultPekkoHttpVersion = System.getProperty("pekko.build.pekko.http.min.version", "1.0.0") | ||
lazy val default: Dependency = pekkoHttpDependency(defaultPekkoHttpVersion) | ||
|
||
lazy val snapshot10x = Artifact(determineLatestSnapshot("1.0"), true) | ||
lazy val snapshotMain = Artifact(determineLatestSnapshot(), true) | ||
lazy val latestRelease = Artifact(determineLatestRelease(), false) | ||
|
||
lazy val pekkoHttpVersion: String = default match { | ||
case Artifact(version, _) => version | ||
case Sources(uri, _) => uri | ||
} | ||
|
||
def pekkoHttpVersionDerivedFromDefault(overrideDefaultPekkoHttpVersion: String): String = | ||
pekkoHttpDependency(overrideDefaultPekkoHttpVersion) match { | ||
case Artifact(version, _) => version | ||
case Sources(uri, _) => uri | ||
} | ||
} | ||
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
20 changes: 20 additions & 0 deletions
20
src/test/scala/com/github/pjfanning/pekkobuild/PekkoCoreDependency.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,20 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* license agreements; and to You under the Apache License, version 2.0: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* This file is part of the Apache Pekko project, which was derived from Akka. | ||
*/ | ||
|
||
/* | ||
* Copyright (C) 2017-2020 Lightbend Inc. <https://www.lightbend.com> | ||
*/ | ||
|
||
package com.github.pjfanning.pekkobuild | ||
|
||
object PekkoCoreDependency extends PekkoDependency { | ||
override val checkProject: String = "pekko-cluster-sharding-typed" | ||
override val module: Option[String] = None | ||
override val currentVersion: String = "1.0.2" | ||
} |
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
20 changes: 20 additions & 0 deletions
20
src/test/scala/com/github/pjfanning/pekkobuild/PekkoHttpDependency.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,20 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* license agreements; and to You under the Apache License, version 2.0: | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* This file is part of the Apache Pekko project, which was derived from Akka. | ||
*/ | ||
|
||
/* | ||
* Copyright (C) 2017-2020 Lightbend Inc. <https://www.lightbend.com> | ||
*/ | ||
|
||
package com.github.pjfanning.pekkobuild | ||
|
||
object PekkoHttpDependency extends PekkoDependency { | ||
override val checkProject: String = "pekko-http-testkit" | ||
override val module: Option[String] = Some("http") | ||
override val currentVersion: String = "1.0.0" | ||
} |
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