Skip to content

Commit

Permalink
Reintroduced optional dependency to kotlin plugin to circumvent error in
Browse files Browse the repository at this point in the history
eclipse
  • Loading branch information
a-sr committed Dec 10, 2021
1 parent 048544d commit 4d8ddf7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions org.lflang.lds/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
<bundle id="org.lflang"/>
<bundle id="org.lflang.ide"/>
<bundle id="org.lflang.diagram"/>
<bundle id="org.jetbrains.kotlin.bundled-compiler"/>
</site>
1 change: 0 additions & 1 deletion org.lflang.lds/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<arguments>
<argument>${python.script}</argument>
<argument>--noswt</argument>
<argument>--ignore-conflicts</argument>
<argument>${update.site.jars}</argument>
<argument>${executableName}</argument>
<argument>${mainClass}</argument>
Expand Down
16 changes: 14 additions & 2 deletions org.lflang.lds/uberjar.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,18 @@
from os.path import isfile, isdir, join, abspath, relpath, dirname, basename

IGNORED_JARS = [
'org.apache.ant*'
'org.apache.ant*',
# The following libraries are part of the org.jetbrains.kotlin.bundled-compiler plugin but are not required at runtime.
'kotlin-compiler.jar',
'intellij-core-analysis.jar',
'kotlin-plugin-parts.jar',
'kotlin-script-runtime.jar',
'kotlin-scripting-compiler.jar',
'ide-dependencies.jar',
'kotlin-scripting-compiler-impl.jar',
'kotlin-scripting-common.jar',
'kotlin-scripting-jvm.jar',
'ide-common.jar'
]
IGNORE_NESTED_JARS = [
]
Expand Down Expand Up @@ -71,6 +82,7 @@
'META-INF/NOTICE.txt',
'META-INF/NOTICE',
'META-INF/p2.inf',
'META-INF/versions/*/module-info.class',
'OSGI-INF/l10n/bundle.properties',
'docs/*',
'*readme.txt',
Expand Down Expand Up @@ -173,7 +185,7 @@ def extract(args, extracted, merged, klighd):
jars = sorted(os.listdir(args.source))
processed_jars = [] # Tuples of plugin name and jar
for jar in jars:
if not jar.endswith('.jar'):
if not jar.endswith('.jar') or any(fnmatch(jar, ign) for ign in IGNORED_JARS):
print('Skipping file:', jar)
continue
elif klighd and any(fnmatch(jar, ign) for ign in KLIGHD_JARS_BLACKLIST) and not any(fnmatch(jar, req) for req in KLIGHD_JARS_WHITELIST):
Expand Down
2 changes: 1 addition & 1 deletion org.lflang/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Require-Bundle: org.eclipse.xtext,
com.google.guava,
org.eclipse.xtend.lib.macro,
org.apache.commons.cli;bundle-version="1.4",
org.jetbrains.kotlin.bundled-compiler,
org.jetbrains.kotlin.bundled-compiler;resolution:=optional,
org.eclipse.lsp4j;bundle-version="0.10.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.lflang,
Expand Down

0 comments on commit 4d8ddf7

Please sign in to comment.