Gradle DSL reference
Every property and sub-block of the nucleus { } Gradle extension, verified against the plugin source.
The Nucleus Gradle plugin (id("dev.nucleusframework")) exposes a single top-level extension, nucleus, for configuring packaging, signing, publishing, and GraalVM native builds from Kotlin. It builds on the JetBrains Compose Desktop DSL and adds Nucleus-specific formats, signing surfaces, and GraalVM settings. This page lists every property in the order it appears in the plugin source.
Top-level: nucleus { }
dev.nucleusframework.NucleusExtension:
val application: JvmApplication— JVM app configuration (nucleus { application { … } }).val nativeApplication: NativeApplication— Kotlin/Native macOS targets.val dependencies: NucleusPlugin.Dependencies— runtime module coordinates and notations.
application { } — JvmApplication
from(SourceSet)/from(KotlinTarget)disableDefaultConfiguration()dependsOn(vararg tasks: Task | String)fromFiles(vararg files: Any)var mainClass: String?val mainJar: RegularFilePropertyvar javaHome: Stringval args: MutableList<String>/args(vararg args: String)val jvmArgs: MutableList<String>/jvmArgs(vararg jvmArgs: String)val nativeDistributions: JvmApplicationDistributions— see belowval buildTypes: JvmApplicationBuildTypesval graalvm: GraalvmSettings— see GraalVM
nativeDistributions { } — JvmApplicationDistributions
| Property | Type | Notes |
|---|---|---|
modules: ArrayList<String> | — | Defaults: java.base, java.desktop, java.logging, java.net.http, jdk.accessibility, jdk.crypto.ec |
var includeAllModules: Boolean | — | Bundle every JDK module |
var cleanupNativeLibs: Boolean | — | Strip non-target native libs |
var splashImage: String? | — | Splash image path |
var enableAotCache: Boolean | — | JDK 25+ AOT cache |
var artifactName: String | default "${name}-${version}-${os}-${arch}.${ext}" | Output template |
var compressionLevel: CompressionLevel? | — | Store, Normal, Maximum |
val trustedCertificates: ConfigurableFileCollection | — | CA certificates → bundled JDK cacerts (see trusted certs) |
val protocols: MutableList<UrlProtocol> | — | Deep-link protocols |
targetFormats: … | inherited | The 18 target formats |
val linux: LinuxPlatformSettings | — | See Linux |
val macOS: JvmMacOSPlatformSettings | — | See macOS |
val windows: WindowsPlatformSettings | — | See Windows |
val publish: PublishSettings | — | See publish |
Methods:
fun fileAssociation(mimeType, extension, description, linuxIconFile?, windowsIconFile?, macOSIconFile?)fun protocol(name, vararg schemes)- Common (from
AbstractPlatformSettings):iconFile,packageVersion,fileAssociation(...)
TargetFormat enum
18 formats, in source order:
RawAppImage, Pkg, Deb, Rpm, Dmg, Exe, Msi, Nsis, NsisWeb, Portable, AppX, AppImage, Pacman, Snap, Flatpak, Zip, Tar, SevenZ.
RawAppImage is the intermediate jpackage app-image; every other format is produced by electron-builder. Pkg, AppX, and Flatpak are store formats and require sandboxing.
macOS { } — JvmMacOSPlatformSettings
Extends AbstractMacOSPlatformSettings. Identification:
packageName: String?,packageVersion,packageBuildVersiondmgPackageVersion,dmgPackageBuildVersion,pkgPackageVersion,pkgPackageBuildVersiondockName: String?,setDockNameSameAsPackageName: Boolean = truebundleID: String?,appCategory: String?,minimumSystemVersion: String?installationPath: String? = null— macOS install location; when unset the build defaults it to/ApplicationsiconFile,layeredIconDir(macOS 26+.icondirectory)
Signing and sandbox:
entitlementsFile: RegularFileProperty,runtimeEntitlementsFileprovisioningProfile: RegularFileProperty,runtimeProvisioningProfilesigning { … }— see Signingnotarization { … }— see Notarization
macOS 26:
macOsSdkVersion: String? = "26.0"—vtoolpatches the launcher Mach-OLC_BUILD_VERSIONto gate Liquid Glass at SDK 26.
Composition:
launchAgents { agent(plistName) { bundleProgram; arguments; startInterval } }infoPlist { extraKeysRawXml }dmg { … }— see DMG
macOS.signing { } — MacOSSigningSettings
sign: Property<Boolean>(defaultfalse)identity: Property<String>keychain: Property<String>prefix: Property<String>
macOS.notarization { } — MacOSNotarizationSettings
Three mutually exclusive modes:
- Apple ID:
appleID,password,teamID notarytoolkeychain profile:keychainProfile, optionalkeychainPath- App Store Connect API key:
apiKey,apiKeyId,apiIssuer
macOS.dmg { } — DmgSettings
title: String?,iconSize: Int?,iconTextSize: Int?format: DmgFormat?(UDRW,UDRO,UDCO,UDZO,UDBZ,ULFO)size: String?,shrink: Boolean?,sign: Booleanbackground: RegularFileProperty,backgroundColor: String?icon: RegularFileProperty,badgeIcon: RegularFilePropertywindow { x; y; width; height }content(x, y, type: DmgContentType?, name: String?, path: String?)—DmgContentTypeisFile,Link,Dir
windows { } — WindowsPlatformSettings
iconFile,packageNameconsole: Boolean,dirChooser: Boolean,perUserInstall: Booleanshortcut,menu,menuGroupupgradeUuid: String?,msiPackageVersion,exePackageVersionnsis { … }— see NSISappx { … }— see AppXsigning { … }— see Signing
windows.nsis { } — NsisSettings
oneClick: BooleanallowElevation: Boolean,perMachine: BooleanallowToChangeInstallationDirectory: BooleancreateDesktopShortcut: Boolean,createStartMenuShortcut: BooleanrunAfterFinish: Boolean,deleteAppDataOnUninstall: BooleanmultiLanguageInstaller: Boolean,installerLanguages: List<String>installerIcon,uninstallerIcon,installerHeader,installerSidebarlicense,script,includeScript
windows.appx { } — AppXSettings
applicationId,publisherDisplayName,displayName,publisher,identityNamelanguages: List<String>backgroundColor: String?,showNameOnTiles: BooleanstoreLogo,square44x44Logo,square150x150Logo,wide310x150LogominVersion: String?,maxVersionTested: String?addAutoLaunchExtension: Boolean,setBuildNumber: Boolean
windows.signing { } — WindowsSigningSettings
enabled: BooleancertificateFile,certificatePassword,certificateSha1,certificateSubjectNamealgorithm: SigningAlgorithm(Sha1,Sha256,Sha512)timestampServer: String?- Azure Artifact Signing:
publisherName,azureTenantId,azureEndpoint,azureCertificateProfileName,azureCodeSigningAccountName
linux { } — LinuxPlatformSettings
iconFile,shortcut: Boolean,packageName,packageVersionappRelease: String?,appCategory: String?,menuGroup: String?startupWMClass: String?debMaintainer: String?,debPackageVersion,debDepends: List<String>rpmLicenseType: String?,rpmPackageVersion,rpmRequires: List<String>pacmanPackageVersion: String?,pacmanDepends: List<String>— for thePacman(Arch Linux) targetappImage { … }— see AppImagesnap { … }— see Snapflatpak { … }— see Flatpaksigning { … }— see Signing
linux.signing { } — LinuxSigningSettings
GPG-signs DEB/RPM for distribution outside a store. See Code signing.
enabled: Property<Boolean>(defaultfalse)keyId: Property<String>— GPG key id, fingerprint or emailkeyFile: RegularFileProperty— ASCII-armored private key, imported into a throwaway keyring (optional if the key is already in the signing keyring)passphrase: Property<String>debMethod: DebSignMethod(defaultDetached; alsoDpkgSig,Debsig)silentUpdate: Property<Boolean>(defaultfalse) — passwordless signature-verified self-update; requiresenabled. See passwordless updates.
Defaults read from compose.desktop.linux.sign and compose.desktop.linux.signing.{keyId,keyFile,passphrase,silentUpdate}.
linux.appImage { } — AppImageSettings
category: AppImageCategory?(AudioVideo,Development,Education,Game,Graphics,Network,Office,Science,Settings,System,Utility)genericName: String?,synopsis: String?desktopEntries: Map<String, String>
linux.snap { } — SnapSettings
confinement: SnapConfinement(defaultStrict; alsoClassic,Devmode)grade: SnapGrade(defaultStable; alsoDevel)summary: String?,base: String?plugs: List<SnapPlug>— 11 defaultsautoStart: Booleancompression: SnapCompression?(Xz,Lzo)
SnapPlug: Desktop, DesktopLegacy, Home, X11, Wayland, Unity7, BrowserSupport, Network, NetworkBind, Gsettings, AudioPlayback, AudioRecord, Opengl, RemovableMedia, Cups.
linux.flatpak { } — FlatpakSettings
runtime: String = "org.freedesktop.Platform"runtimeVersion: String = "23.08"sdk: String = "org.freedesktop.Sdk"branch: String = "master"finishArgs: List<String>— defaults:--share=ipc,--socket=x11,--socket=wayland,--socket=pulseaudio,--device=drilicense: RegularFileProperty
publish { } — PublishSettings
publishMode: PublishMode(Never,Auto,Always)github { enabled, owner, repo, token, channel, releaseType }s3 { enabled, bucket, region, path, acl }generic { enabled, url, channel, useMultipleRangeRequest }
ReleaseChannel: Latest, Beta, Alpha.
ReleaseType: Release, Draft, Prerelease.
GraalVM — GraalvmSettings
isEnabled: Property<Boolean>(defaultfalse)javaLanguageVersion: Property<Int>(default25)jvmVendor: Property<JvmVendorSpec>imageName: Property<String>march: Property<String>(default"native")buildArgs: ListProperty<String>nativeImageConfigBaseDir: DirectoryPropertyval macOS: GraalvmMacOSSettings—cStubsSrc,minimumSystemVersion = "12.0",macOsSdkVersion = "26.0"val windows: GraalvmWindowsSettings:bundleCRuntime: Property<Boolean> = true— copy the MSVC runtime DLLs next to the native.exedlls: ListProperty<String>— defaults:vcruntime140.dll,vcruntime140_1.dll,msvcp140.dllsourceDir: DirectoryProperty— directory the DLLs are copied from (defaults to the GraalVM toolchainbin)
val metadataRepository: MetadataRepositorySettings:enabled: Boolean = trueversion: String = "0.10.6"excludedModules: SetProperty<String>moduleToConfigVersion: MapProperty<String, String>
Native app — NativeApplication
Currently macOS Kotlin/Native only.
targets(vararg targets: KotlinTarget)— must beKotlinNativeTargetonFamily.OSXval distributions: NativeApplicationDistributions
Annotations
@ExperimentalNucleusLibrary— opt-in marker for unstable plugin DSL surface.
Other types
class FileAssociation(mimeType, extension, description, iconFile?)class UrlProtocol(name, schemes: List<String>)class LaunchAgentSettingsclass JvmApplicationBuildTypesclass ProguardSettingsenum class CompressionLevelenum class SigningAlgorithmenum class ReleaseType,enum class ReleaseChannel,enum class PublishModeenum class SnapGrade,enum class SnapConfinement,enum class SnapCompressionenum class AppImageCategoryenum class DmgFormat,enum class DmgContentType
Notes
The plugin injects a nucleus/nucleus-app.properties resource into the packaged app containing app.id, app.version, app.vendor, app.aumid, startup.task.id, and similar keys. The NucleusApp runtime object reads these at startup, which is how the DSL configuration reaches the runtime library.
What's next
- Configuration — the
nucleus { }DSL in a working build script. - Packaging formats — what each
TargetFormatproduces. - Code signing — the macOS, Windows, and Linux signing blocks.
- Publishing — the
publish { }block and release channels.