All Projects → mini2Dx → parcl

mini2Dx / parcl

Licence: MIT license
Gradle plugin for bundling your Java application for distribution on Windows, Mac and Linux

Programming Languages

groovy
2714 projects
C#
18002 projects
java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to parcl

mem64
Run Any Native PE file as a memory ONLY Payload , most likely as a shellcode using hta attack vector which interacts with Powershell.
Stars: ✭ 26 (-50%)
Mutual labels:  native, executable
Nexe
🎉 create a single executable out of your node.js apps
Stars: ✭ 10,565 (+20217.31%)
Mutual labels:  bundle, executable
basgo
basgo compiles BASIC-lang to Golang. Then 'go build' can translate code to native executable binary.
Stars: ✭ 31 (-40.38%)
Mutual labels:  native, executable
Gradle Launch4j
A gradle-plugin to create windows executables with launch4j
Stars: ✭ 177 (+240.38%)
Mutual labels:  executable, gradle-plugin
Javapackager
📦 Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.
Stars: ✭ 285 (+448.08%)
Mutual labels:  native, gradle-plugin
CoSky
High-performance, low-cost microservice governance platform. Service Discovery and Configuration Service | 高性能、低成本微服务治理平台
Stars: ✭ 57 (+9.62%)
Mutual labels:  native
bundlemon
Monitor your bundle size
Stars: ✭ 53 (+1.92%)
Mutual labels:  bundle
wasm-joey
Serverless Wasm - A lightweight Node.js application for deploying and executing WebAssembly(Wasm) binary-code via HTTP
Stars: ✭ 48 (-7.69%)
Mutual labels:  executable
extra-java-module-info
A Gradle 6.4+ plugin to use legacy Java libraries as Java Modules in a modular Java project
Stars: ✭ 39 (-25%)
Mutual labels:  gradle-plugin
laboratory
Feature flags for multi-module Kotlin Android projects
Stars: ✭ 71 (+36.54%)
Mutual labels:  gradle-plugin
gradle-git-versioning-plugin
This extension will set project version, based on current Git branch or tag.
Stars: ✭ 44 (-15.38%)
Mutual labels:  gradle-plugin
imgui-java
JNI based binding for Dear ImGui
Stars: ✭ 270 (+419.23%)
Mutual labels:  native
androidNativeBundle
a gradle plugin that support publish c/c++ headers to 'aar' and depend those 'aar'
Stars: ✭ 60 (+15.38%)
Mutual labels:  gradle-plugin
rust-cloud-native.github.io
A curated list of awesome Cloud Native Rust frameworks, libraries and software
Stars: ✭ 212 (+307.69%)
Mutual labels:  native
get-bin-path
Get the current package's binary path
Stars: ✭ 25 (-51.92%)
Mutual labels:  executable
lexik-jose-bridge
An Encoder for the LexikJWTAuthenticationBundle that uses web-token/jwt-framework
Stars: ✭ 27 (-48.08%)
Mutual labels:  bundle
kfc-plugins
Kotlin/JS Fast Configuration
Stars: ✭ 37 (-28.85%)
Mutual labels:  gradle-plugin
go-astilectron-bundler
Bundle your Astilectron app with ease
Stars: ✭ 117 (+125%)
Mutual labels:  bundle
FCMBundle
A Bundle for Symfony projects to send notifications in mobile devices through Firebase Cloud Messaging API
Stars: ✭ 43 (-17.31%)
Mutual labels:  bundle
ti.playservices
Titanium module for Google Play Services
Stars: ✭ 19 (-63.46%)
Mutual labels:  native

parcl

Build Status

Gradle plugin for bundling your Java application as Windows, Mac and Linux native applications

The plugin can generate the following platform natives:

  • Windows - .exe
  • Mac OS X - .app
  • Linux - .sh script

Future releases may add more native formats.

How to use

Add the following buildscript configuration to the top of your build.gradle

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath group: 'org.mini2Dx', name: 'parcl', version: '1.8.0'
    }
}

Then add the plugin to your project, configuration for your main class and how you want parcl to bundle the application. The following shows the minimum required configuration.

project(":projectName") {
   apply plugin: "java"
   apply plugin: "application"
   apply plugin: "org.mini2Dx.parcl"
   
   ........

   mainClassName = "com.example.MyMainClass"

   parcl {
      exe {
         exeName = "myapplication"
      }
		
      app {
         appName = "My Application"
         icon = "relative/path/to/icon.icns"
         applicationCategory = "public.app-category.adventure-games"
         displayName = 'My Application'
         identifier = 'com.example.my.apple.identifier'
         copyright = 'Copyright 2015 Your Name Here'
      }
		
      linux {
         binName = "myapplication"
      }
   }
}

Note: If your version of Gradle gives an error regarding mainClassName, the following workaround has been reported to resolve it:

project(":projectName") {
   apply plugin: "java"
   apply plugin: "application"
   apply plugin: "org.mini2Dx.parcl"
   
   ........

   project.getConvention().getPlugin(ApplicationPluginConvention.class).setMainClassName("com.example.MyMainClass")

The plugin will add a task called 'bundleNative' to your project. This must be invoked on the platform you wish to bundle the application for, i.e. You must be on Mac OS X to bundle a Mac application.

gradle clean build bundleNative

Depending on your platform, the resulting application bundle will appear in build/windows, build/mac or build/linux.

Tasks

Task Description
bundleNative Generates the native application for the current platform
bundleNativeZip Generates the native application and packages it into a .zip

Advanced Configuration

There are several optional configuration parameters for each platform.

Optional Parameter Description Example
zipName Specifies the name for the outputted zip file zipName = 'my-game-windows.zip'
vmArgs Passes JVM options to the application on launch vmArgs = ["-Xmx1g"]
appArgs Passes application arguments to the application on launch appArgs = ["arg1", "arg2"]
withJre Copies your local JRE and bundles it with the application. The value of $JAVA_HOME must be passed as an argument. withJre("/usr/lib/jvm/java-8-oracle/")

The following example shows all options in use.

mainClassName = "com.example.MyMainClass"

parcl {
  exe {
    vmArgs = ["-Xmx1g"]
    appArgs = ["arg1", "arg2"]
    exeName = "myapplication"
    zipName = 'my-game-windows.zip'
			
    withJre("C:\\Program Files (x86)\\Java\\jdk1.8.0_25\\jre")
  }
		
  app {
    vmArgs = ["-Xmx1g"]
    appArgs = ["arg1", "arg2"]
    appName = "My Application"
    icon = "relative/path/to/icon.icns"
    applicationCategory = "public.app-category.adventure-games"
    displayName = 'My Application'
    identifier = 'com.example.my.apple.identifier'
    copyright = 'Copyright 2015 Your Name Here'
    zipName = 'my-game-mac.zip'

    withJre("/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home")
  }
		
  linux {
    vmArgs = ["-Xmx1g"]
    appArgs = ["arg1", "arg2"]
    binName = "myapplication"
    preferSystemJre = true
    zipName = 'my-game-linux.zip'
			
    withJre("/usr/lib/jvm/java-8-oracle/")
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].