GithubHelp home page GithubHelp logo

crotwell / gradle-macappbundle Goto Github PK

View Code? Open in Web Editor NEW
94.0 94.0 33.0 248 KB

A Gradle Plugin to create a Mac OSX .app application and dmg based on the project.

License: Apache License 2.0

Groovy 63.81% Shell 36.19%

gradle-macappbundle's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gradle-macappbundle's Issues

backgroundImage option fails on osascript when project path contains spaces

Hi Crotwell,

When I try to enable backgroundImage (to have /Application link) the macAppBundle task fails on osascript with the following error:

> Problem running applescript to set dmg background image: 1 335:336: syntax error: Expected „,” or „}”, but found „:”. (-2741)

I was able to dump what is being sent to osascript:

   tell application "Finder"                                                                                                                                                     
     tell disk "example-1.0.1"                                                                                                                                           
           open                                                                                                                                                                  
           set current view of container window to icon view                                                                                                                     
           set toolbar visible of container window to false                                                                                                                      
           set statusbar visible of container window to false                                                                                                                    
           set the bounds of container window to { 0, 0, pixelWidth:, pixelHeight: }                                                                                             
           set the position of the container window to {400, 100}                                                                                                                
           set viewOptions to the icon view options of container window                                                                                                          
           set arrangement of viewOptions to not arranged                                                                                                                        
           set icon size of viewOptions to 72                                                                                                                                    
           set background picture of viewOptions to file ".background:dmg-bg.png"                                                                                                
           set position of item "Example.app" of container window to { 160, 205 }                                                                                        
           set position of item "Applications" of container window to { 360, 205 }                                                                                               
           close                                                                                                                                                                 
           open                                                                                                                                                                  
           update without registering applications                                                                                                                               
           delay 2                                                                                                                                                               
        end tell                                                                                                                                                                 
     end tell

Apparently, the invocation of sips in MacAppBundlePlugin#createCopyBackgroundImageTask may return unexpected number of separators and tokenize()[2] may hit at wrong fragment resulting in "pixelWidth:" and "pixelHeight:" being sent to osascript. This will happen when the project is on the path which contains spaces (for example: /Users/doe/my projects/project) and the image path given to sips is also printed and it interferes with tokenizer.

I would suggest to replace:

imageWidth = imageWidth.tokenize()[2];

with:

imageWidth = imageWidth.tokenize().last();

if you still want to use tokonize for it.

Pull request provided.

Versions:

  • macappbundle: 2.1.9
  • macOS: Sierra, 10.12.6
  • sips: 10.4.4
  • Gradle: 4.1

Deprecated dynamic properties

I'm not able to configure the properties using Gradle 1.4. I also tried 1.3 and 
1.2, with similar results. Is there a specific version of Gradle I should be 
using, or is there an error in my script? 

What steps will reproduce the problem?

apply plugin: 'java'

sourceCompatibility = 1.6
version = '0.1'

dependencies {
    compile fileTree(dir: 'lib', include: '**/*.jar')
    runtime fileTree(dir: 'lib', include: '**/*.jar')
}

jar {
    manifest {
        attributes 'Implementation-Title': 'TestSketch',
                   'Implementation-Version': version
    }
}

apply plugin: 'macAppBundle'

macAppBundle {
    appName = "TestApp"
    mainClassName = "gui.TestSketch"
}

buildscript {
    repositories {
        ivy {
            artifactPattern 'http://gradle-macappbundle.googlecode.com/files/[module]-[revision]
.[ext]'
        }
    }

    dependencies {
        classpath 'edu.sc.seis:gradle-macappbundle:1.0.4'
    }
}


What is the expected output? What do you see instead?

I expected to find a build/macApp/TestSketch.app file. Instead there is a 
build/macApp/gridmon.app and nothing happens when I launch it. Here is the 
build output:

