Skip to content

Commit

Permalink
Merge pull request #437 from icyphy/no-kotlin-plugin
Browse files Browse the repository at this point in the history
No kotlin plugin
  • Loading branch information
lhstrh authored Sep 16, 2021
2 parents ccd1182 + 780a3f4 commit 59ec4e7
Show file tree
Hide file tree
Showing 44 changed files with 125 additions and 557 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/package_lfc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ outname="lfc_nightly_$(date '+%Y%m%d-%H%M%S')"
mkdir -p $outname/bin
mkdir -p $outname/lib

mv org.lflang/build/libs/org.lflang-*-SNAPSHOT-all.jar $outname/lib
mv org.lflang.lfc/build/libs/org.lflang.lfc-*-SNAPSHOT-all.jar $outname/lib

# Move & patch wrappers
sed -e '/^lfbase=/d' -e 's/\${lfbase}build\/libs/\${base}lib/g' -e '/^if \[\[ ! -f "\$jarpath" \]\]; then/{n;N;N;d}' bin/lfc > $outname/bin/lfc
Expand Down
4 changes: 2 additions & 2 deletions bin/lfc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ if [ ! "$0" = "${0##*/*}" ]; then # Do we have a parent directory?
base="${0%/*}/"
fi
base="${base}../"
lfbase="${base}org.lflang/"
jarpath="${lfbase}build/libs/org.lflang-0.1.0-SNAPSHOT-all.jar"
lfbase="${base}org.lflang.lfc/"
jarpath="${lfbase}build/libs/org.lflang.lfc-0.1.0-SNAPSHOT-all.jar"

