-
Notifications
You must be signed in to change notification settings - Fork 33
Home
A Gradle Plugin to create a Mac OSX .app application based on the project.
Version 2.3.0 released 27 November 2018.
Now available via the Gradle Plugin Portal. Please see: http://plugins.gradle.org/plugin/edu.sc.seis.macAppBundle
To add to a gradle project, add this to build.gradle and run gradle createApp or gradle createDmg. The first should work on most systems, the second will only work on Mac OSX as it uses hdiutils which is a Mac-only application. Also see the Wiki for more information.
As of version 1.0.9, the macappbundle is available from mavenCentral, which fixes an issue with downloads no longer working in Gradle from code.google.com. The groupId and artifactId have also changed to edu.sc.seis.gradle and macappbundle.
For gradle 2.1 or later:
plugins {
id "edu.sc.seis.macAppBundle" version "2.3.0"
}
apply plugin: 'macAppBundle'
macAppBundle {
mainClassName = "com.example.myApp.Start"
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'edu.sc.seis.gradle:macappbundle:2.3.0'
}
}
To run this plugin from Github, for testing before a release:
git checkout https://github.com/crotwell/gradle-macappbundle.git
cd gradle-macappbundle
gradle publishToMavenLocal
and then in your project's build.gradle, updating the version as needed:
buildscript {
repositories {
maven {
url 'file:<yourHomeDirectory>/.m2/repository'
}
}
dependencies {
classpath 'edu.sc.seis:macAppBundle:2.3.0-SNAPSHOT'
}
}
apply plugin: "edu.sc.seis.macAppBundle"
macAppBundle {
mainClassName = "com.example.myApp.Start"
}