Creating properties on demand (a.k.a. dynamic properties) has been deprecated 
and is scheduled to be removed in Gradle 2.0. Please read 
http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtensi
on.html for information on the replacement for dynamic properties.
Deprecated dynamic property: "appName" on "root project 'gridmon'", value: 
"TestApp".
:copyStub
Deprecated dynamic property: "dest" on "task ':copyStub'", value: 
"/Users/tester1/dev/ja...".
Deprecated dynamic property: "outStream" on "task ':copyStub'", value: 
"java.io.BufferedOutput...".
Deprecated dynamic property: "buf" on "task ':copyStub'", value: "[B@a62812d".
Deprecated dynamic property: "inStream" on "task ':copyStub'", value: 
"sun.net.www.protocol.j...".

What version of the product are you using? On what operating system?
1.0.4, tried with Gradle 1.2, 1.3 and 1.4. 

Original issue reported on code.google.com by [email protected] on 4 Feb 2013 at 7:39

Support code signing

Since this is so important now for OSX 10.8, it would be nice if this plugin 
supported it. We need to:

1. Rename JavaApplicationStub to the name of the .app
2. Take a key from the keystore and sign the app

Original issue reported on code.google.com by [email protected] on 10 Sep 2012 at 6:20

JDK 10 is not bundled

I am trying to bundle a JavaFX application for macOS using JDK 10, Gradle 4.6.0 and plugin version 2.2.1.
When bundleJRE = false, everything seems to work and I can start the app (because JDK 10 is installed locally). When set to true, the JDK doesn't seem to be bundled to the app unfortunately, so starting the app results in a JRELoadError.

The corresponding directory in the app bundle is empty:
bildschirmfoto 2018-04-09 um 17 14 41

What am I missing here?

Deprecation warning with Gradle 4.0-rc-1

The following deprecation warning is generated with Gradle 4.0-rc-1:

Using a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0
	at edu.sc.seis.macAppBundle.MacAppBundlePlugin.apply(MacAppBundlePlugin.groovy:84)
	at edu.sc.seis.macAppBundle.MacAppBundlePlugin.apply(MacAppBundlePlugin.groovy)

Output above is generated with --stacktrace option, grepping the stacktrace elements on edu.
Otherwise the given location is the place in build.gradle where the plugin is applied.

Subproject evalutation and executing project.afterEvaluate{}

A recursive task search in plugin.apply causes early evaluation of subprojects.

I was having an issue in a multiproject build where a subproject's app was not copying lib jars into the .app.

Finally, I tracked down the cause. The following block in MacAppBundle.groovy needs to be put inside a project.afterEvaluate block:

 if (Os.isFamily(Os.FAMILY_MAC)) {
    project.getTasksByName("assemble", true).each{ t -> t.dependsOn(dmgTask) }
} else {
    project.getTasksByName("assemble", true).each{ t -> t.dependsOn(zipTask) }
}

Putting this inside an afterEvaluate solved all my problems. I guess the recursive task search forces an early evaluation of subprojects. Then when addCopyToLibTask() is called this block doesn't get called in the subproject since its already evaluated.

project.afterEvaluate {
            task.with configureDistSpec(project)
        }

My solution feels like more of a workaround though. Shouldn't gradle execute project.afterEvaluate blocks for projects that were already evaluated before? I did a lot of testing and it seems that afterEvaluate must be called before the project is evaluated...

allow specifying explicit keychain file for codesign

when using gradle/macappbundle together with continuous integration tools like 
Jenkins it is preferred to use a custom keychain instead of the default.

the codesign documentation specifies an additional parameter (--keychain) to 
allow that.

Is it possible to add that extra parameter to the macappbundle plugin?
Thanks
Marcin

Original issue reported on code.google.com by [email protected] on 2 Oct 2012 at 12:42

generated plist doesn't support types

1. configure macAppBunder with
javaExtras.put("StartOnMainThread", true)
2. generate plist

I expect the output to be
<key>StartOnMainThread</key>
<true/>

instead I see
<key>StartOnMainThread</key>
<string>true</string>

I'm using the latest build from maven on mac os x 10.9 with gradle 1.8

