Skip to content

Add ability to select Java versions on a per-module basis (1000USD bounty) #3480

@lihaoyi

Description

@lihaoyi

From the maintainer Li Haoyi: I'm putting a 1000USD bounty on this issue, payable by bank transfer on a merged PR implementing this.


Currently Mill just uses the global Java for everything, which is not ideal: many projects have different parts that require different Java versions. e.g. Mockito has a submodule that requires Java 21 https://github.com/mockito/mockito/tree/main/subprojects/java21-test, and of course Mill itself has different parts targetting different versions (e.g. half our thirdparty tests run on 11, half run on 17). Currently we get by with separate jobs on Github Actions, but that's clunky and annoying to work with since it doesn't reproduce locally.

Ideally we should be able to specify Java versions on a per-module basis, which Mill will download and cache as necessary to run those specific modules. As JVM downloads can be expensive, it is probably worth caching things globally (probably the same place we cache the Mill assembly jar?) rather than caching them in the out/ folder of each project

Gradle has something like this (https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation), and it feels like it would be very useful for Mill as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    bountyThe fix/close of this issue is rewarded with a bounty

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions