### Compile Native Image with GraalVM Source: https://context7.com/crramirez/casciian-app-template/llms.txt Compiles the Casciian application into a native binary using GraalVM. This results in faster startup times and reduced memory usage. The process involves installing GraalVM and then using the `nativeCompile` Gradle task. Requires GraalVM Java 25. ```bash # Install GraalVM using SDKMAN curl -s "https://get.sdkman.io" | bash source "$HOME/.sdkman/bin/sdkman-init.sh" sdk install java 25.0.0.r25-graalce # Compile to native binary ./gradlew nativeCompile # Run the native executable ./build/native/nativeCompile/casciianapp ``` -------------------------------- ### Build DEB Package with Gradle and FPM Source: https://context7.com/crramirez/casciian-app-template/llms.txt Generates a Debian package (.deb) for the Casciian application, suitable for installation on Debian-based Linux systems. This process requires Ruby, RubyGems, and the `fpm` tool. The Gradle task `buildDeb` is used, and it depends on the native binary being compiled first. ```bash # Install packaging dependencies sudo apt-get install ruby ruby-dev build-essential sudo gem install fpm # Build DEB package (requires native binary) ./gradlew buildDeb # Install the package sudo dpkg -i build/distributions/deb/casciianapp_0.1.1-1_amd64.deb # Run the installed application casciianapp ``` -------------------------------- ### Build RPM Package with Gradle and FPM Source: https://context7.com/crramirez/casciian-app-template/llms.txt Creates an RPM package for the Casciian application, designed for installation on RPM-based Linux distributions like Fedora and CentOS. It requires Ruby, Ruby-devel, and `fpm`. The `buildRpm` Gradle task is used, and it assumes the native binary has already been compiled. ```bash # Install packaging dependencies (on Fedora/RHEL) sudo dnf install ruby ruby-devel rpm-build sudo gem install fpm # Build RPM package (requires native binary) ./gradlew buildRpm # Install the package sudo rpm -ivh build/distributions/rpm/casciianapp-0.1.1-1.x86_64.rpm # Run the installed application casciianapp ``` -------------------------------- ### Create Versioned Release with Gradle Source: https://context7.com/crramirez/casciian-app-template/llms.txt Automates the creation of versioned releases by bumping versions, creating Git tags, and building distribution artifacts. This process involves building the project, creating fat JARs, DEB and RPM packages, and preparing the next SNAPSHOT version. ```bash # Create a release (prompts for version) ./gradlew release # The release process will: # 1. Build the project # 2. Create fat JAR # 3. Build DEB and RPM packages # 4. Create Git tag (e.g., v0.1.1) # 5. Prepare next SNAPSHOT version ``` -------------------------------- ### Create a TUI Application with Casciian Source: https://context7.com/crramirez/casciian-app-template/llms.txt Demonstrates how to create a basic TUI application using the Casciian library. It extends TApplication, configures the terminal backend, adds UI components to a window, and launches the application. Dependencies include the Casciian library. ```java package io.github.crramirez.casciianapp; import casciian.TApplication; import casciian.TWindow; public class HelloWorld extends TApplication { public HelloWorld() throws Exception { // Initialize with XTERM backend for terminal rendering super(BackendType.XTERM); // Create a centered modal window (50x10 characters) TWindow window = addWindow("Hello World", 0, 0, 50, 10, TWindow.CENTERED | TWindow.MODAL | TWindow.NOCLOSEBOX); // Add UI components to the window int row = 1; window.addLabel("Hello World from Casciian!", 2, row++); window.addLabel("", 2, row++); window.addLabel("This is a simple TUI application", 2, row++); window.addLabel("built with the Casciian library.", 2, row++); // Add an exit button with keyboard shortcut (Alt+E) row++; window.addButton("&Exit", 2, row++, this::exit); } public static void main(String[] args) { try { HelloWorld app = new HelloWorld(); (new Thread(app)).start(); } catch (Exception e) { e.printStackTrace(); System.exit(1); } } } ``` -------------------------------- ### Build Fat JAR with Gradle Source: https://context7.com/crramirez/casciian-app-template/llms.txt Creates a self-contained 'fat' JAR file that includes all application dependencies. This simplifies distribution by providing a single executable file. The build command is `./gradlew jarFull`. ```bash # Build the fat JAR with all dependencies included ./gradlew jarFull # Run the fat JAR (no external dependencies needed) java -jar build/libs/casciianapp-0.1.1-SNAPSHOT-full.jar ``` -------------------------------- ### Build Standard JAR with Gradle Source: https://context7.com/crramirez/casciian-app-template/llms.txt Builds a standard executable JAR file for the Casciian application using Gradle. Requires Java 21+ and produces a JAR with the main class specified in the manifest. The output is typically found in `build/libs/`. ```bash # Build the JAR file ./gradlew clean build # Run the application via Gradle ./gradlew installDist ./build/install/casciianapp/bin/casciianapp # Or run directly with Java java -jar build/libs/casciianapp-0.1.1-SNAPSHOT.jar ``` -------------------------------- ### Build All Packages with Gradle Source: https://context7.com/crramirez/casciian-app-template/llms.txt Executes Gradle tasks to build both DEB and RPM packages for the Casciian application. This command conveniently generates both distribution formats. It requires the native binary to be compiled prior to execution. ```bash # Build both DEB and RPM packages ./gradlew buildPackages # Output locations: # - build/distributions/deb/casciianapp_0.1.1-1_amd64.deb # - build/distributions/rpm/casciianapp-0.1.1-1.x86_64.rpm ``` -------------------------------- ### Configure Gradle Build for Casciian App Source: https://context7.com/crramirez/casciian-app-template/llms.txt Configures the Gradle build for a Casciian TUI application using Java 21 toolchain. Key customizations include updating group, mainClass, and package metadata. It also integrates GraalVM native compilation and the release plugin. ```groovy // build.gradle - Key configuration sections plugins { id 'java' id 'application' id 'org.graalvm.buildtools.native' version '0.11.3' id 'net.researchgate.release' version '3.1.0' } group = 'io.github.crramirez' java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } application { mainClass = 'io.github.crramirez.casciianapp.HelloWorld' } dependencies { implementation 'io.github.crramirez:casciian:1.1' } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.