doValue(...)  in GenerateInfoPlistTask.groovy turns everything into a <string> 
element, and shouldn't. If I really want a string, I can make it a string 
myself.

Original issue reported on code.google.com by [email protected] on 14 Nov 2013 at 12:58

JavaApplicationStub not executable at Windows

I'm using gradle-macappbundle at Windows 8 by issuing gradlew createMacApp.

The result includes a JavaApplicationStub, which is non-executable. Is it 
possible to include a target createMacAppZip, where all the files are 
compressed and the right permissions are set?

I think, 
http://gradle.org/docs/current/dsl/org.gradle.api.tasks.bundling.Zip.html could 
be a starting point. There is the property "fileMode".

Original issue reported on code.google.com by [email protected] on 12 Jan 2013 at 12:14

Icon not included in app

I added a correct icon set in my resources.. but it doesn't seem to load it in 
the app.
it is defined the way it is described by the wikipage.

Original issue reported on code.google.com by maescool on 24 Mar 2012 at 3:36

Could not find edu.sc.seis:gradle-macappbundle:1.0.8.

I'm trying to upgrade to version 1.0.8 and I'm getting the following build 
output: 

* What went wrong:
A problem occurred configuring project ':ChessCrafterDesktop'.
> Could not resolve all dependencies for configuration 
':ChessCrafterDesktop:classpath'.
   > Could not find edu.sc.seis:gradle-macappbundle:1.0.8.
     Required by:
         chess:ChessCrafterDesktop:unspecified


My build.gradle file is as follows:

-------------------------------------------------

apply plugin: 'java'

sourceCompatibility = 1.6
version = '1.0'

