Plugin to Build Vaadin Application with the Mill Build Tool

This is an experimental project to build Vaadin Applications with the Mill Build Tool.

Early stage

In this early stage we just try to build a Vaadin Application somehow. That means, we don’t follow design concepts typically used in Mill, but instead re-use some shared Vaadin Build Tooling (also used by latest Maven and Gradle plugins) and also use the same directory layout. This means, we can’t use Mills efficient up-to-date checking and caching capabilities.

The reason for this is easy: Vaadin used various tools and also often changes these tools. Some of these tools are simple not designed for being used in isolation (e.g. node/npm/pnpm), and other still have some hardcoded path.

Once we are able to build Vaadin applications in a robust way, I will try to move more and more parts into well-designed and isolated targets. This will be most likely a laborious and incremental path. Any contribution are very welcome!

Next steps

Separate development builds from production builds

The idea is to have two separated Mill modules, e.g. a prod submodule.

As development builds will closely work based on node.js, we will make these the default (and only) mode.

Production builds will be slower and don’t need to watch their sources for changes, so we can copy all relevant files to a dedicated location (prod sub-module), where we run the build in production mode.

Select Vaadin version

As Vaadin build plugins are highly coupled to their release version, we need to make the version configurable. This is already prepared in the worker, but currently the used version is fixed.

Download

Once, released, mill-vaadin will be available from Maven Central.

Usage

build.sc
import $ivy.`de.tototec::de.tobiasroeser.mill.vaadin::0.0.1`

import de.tobiasroeser.mill.vaadin.VaadinModule

object foo extends JavaModule with VaadinModule {

}

Configuration / Documentation

To stay compatible with Gradle and Maven, our Vaadin project should have the same src/main/{java,resources}-layout. For convenience, you can use mill.scalalib.MavenModule instead of (or in addition too) mill.scalalib.JavaModule (or for Scala: mill.scalalib.SbtModule for mill.scalalib.ScalaModule), which already used this layout.

To

License

This project is published under the Apache License, Version 2.0.

Supporters

The development of this plugin was initiated and sponsored by iba Consulting Gesellschaft mbH & Co KG.

Changelog

mill-vaadin 0.0.1 - 2022-09-21

Early development stage.

We just try to build a Vaadin Application somehow. That means, we don’t follow design concepts typically used in Mill, but instead re-use some shared Vaadin Build Tooling (also used by latest Maven and Gradle plugins) and also use the same directory layout. This means, we can’t use Mills efficient up-to-date checking and caching capabilities.