Comments (6)
Issue is that you have "bundleJRE = true" but do not set jreHome, so in this case macAppBundle tries to find where java in installed by running /usr/libexec/java_home. Actually there was another bug in the printlin that was trying to say this, so the error message was confusing.
I will attempt to move that code out of the configure section, and only run it right before task execution, so that as long as you do not actually run a task that needs jreHome, it should be ok.
This is a little weird in that the createApp task, or at least the bundleJRE task, really needs to know where to get the JRE from in order to bundle it, and on a non-Mac system, you probably have to set jreHome manually as this is an important part of the task's configuration. But to actually do the bundle each of your developers would need to download the mac java. Perhaps instructions for your developers to download the oracle mac jre into the development directory and then you set jreHome to something in the build directory would help? Still seems awkward and I am not sure of the best way around this.
from gradle-macappbundle.
Thanks for the response. Is there an easy way to disable the tasks on platforms other than Mac? Builds of the Mac version will be done on the Mac (at least for now).
from gradle-macappbundle.
Here's a workaround that solves my problem in the short run:
// For now, only bundle the JRE if building under Mac OS X
bundleJRE = System.getProperty("os.name").toLowerCase().contains("mac os")
from gradle-macappbundle.
I think I have fixed this with commit 8cd2fba, changes in github. Will try to push out a new version shortly.
I think your work-around should be ok as long as you are not too international. I think there are potential problems in the locale is non-english but not sure. Other option is to use:
import org.apache.tools.ant.taskdefs.condition.Os
and then
bundleJRE = Os.isFamily(Os.FAMILY_MAC)
from gradle-macappbundle.
This technique was suggested by someone from Gradle, Inc. on their support forum, so I'm assuming the string is not localized.
from gradle-macappbundle.
Should be fixed in 2.1.2, please let me know if you still have troubles.
from gradle-macappbundle.
Related Issues (20)
- Deprecation warning with Gradle 4.0-rc-1 HOT 4
- Error: execCommand == null HOT 2
- Subproject evalutation and executing project.afterEvaluate{} HOT 1
- Resulting app does not open when bundleJRE = true HOT 6
- Error prototypes method getJREDirName HOT 4
- About the dmg HOT 7
- backgroundImage option fails on osascript when project path contains spaces
- JDK 10 is not bundled HOT 7
- Adding javaExtras.put() creates an app that wonβt run HOT 3
- There doesn't seem to be a way to create a /Applications alias in a dmg without a background image HOT 5
- Builing DMG often fails when background image is set HOT 2
- Switch app launcher to one with a better JRE missing error? HOT 5
- Application hangs when okhttp3.Credentials.basic method gets called HOT 2
- is it possible to manually edit the startup script? HOT 4
- Gradle 5.0 build fails on non-macOS systems HOT 1
- Java 11 JRE's from adoptopenjdk are not supported HOT 1
- Remove dependency between assemble and macappbundle tasks
- Created application cannot be notarized for Mac OS Mojave HOT 7
- Documention/Links on how to contribute HOT 1
- JavaAppLauncher Apple Silicon (arm64) support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-macappbundle.