sourceSets.main {
    java {
        srcDirs = ['src']
    }
    resources {
        srcDir 'resources'
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile project(':ChessCrafterShared')
    compile group: 'com.google.guava', name: 'guava', version: '15.0'
}

jar {
    manifest.attributes("Main-Class": "gui.Driver", "provider": "gradle")
    from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}

apply plugin: 'macAppBundle'

macAppBundle {
    mainClassName = "gui.Driver"
    appName = "Chess Crafter"
}

buildscript {
    repositories {
        ivy {
            artifactPattern 'http://gradle-macappbundle.googlecode.com/files/[module]-[revision].[ext]'
        }
    }

    dependencies {
        classpath 'edu.sc.seis:gradle-macappbundle:1.0.8'
    }
}

-------------------------------------------------

Everything works fine if I use 1.0.4 as the classpath, but I'd like to upgrade 
to the latest version

Original issue reported on code.google.com by drewhannay on 13 Oct 2013 at 7:29

codeSign command line needs to include --deep, or be configurable to allow same.

Trying to codeSign our app with the following:

jar {
  manifest {
    attributes 'Implementation-Title': 'MyApp.Server',
               'Main-Class': 'com.squareup.myapp.Server'
  }
}

macAppBundle {
  certIdentity="MyApp"
  bundleExecutable = "${->project.name}"
  codeSignCmd='codesign'

  mainClassName = 'com.squareup.myapp.Server'
  bundleJRE = true
  icon = 'resources/bus.icns'
  appName = 'MyApp'
}

codeSign fails, returning 1. The command line executed is:

codesign -s MyApp -f 
/Users/ray/Development/square/comms/socketbus/build/macApp/MhyApp.app

If we run that command line manually and add --deep, the app is signed as 
expected and codesign returns 0

Original issue reported on code.google.com by [email protected] on 30 Jan 2015 at 7:35

Configuration instructions has dead link to MacAppBundlePluginExtension

Submit to Gradle Plugin portal

Instructions are laid out at http://plugins.gradle.org/submit

Suggested values for the gradle-plugin attribute parts:

- id: com.google.code.macappbundle
- group: edu.sc.seis.gradle
- artifact: macappbundle

The `shadow` plugin uses the `com.jfrog.bintray` plugin to automate the upload, 
as shown in 
https://github.com/johnrengelman/shadow/blob/master/gradle/publish.gradle

You can sync with Sonatype's repo once a package has been published to Bintray.

Original issue reported on code.google.com by [email protected] on 18 Jul 2014 at 10:40

Customise plist

This is a nice plugin, but we need to customise the plist beyond what you have 
hooks for. Is there a way to do that? Or can we substitute our own plist file?

Original issue reported on code.google.com by [email protected] on 7 Sep 2012 at 4:05

dmg is not created in ${project.macAppBundle.outputDir}

What steps will reproduce the problem?
1. setup macosx plugin with outputDir = 'distributions/macosx'
2. run gradle target which produces dmg

What is the expected output? What do you see instead?
the .app is located in '${buildDir}/distributions/macosx' folder, 
the .dmg is created in '${buildDir}/distributions' folder

I'd expect both product to be created in the outputDir

What version of the product are you using? On what operating system?
1.0.7

Original issue reported on code.google.com by [email protected] on 1 Oct 2012 at 11:14

Dual build: With and without jre

I want to build both the jre-bundled and non-bundled version of my app in single build command. Now, it seems I need to edit the bundleJRE before triggering new builds.

Providing external dictionary file instead of generating it

One of my projects already provides the Info.plist file as a static resource. Instead of generating it, would it be possible to expose a property in the extension that can be assigned by the user and bypasses the dictionary file generation?

JavaApplicationStub sometimes missing from the product file

What steps will reproduce the problem?
1. run 'gradle createApp'
2. delete the created product
3. run 'gradle createApp' again

What is the expected output? What do you see instead?
The result application doesn't get the MacOS/JavaApplication component added.
seems like the task is not verifying its outputs correctly, as in the console I 
can see
:copyStub UP-TO-DATE

What version of the product are you using? On what operating system?
plugin 1.0.7, gradle 1.2, OSX 10.8.2

Original issue reported on code.google.com by [email protected] on 9 Oct 2012 at 12:11

Error: execCommand == null

When running ./gradlew clean build -p mymodule

I'm getting

* What went wrong:
Execution failed for task ':mymodule:createDmg'.
> execCommand == null!

I'm using Gradle 3.3 and 2.1.6 of this plugin.

Adding javaExtras.put() creates an app that won’t run

Hi,

I wanted to add -Xmx4g to the Info.plist in the JVMOptions section, but it gets put in in the wrong format, causing the app to crash. Maybe I’m doing something wrong, but the javaExtras.put takes key value pairs so it doesn’t work if it put the single -Xmx4g flag and if I try something like “-Xmx”, “4g”, it crashes because it doesn’t like the resulting “-Xmx=4g” that it puts in the file. If I manually edit the Info.plist value to remove the “=“, it works. How do I add just that one flag to the file?

Thanks,
Rob

About the dmg

I want create a dmg for drag app to the Applications dir,how can I do for this?
Thanks very much.

jvmArgs for dmg

Is there a way I can pass the memory settings for the dmg that is created?

Feature request: splash screen

This is a nice to have. I have figured out a workaround for now.

The JavaAppLauncher does not load a splash screen as specified by the SplashScreen-Image attribute in the main jar. I am able to get it to load by copying the splash image into the app folder and then updating the Info.plist properties as follows:

<key>JVMOptions</key>
<array>
  <string>-splash:$APP_ROOT/Contents/Java/splash.png</string>
  ...
</array>

This works, and for now I will add a task to modify the plist after it has been generated, but it would be convenient if there was a way of adding this option ahead of time. Right now it looks like the only options you support this way are those that are of the form key=value which does not apply here.

From GenerateInfoPlistTask.groovy:

key('JVMOptions')
   array() {
       extension.javaProperties.each { k, v->
               string("-D$k=$v")
       }
       extension.javaExtras.each { k, v->
               string("$k=$v")
       }
   }

The reason I want a splash screen is because the bundled JRE seems to take a few seconds to initialize, and I'd prefer to have faster feedback for my users.

Thanks,
Matt

Error prototypes method getJREDirName

thanks for the job, i'm performing the task with android studio and jdk 1.8+ and i have this problem:

FAILURE: Build failed with an exception.

  • What went wrong:
    Ambiguous method overloading for method java.io.File#.
    Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
    [class java.lang.String]
    [class java.net.URI]

  • Try:
    Run with --info or --debug option to get more log output.

  • Exception is:
    groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#.
    Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
    [class java.lang.String]
    [class java.net.URI]
    at com.github.cr0.gradle.macAppBundle.MacAppBundlePluginExtension.getJREDirName(MacAppBundlePluginExtension.groovy:166)
    at com.github.cr0.gradle.macAppBundle.MacAppBundlePluginExtension$getJREDirName$0.call(Unknown Source)
    at com.github.cr0.gradle.macAppBundle.MacAppBundlePlugin$_createBundleJRETask_closure22.doCall(MacAppBundlePlugin.groovy:166)
    at org.gradle.api.internal.file.FileOrUriNotationConverter.convert(FileOrUriNotationConverter.java:85)
    at org.gradle.internal.typeconversion.NotationConverterToNotationParserAdapter.parseNotation(NotationConverterToNotationParserAdapter.java:30)
    at org.gradle.internal.typeconversion.ErrorHandlingNotationParser.parseNotation(ErrorHandlingNotationParser.java:47)
    at org.gradle.api.internal.file.AbstractFileResolver.convertObjectToFile(AbstractFileResolver.java:125)
    at org.gradle.api.internal.file.AbstractBaseDirFileResolver.doResolve(AbstractBaseDirFileResolver.java:69)
    at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:86)
    at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:68)
    at org.gradle.api.internal.file.copy.DestinationRootCopySpec.getDestinationDir(DestinationRootCopySpec.java:48)
    at org.gradle.api.internal.file.copy.DestinationRootCopySpec_Decorated.getDestinationDir(Unknown Source)
    at org.gradle.api.tasks.Sync.getDestinationDir(Sync.java:100)
    at org.gradle.api.tasks.Sync_Decorated.getDestinationDir(Unknown Source)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.TaskPropertyInfo$4.create(TaskPropertyInfo.java:99)
    at org.gradle.util.SingleMessageLogger.whileDisabled(SingleMessageLogger.java:217)
    at org.gradle.api.internal.project.taskfactory.TaskPropertyInfo.getValue(TaskPropertyInfo.java:97)
    at org.gradle.api.internal.project.taskfactory.TaskClassValidator$FutureValue.call(TaskClassValidator.java:65)
    at org.gradle.util.GUtil.uncheckedCall(GUtil.java:432)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:125)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections(DefaultFileCollectionResolveContext.java:94)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileCollectionConverter.convertInto(DefaultFileCollectionResolveContext.java:161)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:111)
    at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections(DefaultFileCollectionResolveContext.java:94)
    at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections(CompositeFileCollection.java:172)
    at org.gradle.api.internal.file.CompositeFileCollection.getFiles(CompositeFileCollection.java:55)
    at org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:68)
    at com.google.common.collect.Iterables$8.iterator(Iterables.java:713)
    at com.google.common.collect.Sets.newHashSet(Sets.java:219)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.canonicalizedPaths(DefaultTaskExecutionPlan.java:709)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.getOutputPaths(DefaultTaskExecutionPlan.java:785)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.recordTaskStarted(DefaultTaskExecutionPlan.java:815)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.access$2700(DefaultTaskExecutionPlan.java:91)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan$9.transform(DefaultTaskExecutionPlan.java:601)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan$9.transform(DefaultTaskExecutionPlan.java:590)
    at org.gradle.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:45)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.selectNextTask(DefaultTaskExecutionPlan.java:590)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.access$2300(DefaultTaskExecutionPlan.java:91)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan$8.transform(DefaultTaskExecutionPlan.java:564)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan$8.transform(DefaultTaskExecutionPlan.java:545)
    at org.gradle.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:45)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:545)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)

  • Get more help at https://help.gradle.org

