Skip to content

Commit fe154eb

Browse files
[autofix.ci] apply automated fixes
1 parent c802e90 commit fe154eb

File tree

7 files changed

+43
-42
lines changed

7 files changed

+43
-42
lines changed

libs/groovylib/api/src/mill/groovylib/worker/api/GroovyWorker.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import mill.javalib.api.CompilationResult
66

77
trait GroovyWorker {
88

9-
def compile(sourceFiles: Seq[os.Path],
10-
classpath: Seq[os.Path],
11-
outputDir: os.Path)(implicit ctx: TaskCtx): Result[CompilationResult]
9+
def compile(sourceFiles: Seq[os.Path], classpath: Seq[os.Path], outputDir: os.Path)(implicit
10+
ctx: TaskCtx
11+
): Result[CompilationResult]
1212
}

libs/groovylib/package.mill

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import mill.contrib.buildinfo.BuildInfo
66
import mill.scalalib.*
77
import millbuild.*
88

9-
109
object `package` extends MillStableScalaModule with BuildInfo {
1110

1211
def moduleDeps = Seq(build.libs.javalib, build.libs.javalib.testrunner, api)
@@ -16,7 +15,7 @@ object `package` extends MillStableScalaModule with BuildInfo {
1615
def buildInfoPackageName = "mill.groovylib"
1716
def buildInfoObjectName = "Versions"
1817
def buildInfoMembers = Seq(
19-
BuildInfo.Value("groovyVersion", Deps.groovyVersion, "Version of Groovy"),
18+
BuildInfo.Value("groovyVersion", Deps.groovyVersion, "Version of Groovy")
2019
)
2120

2221
trait MillGroovyModule extends MillPublishScalaModule {

libs/groovylib/src/mill/groovylib/GroovyModule.scala

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ trait GroovyModule extends JavaModule with GroovyModuleApi { outer =>
2727
def groovyLanguageVersion: T[String] = Task { groovyVersion().split("[.]").take(2).mkString(".") }
2828

2929
override def bomMvnDeps: T[Seq[Dep]] = super.bomMvnDeps() ++ Seq(
30-
mvn"org.apache.groovy:groovy-bom:${groovyVersion()}",
30+
mvn"org.apache.groovy:groovy-bom:${groovyVersion()}"
3131
)
3232

3333
/**
@@ -81,7 +81,6 @@ trait GroovyModule extends JavaModule with GroovyModuleApi { outer =>
8181
)
8282
}
8383

84-
8584
/**
8685
* The Ivy/Coursier dependencies resembling the Groovy compiler.
8786
*
@@ -90,7 +89,7 @@ trait GroovyModule extends JavaModule with GroovyModuleApi { outer =>
9089
def groovyCompilerMvnDeps: T[Seq[Dep]] = Task {
9190
val gv = groovyVersion()
9291

93-
val compilerDep = mvn"org.apache.groovy:groovy:$gv"
92+
val compilerDep = mvn"org.apache.groovy:groovy:$gv"
9493

9594
Seq(compilerDep)
9695
}
@@ -195,7 +194,6 @@ trait GroovyModule extends JavaModule with GroovyModuleApi { outer =>
195194
*/
196195
def groovycOptions: T[Seq[String]] = Task { Seq.empty[String] }
197196

198-
199197
/**
200198
* Aggregation of all the options passed to the Groovy compiler.
201199
* In most cases, instead of overriding this Target you want to override `groovycOptions` instead.
@@ -205,15 +203,15 @@ trait GroovyModule extends JavaModule with GroovyModuleApi { outer =>
205203
}
206204

207205
private[groovylib] def internalCompileJavaFiles(
208-
worker: JvmWorkerApi,
209-
upstreamCompileOutput: Seq[CompilationResult],
210-
javaSourceFiles: Seq[os.Path],
211-
compileCp: Seq[os.Path],
212-
javaHome: Option[os.Path],
213-
javacOptions: Seq[String],
214-
compileProblemReporter: Option[CompileProblemReporter],
215-
reportOldProblems: Boolean
216-
)(implicit ctx: PublicJvmWorkerApi.Ctx): Result[CompilationResult] = {
206+
worker: JvmWorkerApi,
207+
upstreamCompileOutput: Seq[CompilationResult],
208+
javaSourceFiles: Seq[os.Path],
209+
compileCp: Seq[os.Path],
210+
javaHome: Option[os.Path],
211+
javacOptions: Seq[String],
212+
compileProblemReporter: Option[CompileProblemReporter],
213+
reportOldProblems: Boolean
214+
)(implicit ctx: PublicJvmWorkerApi.Ctx): Result[CompilationResult] = {
217215
val jOpts = JavaCompilerOptions(javacOptions)
218216
worker.compileJava(
219217
ZincCompileJava(
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package mill.groovylib
22

33
import mill.*
4-
import mill.javalib.MavenModule
54

65
/**
76
* A [[GroovyModule]] for tests with a Maven compatible directory layout:
@@ -11,15 +10,16 @@ import mill.javalib.MavenModule
1110
* Requires an outer module (like JavaModule) otherwise [[moduleDir]] must be overridden manually.
1211
*/
1312
trait TestGroovyMavenModule extends GroovyMavenModule {
13+
1414
/**
1515
* The name of this module's folder within `src/`: e.g. `src/test/`, `src/integration/`,
1616
* etc. Defaults to the name of the module object, but can be overridden by users
1717
*/
1818
def testModuleName: String = moduleCtx.segments.last.value
1919

20-
private def testSources = Task.Sources( moduleDir / os.up / "src" / testModuleName / "groovy")
20+
private def testSources = Task.Sources(moduleDir / os.up / "src" / testModuleName / "groovy")
2121
override def sources: T[Seq[PathRef]] = testSources()
2222

23-
private def testResources = Task.Sources( moduleDir / os.up / "src" / testModuleName / "resources")
23+
private def testResources = Task.Sources(moduleDir / os.up / "src" / testModuleName / "resources")
2424
override def resources: T[Seq[PathRef]] = testResources()
2525
}

libs/groovylib/test/src/mill/groovylib/HelloGroovyTests.scala

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package mill
22
package groovylib
33

44
import mill.javalib.{JavaModule, MavenModule, TestModule}
5-
import mill.api.{Cross, ExecResult, Task}
5+
import mill.api.{ExecResult, Task}
66
import mill.api.Discover
77
import mill.testkit.{TestRootModule, UnitTester}
88
import utest.*
@@ -15,7 +15,6 @@ object HelloGroovyTests extends TestSuite {
1515

1616
lazy val millDiscover = Discover[this.type]
1717

18-
1918
object maven extends JavaModule with MavenModule {
2019

2120
object `maven-test-only` extends TestGroovyMavenModule with TestModule.Junit5 {
@@ -33,7 +32,6 @@ object HelloGroovyTests extends TestSuite {
3332

3433
}
3534

36-
3735
trait Test extends GroovyModule {
3836

3937
override def mainClass = Some("hello.Hello")
@@ -72,11 +70,11 @@ object HelloGroovyTests extends TestSuite {
7270
)
7371

7472
def mvnDeps = Seq(
75-
mvn"org.spockframework:spock-core",
73+
mvn"org.spockframework:spock-core"
7674
)
7775
}
7876
}
79-
object main extends Test{
77+
object main extends Test {
8078
override def groovyVersion: T[String] = "4.0.28"
8179
}
8280
}
@@ -144,8 +142,8 @@ object HelloGroovyTests extends TestSuite {
144142
}
145143
}
146144

147-
test("compile and run test-only Maven JUnit5 test"){
148-
testEval().scoped{ eval =>
145+
test("compile and run test-only Maven JUnit5 test") {
146+
testEval().scoped { eval =>
149147

150148
val Right(resultCompile) = eval.apply(mavenTestOnly.compile): @unchecked
151149
assert(

libs/groovylib/worker/src/mill/groovylib/worker/impl/GroovyWorkerImpl.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import scala.util.Try
1212
class GroovyWorkerImpl extends GroovyWorker {
1313

1414
def compile(
15-
sourceFiles: Seq[os.Path],
16-
classpath: Seq[os.Path],
17-
outputDir: os.Path
18-
)(implicit
15+
sourceFiles: Seq[os.Path],
16+
classpath: Seq[os.Path],
17+
outputDir: os.Path
18+
)(implicit
1919
ctx: TaskCtx
2020
): Result[CompilationResult] = {
2121

libs/javalib/src/mill/javalib/TestModule.scala

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package mill.javalib
22

33
import mill.T
44
import mill.api.Result
5-
import mill.api.daemon.internal.{GroovyModuleApi, TestModuleApi, TestReporter}
5+
import mill.api.daemon.internal.{TestModuleApi, TestReporter}
66
import mill.api.daemon.internal.bsp.{BspBuildTarget, BspModuleApi}
77
import mill.api.PathRef
88
import mill.api.Task
@@ -12,7 +12,14 @@ import mill.javalib.bsp.BspModule
1212
import mill.util.Jvm
1313
import mill.api.JsonFormatters.given
1414
import mill.constants.EnvVars
15-
import mill.javalib.testrunner.{DiscoverTestsMain, Framework, TestArgs, TestResult, TestRunner, TestRunnerUtils}
15+
import mill.javalib.testrunner.{
16+
DiscoverTestsMain,
17+
Framework,
18+
TestArgs,
19+
TestResult,
20+
TestRunner,
21+
TestRunnerUtils
22+
}
1623

1724
import java.nio.file.Path
1825

@@ -593,7 +600,6 @@ object TestModule {
593600
}
594601
}
595602

596-
597603
/**
598604
* TestModule that uses Spock Test Framework to run tests.
599605
* You can override the [[spockTestVersion]] task or provide the Spock-dependency yourself.
@@ -616,16 +622,16 @@ object TestModule {
616622
.filter(!_.isBlank())
617623
.flatMap(v =>
618624
Seq(
619-
mvn"org.junit.vintage:junit-vintage-engine:${v.trim()}",
625+
mvn"org.junit.vintage:junit-vintage-engine:${v.trim()}"
620626
)
621627
) ++
622628
Seq(spockTestVersion())
623-
.filter(!_.isBlank())
624-
.flatMap(v =>
625-
Seq(
626-
mvn"org.spockframework:spock-core:${v.trim()}",
627-
)
628-
) ++
629+
.filter(!_.isBlank())
630+
.flatMap(v =>
631+
Seq(
632+
mvn"org.spockframework:spock-core:${v.trim()}"
633+
)
634+
) ++
629635
Seq(groovyVersion())
630636
.filter(!_.isBlank())
631637
.flatMap(v =>

0 commit comments

Comments
 (0)