Giter Club home page Giter Club logo

setupbuilder's Introduction

Gradle Setup Builder Plugin

Build Status License

The Setup Builder is a plugin for Gradle which can create a native setups for different platforms like Windows, Linux and OSX. The output is a *.msi, a *.deb, a *.rpm or a *.dmg file. The target is an installer for Java applications.

System Requirements

Platform Requirement
all Java 8 or higher. Gradle must run with Java 8
Windows Wix Toolset or WixEdit must be installed
Linux Lintian, FakeRoot
on Ubuntu: apt-get install lintian fakeroot
Linux dpkg for creating Debian packages: apt-get install dpkg
Linux rpm for creating RPM packages: apt-get install rpm

Plugin and Gradle Version

Plugin Version Gradle Version
<= 1.5 2.3 - 2.11
1.6 2.12 - 2.13
1.7 2.14
1.8, 3.0.x 3.0
3.1.x 3.1 - 3.3
3.4.x 3.4 - 4.3
4.5.x >= 4.5

There is a file SetupBuilderVersion.gradle to export the required version of SetupBuilder depending on the Gradle version. It can be used to automatically obtain the correct SetupBuilder version.

It can be used as followed:

buildscript {
    repositories {
        maven {
            url uri('https://plugins.gradle.org/m2/')
        }
    }
    dependencies {
        apply from: 'https://raw.githubusercontent.com/i-net-software/SetupBuilder/master/scripts/SetupBuilderVersion.gradle'
        classpath 'gradle.plugin.de.inetsoftware:SetupBuilder:' + setupBuilderVersion()
    }
}
apply plugin: 'de.inetsoftware.setupbuilder'

Tasks

The plugin adds the following tasks:

  • msi
  • deb
  • rpm
  • dmg

For more information check the wiki.

Sample Usage

Base Sample

buildscript {
    repositories {
        maven {
            url uri('https://plugins.gradle.org/m2/')
        }
    }
    dependencies {
        apply from: 'https://raw.githubusercontent.com/i-net-software/SetupBuilder/master/scripts/SetupBuilderVersion.gradle'
        classpath 'gradle.plugin.de.inetsoftware:SetupBuilder:' + setupBuilderVersion()
    }
}
apply plugin: 'de.inetsoftware.setupbuilder'

setupBuilder {
    vendor = 'i-net software'
    application = "SetupBuilder Plugin"
    appIdentifier = "SetupBuilder"
    version = '1.0'
    licenseFile = 'license.txt'
    // icons in different sizes for different usage. you can also use a single *.ico or *.icns file
    icons = ['icon16.png', 'icon32.png', 'icon48.png', 'icon128.png']
    // all files for all platforms
    from( 'source' ) {
        include 'files/*.jar'
    }
    bundleJre = 1.8
}

msi {
    // files only for the Windows platform
    from( 'windows' ) {
        include 'foo.exe'
        rename { 'bar.exe' }
    }
}

More samples can be found in the testBuilds folder of the project.

More properties can be found in the sources of setupBuilder, msi, deb, rpm and dmg.

Zip Sample

Create a zip file with the same files define in setupBuilder extension.

...
setupBuilder {
    ...
}
task zip(type: Zip) {
    with setupBuilder
    doLast {
        artifacts {
            archives zip
        }
    }
}

License

Apache License, Version 2.0

setupbuilder's People

Contributors

arichnad avatar gamma avatar horcrux7 avatar micheljung avatar sheidrich-inet avatar sheidrich1978 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.