BUILD FAILED in 0s

1.0.4 causes serial exception

when doing createDmg i get this exception (i filtered this out of it)

Caused by: java.io.InvalidClassException: 
edu.sc.seis.gradle.macAppBundle.MacAppBundlePluginExtension; local class 
incompatible: stream classdesc serialVersionUID = 680222416952631697, local 
class serialVersionUID = 2807445984896854523

1.0.3 build goes fine..

Original issue reported on code.google.com by maescool on 24 Mar 2012 at 3:13

Hardcoded image size

Rather than hardcoded background image size, you might like to get the real 
image dimensions with this command line:

sips -g pixelHeight -g pixelWidth ${DMG_BACKGROUND_IMG}

and then parsing out the values you need from the output...


Original issue reported on code.google.com by [email protected] on 16 Jun 2014 at 11:43

Building .app or .dmg on linux

Hi,

i was trying to build an .app on linux, it builded it without any errors, but 
when i zipped it and downloaded it to a mac, it refused to start the app..

I just wan't to know if this is on the todo-list to fix?

also createDmg required hdiutil, which doesn't exists for linux, but there are 
workarrounds to make it, can this also be added?

thanks!

Original issue reported on code.google.com by maescool on 25 Feb 2012 at 3:36

Set title of DMG

How do i set the title/name of the dmg?
now it is always "macApp"

