Aurora Devices

A Gradle plugin for installing and running RPM packages on Aurora OS emulators and devices.

Features

  • Install packages to emulators or devices
  • Run applications on emulators or devices
  • Run tests on emulators or devices

Configuration

auroraDevices {
    // Package configurations for device deployment
    packages {
        // Application package release
        create("release") {
            // Directory with built RPM packages
            directory.set(projectDir.toPath().resolve("build/rpm/release/{target}/RPMS/{target}"))
            // Target architectures (will replace {target} in directory path)
            targets.set(listOf("aarch64", "x86_64"))
            // Regex pattern for RPM files, default """(?!.*debug).*\.rpm"""
            // (?!.*debug) - excludes packages containing "debug" in name (debuginfo, debugsource)
            mask.set("""(?!.*debug).*\.rpm""")
            // Uninstall package after testing, default: false for applications
            uninstall.set(false)
        }
        // Application package debug
        create("debug") {
            // Directory with built RPM packages
            directory.set(projectDir.toPath().resolve("build/rpm/debug/{target}/RPMS/{target}"))
            // Target architectures (will replace {target} in directory path)
            targets.set(listOf("aarch64", "x86_64"))
            // Regex pattern for RPM files, default """(?!.*debug).*\.rpm"""
            mask.set("""(?!.*debug).*\.rpm""")
            // Uninstall package after testing, default: false for applications
            uninstall.set(false)
        }
        // Test package
        test {
            // Directory with built RPM packages
            directory.set(projectDir.toPath().resolve("build/rpm/test/{target}/RPMS/{target}"))
            // Target architectures (will replace {target} in directory path)
            targets.set(listOf("aarch64", "x86_64"))
            // Regex pattern for RPM files, default """(?!.*debug).*\.rpm"""
            mask.set("""(?!.*debug).*\.rpm""")
            // Uninstall package after testing, default: true for test packages
            uninstall.set(true)
        }
    }

    // Connection settings for all devices
    connection {
        // Connection timeout in seconds, default: 30
        timeout.set(30)
        // Number of retry attempts on failure, default: 3
        retryCount.set(3)
        // Delay between retries in milliseconds, default: 1000
        retryDelay.set(1000)
    }

    // Emulator configuration
    emulator {
        // Emulator host address, default: "localhost"
        host.set("localhost")
        // SSH user for emulator, default: "defaultuser"
        user.set("defaultuser")
        // SSH port for emulator, default: 2223
        port.set(2223)
        // Path to SSH private key, default: ~/.ssh/id_rsa
        sshKey.set(File(System.getProperty("user.home")).resolve("AuroraOS/vmshare/ssh/private_keys/sdk").toPath())
    }

    // Device configurations
    devices {
        // Local network device
        create {
            // Device IP address or hostname, default: "192.168.2.15"
            host.set("192.168.2.15")
            // SSH username, default: "defaultuser"
            user.set("defaultuser")
            // SSH port, default: 22
            port.set(22)
            // Path to SSH private key, default: ~/.ssh/id_rsa
            sshKey.set(File(System.getProperty("user.home")).resolve(".ssh/id_rsa").toPath())
        }

        // WiFi device
        create("wifi") {
            // Device IP address or hostname, default: "192.168.2.15"
            host.set("192.168.1.22")
            // SSH username, default: "defaultuser"
            user.set("defaultuser")
            // SSH port, default: 22
            port.set(22)
            // Path to SSH private key, default: ~/.ssh/id_rsa
            sshKey.set(File(System.getProperty("user.home")).resolve(".ssh/id_rsa").toPath())
        }
    }
}

Tasks

Aurora Devices tasks
--------------------
installDebugToDevice - Install Debug to Device.
installDebugToEmulator - Install Debug to Emulator.
installDebugToWifi - Install Debug to Wifi.
installReleaseToDevice - Install Release to Device.
installReleaseToEmulator - Install Release to Emulator.
installReleaseToWifi - Install Release to Wifi.
runDebugOnDevice - Install and run Debug on Device.
runDebugOnEmulator - Install and run Debug on Emulator.
runDebugOnWifi - Install and run Debug on Wifi.
runReleaseOnDevice - Install and run Release on Device.
runReleaseOnEmulator - Install and run Release on Emulator.
runReleaseOnWifi - Install and run Release on Wifi.
runTestOnDevice - Install and run Test on Device.
runTestOnEmulator - Install and run Test on Emulator.
runTestOnWifi - Install and run Test on Wifi.