Aurora Build

Kotlin Multiplatform artifact build and run plugin for Aurora OS.

Features

  • Init sysroot
  • Build RPM package
  • Sign RPM package

Configuration

auroraBuild {
    // Targets configuration - mapping of KMP and Aurora OS targets
    targets {
        // aarch64 target for KMP, default: "linuxArm64"
        arm64.set("linuxArm64")
        // x86_64 target for KMP, default: "linuxX64"
        x64.set("linuxX64")
    }

    // SDK configuration for Aurora IDE/BT
    sdk {
        // Path to Aurora SDK, default: ~/AuroraOS
        path.set(File(System.getProperty("user.home")).resolve("AuroraOS").toPath())
        // Docker image name:tag, default search: *aurora-build-tools*
        image.set("aurora-build-tools-keygenqt:5.2.0.180")
    }

    // RPM package configuration
    rpm {
        // Application ID, default: "ru.auroraos.demo"
        id.set("ru.auroraos.demo.cmp")
        // Application name, default: "Demo executable"
        name.set("Demo CMP")
        // Application description, default: "Demo application KMP."
        description.set("Demo application Compose Multiplatform.")
        // Package version, default: "0.0.1"
        version.set("0.0.1")
        // Package release number, default: "1"
        releaseNumber.set("1")
        // Package license, default: "BSD 3-Clause"
        license.set("BSD 3-Clause")
        // Permissions for desktop file, default: emptyList()
        permissions.set(listOf("Internet"))
        // 3rd party dependencies, default: emptyList()
        libs3rdParty.set(listOf("maliit-glib"))
        // Extra soname prefixes to exclude from auto-detected dependencies, default: emptyList()
        requiresExclude.set(listOf("libfoo"))
        // Path to icons (optional) - if not provided, default icons will be generated
        icons.set(projectDir.toPath().resolve("icons"))
        // Validate package after build, default: true
        validate.set(true)
        // Sign package open keys, default: true
        sign.set(true)
        // Orientations for desktop file (can be omitted)
        orientation {
            // Allowed orientations for all screens (can be omitted)
            default.set(listOf(Orientation.Portrait))
            // Allowed orientations for small screens (can be omitted)
            small.set(listOf(Orientation.Portrait))
            // Allowed orientations for medium screens (can be omitted)
            medium.set(listOf(Orientation.Portrait))
            // Allowed orientations for large screens (can be omitted)
            large.set(listOf(Orientation.Landscape))
            // Allowed orientations for extra large screens (can be omitted)
            extraLarge.set(listOf(Orientation.Landscape))
        }
        // Extra pre-built files/directories at arbitrary standard RPM paths (can be omitted).
        // RpmMacro constants stringify to the literal "%{macro}" form - build the rest of the
        // destination path yourself with a plain string.
        extraFiles {
            // Single file, renamed at destination, default mode 0644
            from(file("assets/lib.so")) into "${RpmMacro.LibDir}/myapp/plugins/plugin.so"
            // Single file with an explicit mode override
            from(file("assets/second-executable")) into "${RpmMacro.LibExecDir}/myapp/second-executable" mode "0755"
            // Whole directory tree, structure and names preserved
            from(file("assets/configs")) into "${RpmMacro.DataDir}/myapp/configs"
            // Resolved per target architecture (e.g. assets/aarch64/lib.so vs assets/x86_64/lib.so)
            from { arch -> file("assets/${arch.key}/lib.so") } into "${RpmMacro.LibDir}/myapp/lib.so"
        }
    }
}

Tasks

Aurora Build tasks
------------------
buildDebugPackageLinuxArm64 - Create debug rpm package aarch64 for linuxArm64.
buildDebugPackageLinuxX64 - Create debug rpm package x86_64 for linuxX64.
buildDebugPipeline - Complete debug pipeline: init → link → package.
buildReleasePackageLinuxArm64 - Create release rpm package aarch64 for linuxArm64.
buildReleasePackageLinuxX64 - Create release rpm package x86_64 for linuxX64.
buildReleasePipeline - Complete release pipeline: init → link → package.
initSysroot - Create sysroot directory and symlinks for project.