Original issue reported on code.google.com by maescool on 24 Mar 2012 at 3:37

Unsupported major.minor version 52.0

I am using this plugin with Java 7. However, it seems like your plugin has been compiled with Java 8. I get the following error message:

java.lang.UnsupportedClassVersionError: edu/sc/seis/macAppBundle/MacBundlePlugin: Unsupported major.minor version 52.0

Would you mind producing a new version of the plugin by setting the source and target compatibility in your build.gradle file so it can be used with Java 7?

sourceCompatibility = 1.7
targetCompatibility = 1.7

CFBundleName is not configurable

What steps will reproduce the problem?
1. multi-module project, using macappbundle in subprojects
3. subproject folder names do not match the app name.

What is the expected output? What do you see instead?
in Info.plist the key CFBundleName should be the same as appName
currently its ${project.name}, which for subprojects is simply name of the 
subfolder.

What version of the product are you using? On what operating system?
using version 1.0.5



Original issue reported on code.google.com by [email protected] on 27 Sep 2012 at 1:44

src/dist not copied into app

The gradle application plugin copies src/dist files into the distribution/lib folder. It's be really super nice if macappbundle did the same. Then we can distribute to Windows and Mac with the same src file structure. For now I need to create my own task to run after createApp to do so.

Document method to disable the attempt at DMG creation on Windows/Linux.

I do my builds on Mac OS X, but as I'm asking others to contribute to the project, their builds are failing on Windows and Linux. I've been telling them to comment out the plugin configuration lines, but there has to be a better way.

I'm sure there's already a way to do it by reconfiguring the existing Gradle tasks. If I find it, I'll share it here. It should certainly be documented.

Add support for bundling JRE

This is a feature request :)

To help apps get accepted into the Mac App Store and run as standalone provide 
an option to bundle the JRE similar to how the Oracle Java App Bundler does.

Original issue reported on code.google.com by [email protected] on 16 Dec 2013 at 11:29

How to configure what gets copied to Java directory?

Hello,

I have a build.gradle that probably isn't standard (it works, but I am fairly new to gradle). My app generates Android and iOS apps from a library of content. So it has a lot of related resources needed for it.

So I have a whole directory structure that needs to copied to the Java directory. The code expects these resources to be together:

