javafx-gradle-plugin: JfxJar-task producing stackoverflow
In my project i need swt. So i add it in gradle. The problem with swt dependency. swt depend on native libs. native libs depends on swt. Build task is work correct, but JafJar is failed with stakOverflow. This gradle script is work. If comment work region and uncomment not work in dependencies, you will be get error.
buildscript {
dependencies {
classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.2'
}
repositories {
mavenLocal()
mavenCentral()
}
ext {
osgi_platform = 'win32.win32.x86_64'
swt_version = '3.105.3'
}
}
plugins {
id "net.ltgt.apt" version "0.10"
}
apply plugin: 'java'
apply plugin: 'idea'
repositories {
mavenCentral()
}
configurations.all {
resolutionStrategy {
dependencySubstitution {
// The maven property ${osgi.platform} is not handled by Gradle
// so we replace the dependency, using the osgi platform from the project settings
substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.$osgi_platform:$swt_version")
}
}
}
dependencies {
apt 'com.google.dagger:dagger-compiler:2.10'
compile 'com.google.dagger:dagger:2.10'
compile 'net.coobird:thumbnailator:0.4.8'
compile 'commons-io:commons-io:2.5'
compile ('org.eclipse.platform:org.eclipse.jface:3.12.2'){
exclude module: 'org.eclipse.swt'
}
//work
compile ("org.eclipse.platform:org.eclipse.swt:$swt_version"){
transitive = false
}
compile ("org.eclipse.platform:org.eclipse.swt.$osgi_platform:$swt_version"){
transitive = false
}
//not work
// compile ("org.eclipse.platform:org.eclipse.swt:$swt_version")
compile 'com.google.guava:guava:22.0'
compile fileTree(dir: 'libs', include: '*.jar')
}
apply plugin: 'javafx-gradle-plugin'
jfx {
// minimal requirement for jfxJar-task
mainClass = 'app.App'
// minimal requirement for jfxNative-task
vendor = 'YourName'
} ```
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 15 (6 by maintainers)
Hmm, so I stripped out and reduce my project to a single project structure (no sub projects) so now it’s just the MapTool as a single project. I also stripped and reduced the gradle build to a more bare bones setup.
I then removed what I thought may be the more complicated lib dependencies, org.bouncycastle, libgdx, and nashorn api. I still get the stackoverflow error 😦
So not sure what the issue is… BTW, I’m able to package just fine use javapackager as a JavaExec task…
Here’s my current gradle build: