@@ -55,7 +55,7 @@ object ScalaModulePlugin extends AutoPlugin {
55
55
/**
56
56
* Enable `-opt:l:inline`, `-opt:l:project` or `-optimize`, depending on the scala version.
57
57
*/
58
- lazy val enableOptimizer : Setting [_] = scalacOptions in ( Compile , compile) ++= {
58
+ lazy val enableOptimizer : Setting [_] = Compile / compile / scalacOptions ++= {
59
59
val Ver = """ (\d+)\.(\d+)\.(\d+).*""" .r
60
60
val Ver (" 2" , maj, min) = scalaVersion.value
61
61
(maj.toInt, min.toInt) match {
@@ -66,7 +66,7 @@ object ScalaModulePlugin extends AutoPlugin {
66
66
}
67
67
68
68
lazy val disablePublishing : Seq [Setting [_]] = Seq (
69
- skip in publish := true // works in sbt 1+
69
+ publish / skip := true
70
70
)
71
71
72
72
/**
@@ -78,20 +78,20 @@ object ScalaModulePlugin extends AutoPlugin {
78
78
organization := " org.scala-lang.modules" ,
79
79
80
80
// don't use for doc scope, scaladoc warnings are not to be reckoned with
81
- scalacOptions in ( Compile , compile) ++= Seq (" -feature" , " -deprecation" , " -unchecked" , " -Xlint" ),
81
+ Compile / compile / scalacOptions ++= Seq (" -feature" , " -deprecation" , " -unchecked" , " -Xlint" ),
82
82
83
83
// Generate $name.properties to store our version as well as the scala version used to build
84
- resourceGenerators in Compile += Def .task {
84
+ Compile / resourceGenerators += Def .task {
85
85
val props = new java.util.Properties
86
86
props.put(" version.number" , version.value)
87
87
props.put(" scala.version.number" , scalaVersion.value)
88
88
props.put(" scala.binary.version.number" , scalaBinaryVersion.value)
89
- val file = (resourceManaged in Compile ).value / s " ${name.value}.properties "
89
+ val file = (Compile / resourceManaged ).value / s " ${name.value}.properties "
90
90
IO .write(props, null , file)
91
91
Seq (file)
92
92
}.taskValue,
93
93
94
- mappings in ( Compile , packageBin) += {
94
+ Compile / packageBin / mappings += {
95
95
(baseDirectory.value / s " ${name.value}.properties " ) -> s " ${name.value}.properties "
96
96
},
97
97
@@ -100,7 +100,7 @@ object ScalaModulePlugin extends AutoPlugin {
100
100
// so that scalac see classes used to run it, as classes used to compile against...
101
101
// forking uses a minimal classpath, so this craziness is avoided
102
102
// alternatively, manage the scala instance as shown at the end of this file (commented)
103
- fork in Test := true ,
103
+ Test / fork := true ,
104
104
105
105
headerLicense := Some (HeaderLicense .Custom (
106
106
s """ |Scala (https://www.scala-lang.org)
@@ -147,7 +147,7 @@ object ScalaModulePlugin extends AutoPlugin {
147
147
OsgiKeys .bundleVersion := osgiVersion.value,
148
148
149
149
// Sources should also have a nice MANIFEST file
150
- packageOptions in packageSrc := Seq (Package .ManifestAttributes (
150
+ packageSrc / packageOptions := Seq (Package .ManifestAttributes (
151
151
(" Bundle-SymbolicName" , s " ${organization.value}. ${name.value}.source " ),
152
152
(" Bundle-Name" , s " ${name.value} sources " ),
153
153
(" Bundle-Version" , osgiVersion.value),
@@ -197,9 +197,9 @@ object ScalaModulePlugin extends AutoPlugin {
197
197
else Def .task { () }
198
198
}).value,
199
199
200
- test in Test := {
200
+ Test / test := {
201
201
runMimaIfEnabled.value
202
- (test in Test ).value
202
+ (Test / test ).value
203
203
}
204
204
)
205
205
}
0 commit comments