Skip to content

Commit

Permalink
fix jlink task (#5032)
Browse files Browse the repository at this point in the history
  • Loading branch information
siordache authored and tobiasdiez committed Jun 5, 2019
1 parent 8c3751e commit 3d92017
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
45 changes: 39 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ project.ext.threeDotVersion = "5.0.0.0"
project.ext.install4jDir = hasProperty("install4jDir") ? getProperty("install4jDir") : (OperatingSystem.current().isWindows() ? 'C:/Program Files/install4j7' : 'install4j7')
sourceCompatibility = 9
targetCompatibility = 9
mainClassName = "$moduleName/org.jabref.JabRefMain"
mainClassName = "$moduleName/org.jabref.JabRefLauncher"

// TODO: Ugly workaround to temporarily ignore build errors to dependencies of latex2unicode
// These should be removed, as well as the files in the lib folder, as soon as they have valid module names
Expand Down Expand Up @@ -599,11 +599,44 @@ jlink {
addOptions("--bind-services")

forceMerge "javafx"
forceMerge "org.controlsfx.controls"
forceMerge "org.bouncycastle.provider"
forceMerge "java.xml.bind"

//forceMerge('log4j-api')
forceMerge "controlsfx", "bcprov", "jaxb", "javax", "istack", "stax", "log4j"

mergedModule {
requires 'java.logging';
requires 'jdk.xml.dom';
requires 'java.sql';
requires 'java.rmi';
requires 'java.xml';
requires 'com.sun.xml.txw2';
requires 'java.desktop';
requires 'java.security.jgss';
requires 'jdk.jsobject';
requires 'jdk.unsupported';
requires 'java.management';
requires 'java.naming';
requires 'jdk.unsupported.desktop';
requires 'java.security.sasl';
requires 'java.scripting';
requires 'java.datatransfer';
requires 'java.compiler';
requires 'java.transaction.xa';
requires 'com.sun.xml.fastinfoset';
requires 'org.slf4j';
uses 'com.airhacks.afterburner.injection.PresenterFactory';
uses 'org.controlsfx.glyphfont.GlyphFont';
uses 'com.airhacks.afterburner.views.ResourceLocator';
provides 'java.sql.Driver' with 'org.postgresql.Driver';
provides 'org.controlsfx.glyphfont.GlyphFont' with 'org.controlsfx.glyphfont.FontAwesome';
provides 'org.apache.commons.logging.LogFactory' with 'org.apache.logging.log4j.jcl.LogFactoryImpl';
provides 'org.slf4j.spi.SLF4JServiceProvider' with 'org.apache.logging.slf4j.SLF4JServiceProvider';
provides 'javax.annotation.processing.Processor' with 'org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor';
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.ServerProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider';
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.NameResolverProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.internal.DnsNameResolverProvider';
provides 'java.security.Provider' with 'org.bouncycastle.jce.provider.BouncyCastleProvider',
'org.bouncycastle.pqc.jcajce.provider.BouncyCastlePQCProvider';
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.ManagedChannelProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider';
}

}

jmh {
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/jabref/JabRefLauncher.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.jabref;

/**
* JabRef Launcher
*/
public class JabRefLauncher {
public static void main(String[] args) {
JabRefMain.main(args);
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/util/ThemeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private void addAndWatchForChanges(Scene scene, URL cssFile, int index) {
});
}
}
} catch (IOException | URISyntaxException e) {
} catch (IOException | URISyntaxException | UnsupportedOperationException e) {
LOGGER.error("Could not watch css file for changes " + cssFile, e);
}
}
Expand Down

0 comments on commit 3d92017

Please sign in to comment.