Menu

1 / 3

Build Your App Theme Without a Display Server

DEV Community: java·Shai Almog·about 18 hours ago
#7F7R1TJl
#devtojava#devto#dev#build#theme
Reading 0:00
15s threshold

A build container shouldn't need a pretend monitor to compile a stylesheet. Until now, parts of our CSS build path pulled in desktop machinery that made that a practical concern.

What is Codename One? Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at codenameone.com .

The CSS compiler now runs 100% headless . You can compile the same theme over SSH, in a container or on a CI worker without starting a display server or virtual framebuffer. This is Monday's build-tools installment of the weekly series .

Keep the output, remove the window

Codename One CSS is compiled into a resource file. The app loads theme.res ; it doesn't parse your stylesheet at runtime.

The compiler needs enough of the framework to construct fonts, convert some units and process images. Previously, reaching those APIs could bring desktop initialization along with them.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.