Skip to content

Commit 626f9a4

Browse files
committed
Moved helper API to shared file
1 parent d148b0d commit 626f9a4

2 files changed

Lines changed: 16 additions & 17 deletions

File tree

de.tototec.cmdoption/pom.scala

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,6 @@ import scala.collection.immutable.Seq
33

44
#include ../mvn-shared.scala
55

6-
// Extends polyglot API for convenience
7-
implicit class ImplDependency(d: Dependency) {
8-
9-
def copy(gav: Gav = d.gav,
10-
`type`: String = d.`type`,
11-
classifier: String = d.classifier.orNull,
12-
scope: String = d.scope.orNull,
13-
systemPath: String = d.systemPath.orNull,
14-
exclusions: Seq[GroupArtifactId] = d.exclusions,
15-
optional: Boolean = d.optional) = {
16-
new Dependency(gav, `type`, Option(classifier), Option(scope), Option(systemPath), exclusions, optional)
17-
}
18-
19-
def pure: Dependency = d.copy(exclusions = Seq("*" % "*"))
20-
21-
}
22-
236
Model(
247
gav = "de.tototec" % "de.tototec.cmdoption" % CmdOption.version,
258
modelVersion = "4.0.0",

mvn-shared.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ object CmdOption {
44

55
}
66

7+
// Extends polyglot API for convenience
8+
implicit class ImplDependency(d: Dependency) {
9+
10+
def copy(gav: Gav = d.gav,
11+
`type`: String = d.`type`,
12+
classifier: String = d.classifier.orNull,
13+
scope: String = d.scope.orNull,
14+
systemPath: String = d.systemPath.orNull,
15+
exclusions: Seq[GroupArtifactId] = d.exclusions,
16+
optional: Boolean = d.optional) = {
17+
new Dependency(gav, `type`, Option(classifier), Option(scope), Option(systemPath), exclusions, optional)
18+
}
19+
20+
def pure: Dependency = d.copy(exclusions = Seq("*" % "*"))
21+
}
22+
723
val genPomXmlProfile = Profile(
824
id = "gen-pom-xml",
925
build = BuildBase(

0 commit comments

Comments
 (0)