Skip to content

Commit b1b2965

Browse files
committed
Set .mill-jvm-version for Mockito tests
1 parent e95f93f commit b1b2965

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

example/migrating/javalib/5-gradle-incomplete/build.mill

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
> git init .
66
> git remote add -f origin https://github.com/mockito/mockito.git
7-
> git checkout v5.19.0 # multi-module Java project that requires Java 17+
7+
> git checkout v5.19.0 # multi-module Java project that requires Java 11
8+
9+
> echo "17" > .mill-jvm-version # Gradle version in use requires Java 17
810

911
> ./mill init # imported modules are not fully functional
1012
converting Gradle build

integration/manual/migrating-gradle/src/MillInitMockitoTests.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ object MillInitMockitoTests extends GitRepoIntegrationTestSuite {
1414
test - integrationTest { tester =>
1515
import tester.*
1616

17+
// project requires Java 11 but Gradle version in use requires Java 17
18+
os.write(workspacePath / ".mill-jvm-version", "17")
19+
1720
eval("init", stdout = os.Inherit, stderr = os.Inherit).isSuccess ==> true
1821
eval(("resolve", "_"), stdout = os.Inherit, stderr = os.Inherit).isSuccess ==> true
1922

20-
// requires support for Java modules
23+
// requires javacOptions for Java modules
2124
eval("mockito-core.compile", stdout = os.Inherit, stderr = os.Inherit).isSuccess ==> false
2225
}
2326
}

0 commit comments

Comments
 (0)