/bin/scripture-app-builder.jar
/bin/lib/x86_64/.dylib
/fonts/
(custom fonts)
/html/* (template html files)
/images/icons/*
/info/* (localization strings)
/ios/* (template iOS App)
/lib/* (android libraries)
/tools/* (related tools needed for building android app -- gradle, maven)

How do I override what gets copied to the Java directory? The only thing that is getting copied now is "release.jar" and I don't think it is the correct thing.

Thanks,
Chris

adding the plugin executes 10 of the 13 tasks when doing a gradle build

I've added the following to my build.gradle file:

plugins {
    id "edu.sc.seis.macAppBundle" version "2.1.4"
}

macAppBundle {
    mainClassName = "..."
    icon          = "myApp.icns"
    volumeName    = "myApp"
    dmgName       = "myApp"
    javaProperties.put("apple.laf.useScreenMenuBar", "true")
    // Uncomment the next line to bundle the JRE with the Mac OS X application
    //bundleJRE     = true
}

When I run a gradlew build, all tasks from your bundle are run, except codeSign, createAppZip, runSetFile.

I never specified it anywhere that any of the tasks are run. The problem is that on Windows a gradlew build tries to run createDmg and fails (naturally).

Why are any MacAppBundle tasks run when doing a gradlew build?

Is there a way that none of the MacAppBundle tasks are run for a gradlew build?

How to use with Proguard with createApp

First off, I love your gradle plugin. It works great for me. The only part I haven't figured out yet is the best way to hook in my proguard step which is generating obfuscated and optimized jars. My proguard task takes the jar output from the jar task and generates new jars, but your createApp task (configureDistSpec) reads the output of the jar task. Any suggestions on the best way to get createApp to use the output of my proguard task instead of the jar task? Is there a different way I should hook in my step?

I'm actually running createDmg, so alternatively I could modify the jar between createApp and createDmg if there's a good way to do that instead of running proguard before createApp.

I'm new to gradle, so I apologize if this is an obvious question.

Thanks!

-Matt

more user configurable java system properties

system properties are defined within 
<key>java</key>
<dict>
...
<Properties> 

currently the macappbundle plugin allows a single property to be set:

apple.laf.useScreenMenuBar

yet macappbundle plugin should allow adding any number of custom properties 
like, either apple specific:
apple.awt.textantialiasing
apple.awt.showGrowBox
(http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_Prope
rtiesRef/Articles/JavaSystemProperties.html)

or java specific like
JFileChooser.appBundleIsTraversable
JFileChooser.packageIsTraversable
...

or actually any custom properties

Original issue reported on code.google.com by [email protected] on 2 Oct 2012 at 12:13

License for plugin

Would you mind providing the license for this plugin as separate file checked into the repo e.g. LICENSE.txt or as part of the README.md file?

Copy resources on build like "classpath" option in ant bundleapp task

Hi crotwell.

I assemble Mac OS .app application and now trying to switch from ant bundler task to your gradle one. In the ant task i have the next settings, which i can't find in your implementation:

<target name="bundleMac" depends="cleanTarget, checkProperties">
    <taskdef name="bundleapp"
           classname="com.oracle.appbundler.AppBundlerTask"
           classpath="${basedir}/lib/appbundler-1.0.jar"/>

     <bundleapp >

         <classpath file="${buildDir}/libs/BuildUberJar.jar"/>
         <classpath file="${libDir}/lib.dylib"/>
         <classpath file="${libDir}/license.txt"/>
         <classpath file="${resDir}/${splashImagePath}"/>

this classpath property copies files from build resources to Contents/Java bundled directory and would be used by the application at runtime.

There are 2 problems i see:

  1. Instead of just putting my single über-jar to Java directory it puts all the dependencies jars.
  2. I've not found a way to copy resources (like those dylib, txt and splash image) to Java directory.
  3. When i build using this ant task in the result Content directory also Resources subdirectory exists with my '128.icns' and some default en.lproj/Localizable.strings messages ("JRELoadError", "MainClassNameRequired", "JavaDirectoryNotFound"). Why it's absent in this gradle task?

See the classpath description in (AppBundler documentation)[https://java.net/downloads/appbundler/appbundler.html]

Thanks.

Resulting app does not open when bundleJRE = true

The createApp task works when bundleJRE = false. My program runs and loads.
However, when bundleJRE = true it does not. It opens an OS X Error Dialog saying JRELoadError.
I'm not sure how to start troubleshooting this.

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.