# Report fatal error.
function fatal_error() {
Expand Down
4 changes: 2 additions & 2 deletions bin/lfc.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#==========================================================

$base="$PSScriptRoot\.."
$lfbase="$base\org.lflang"
$jarpath="$lfbase\build\libs\org.lflang-0.1.0-SNAPSHOT-all.jar"
$lfbase="$base\org.lflang.lfc"
$jarpath="$lfbase\build\libs\org.lflang.lfc-0.1.0-SNAPSHOT-all.jar"

# if there is no jar file, then build it first
if (-not (Test-Path $jarpath -PathType leaf)) {
Expand Down
21 changes: 0 additions & 21 deletions oomph/LinguaFranca.setup
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,6 @@
url="http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/"/>
<description>Install the tools needed in the IDE to work with the source code for ${scope.project.label}</description>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task">
<requirement
name="org.jetbrains.kotlin.feature.feature.group"/>
<requirement
name="org.jetbrains.kotlin.gradle.feature.feature.group"/>
<requirement
name="org.eclipse.ajdt.feature.group"/>
<repository
url="http://download.eclipse.org/tools/ajdt/410/dev/update"/>
<repository
url="https://download.jetbrains.com/kotlin/eclipse-plugin/last"/>
</setupTask>
<setupTask
xsi:type="setup:VariableTask"
id="git.clone.lingua.franca.branch"
Expand Down Expand Up @@ -340,8 +327,6 @@
versionRange="2.25.0"/>
<requirement
name="org.eclipse.platform.source.feature.group"/>
<requirement
name="org.jetbrains.kotlin.feature.feature.group"/>
<requirement
name="org.eclipse.emf.mwe2.launcher.feature.group"/>
<requirement
Expand Down Expand Up @@ -388,8 +373,6 @@
url="https://www.pydev.org/updates/"/>
<repository
url="http://download.eclipse.org/wildwebdeveloper/releases/latest/"/>
<repository
url="https://download.jetbrains.com/kotlin/eclipse-plugin/last/"/>
<repository
url="http://download.eclipse.org/tools/ajdt/410/dev/update"/>
</repositoryList>
Expand Down Expand Up @@ -466,8 +449,6 @@
versionRange="2.25.0"/>
<requirement
name="org.eclipse.emf.mwe2.launcher.feature.group"/>
<requirement
name="org.jetbrains.kotlin.feature.feature.group"/>
<repositoryList
name="DefaultRepositories">
<repository
Expand All @@ -476,8 +457,6 @@
url="http://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository/"/>
<repository
url="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.25.0/"/>
<repository
url="https://download.jetbrains.com/kotlin/eclipse-plugin/last"/>
</repositoryList>
</targlet>
</setupTask>
Expand Down
2 changes: 1 addition & 1 deletion org.lflang.diagram/.classpath
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
6 changes: 3 additions & 3 deletions org.lflang.diagram/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand All @@ -12,7 +12,7 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
Expand Down
20 changes: 6 additions & 14 deletions org.lflang.ide/.classpath
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/main" path="src">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src-gen">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="src" path="/org.lflang"/>
<classpathentry kind="con" path="org.jetbrains.kotlin.core.KOTLIN_CONTAINER"/>
<classpathentry kind="output" path="bin/default"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
19 changes: 0 additions & 19 deletions org.lflang.ide/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.jetbrains.kotlin.ui.kotlinBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
Expand All @@ -40,14 +30,5 @@
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.jetbrains.kotlin.core.kotlinNature</nature>
</natures>
<linkedResources>
<link>
<name>kotlin_bin</name>
<type>2</type>
<locationURI>org.jetbrains.kotlin.core.filesystem:/org.lflang.ide/kotlin_bin</locationURI>
</link>
</linkedResources>
</projectDescription>
38 changes: 38 additions & 0 deletions org.lflang.lfc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
dependencies {
implementation project(':org.lflang')
implementation "org.eclipse.xtext:org.eclipse.xtext.ide:${xtextVersion}"
implementation "org.eclipse.xtext:org.eclipse.xtext.xbase.ide:${xtextVersion}"
}

apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'

task generateStandaloneCompiler() {
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
mainClassName = 'org.lflang.lfc.Main'

shadowJar {
exclude 'test/*'
minimize() {
exclude(dependency('log4j:log4j:.*'))
exclude(dependency('com.google.inject:guice:.*'))
exclude(dependency('org.lflang:org.lflang:.*'))
}
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer){
resource = 'plugin.properties'
}
}
}

generateStandaloneCompiler.finalizedBy shadowJar

task runLfc(type: JavaExec) {
// Note: when you use --args, you need to escape cli flags which start with --
// For instance --args ' --help'
// Otherwise they're parsed as arguments to the Gradle CLI, not LFC.
description = "Build and run LFC, use --args to pass arguments"
group = "application"
classpath = sourceSets.main.runtimeClasspath
mainClass = 'org.lflang.generator.Main'
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

import org.eclipse.xtext.validation.ValidationMessageAcceptor;

import org.lflang.generator.ReportingBackend;
import org.lflang.generator.StandaloneErrorReporter;
import org.lflang.generator.StandaloneIssueAcceptor;
import org.lflang.lfc.ReportingBackend;
import org.lflang.lfc.StandaloneErrorReporter;
import org.lflang.lfc.StandaloneIssueAcceptor;

import com.google.inject.Binder;
import com.google.inject.Module;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Stand-alone version of the Lingua Franca compiler (lfc).
*/
package org.lflang.generator;
package org.lflang.lfc;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -41,6 +41,7 @@
import org.lflang.LFRuntimeModule;
import org.lflang.LFStandaloneModule;
import org.lflang.LFStandaloneSetup;
import org.lflang.generator.StandaloneContext;

import com.google.inject.Inject;
import com.google.inject.Injector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package org.lflang.generator
package org.lflang.lfc

import com.google.inject.Inject
import com.google.inject.Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
***************/

package org.lflang.generator;
package org.lflang.lfc;

import java.nio.file.Path;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.lflang.generator;
package org.lflang.lfc;

import java.io.IOException;
import java.nio.file.Path;
Expand Down
4 changes: 2 additions & 2 deletions org.lflang.product/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions org.lflang.sdk/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<requires>
<import feature="org.eclipse.xtext.runtime" version="2.8.0" match="greaterOrEqual"/>
<import plugin="org.jetbrains.kotlin.bundled-compiler"/>
</requires>

<plugin
Expand Down
23 changes: 10 additions & 13 deletions org.lflang.tests/.classpath
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/test" path="src">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" output="test-bin" path="src">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="xtend-gen">
<classpathentry kind="src" output="test-bin" path="xtend-gen">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src-gen">
<classpathentry kind="src" output="test-bin" path="src-gen">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="con" path="org.jetbrains.kotlin.core.KOTLIN_CONTAINER"/>
<classpathentry kind="output" path="bin/default"/>
<classpathentry kind="output" path="bin"/>
</classpath>
19 changes: 0 additions & 19 deletions org.lflang.tests/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.jetbrains.kotlin.ui.kotlinBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
Expand All @@ -40,14 +30,5 @@
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.jetbrains.kotlin.core.kotlinNature</nature>
</natures>
<linkedResources>
<link>
<name>kotlin_bin</name>
<type>2</type>
<locationURI>org.jetbrains.kotlin.core.filesystem:/org.lflang.tests/kotlin_bin</locationURI>
</link>
</linkedResources>
</projectDescription>
8 changes: 6 additions & 2 deletions org.lflang.ui.tests/.classpath
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" output="test-bin" path="src">
<attributes>
<attribute name="test" value="true"/>
Expand All @@ -15,7 +21,5 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Loading

0 comments on commit 59ec4e7

Please sign in to comment.