Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin support #356

Merged
merged 115 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from 92 commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
15e7691
Ignore idea config files
oowekyala Apr 21, 2021
49cc63a
Configure kotlin compiler alongside java
oowekyala Apr 21, 2021
0827336
wip convert a file to kotlin
oowekyala Apr 21, 2021
d279963
Port another
oowekyala Apr 21, 2021
4178100
Generate Xtend sources before kotlin compilation
oowekyala Apr 21, 2021
c92b19e
Revert "Port another"
oowekyala Apr 21, 2021
8388a3d
Rewrite kotlin -> java
oowekyala Apr 21, 2021
f769d48
Java -> xtend
oowekyala Apr 21, 2021
db430df
Minor refactoring
oowekyala Apr 21, 2021
1f2cc68
Port one leaf of the dependency graph to kotlin
oowekyala Apr 21, 2021
206a6d4
Try to port another
oowekyala Apr 21, 2021
235077d
Fix warnings
oowekyala Apr 21, 2021
619e44c
Port LFGlobalScopeProvider
oowekyala Apr 21, 2021
bd26d88
Add basic extensions taken from ASTUtils
oowekyala Apr 21, 2021
5a44334
Revert "Port LFGlobalScopeProvider"
oowekyala Apr 21, 2021
e7bdd62
Use new extensions
oowekyala Apr 21, 2021
166eb6e
Try to update LFGenerator
oowekyala Apr 21, 2021
1bfbc83
Java -> kotlin
oowekyala Apr 21, 2021
244f5ce
Let Xtext create Java files, not Xtend files.
lhstrh Apr 22, 2021
814e4cf
Beginning to port auto-gen files to Java.
lhstrh Apr 22, 2021
dbe4c2d
Remove redundant files.
lhstrh Apr 22, 2021
9911f4c
Start a kotlin generator base
oowekyala Apr 21, 2021
d3a238a
Merge remote-tracking branch 'origin/kotlin-with-gradle' into kotlin-…
oowekyala Apr 22, 2021
5920166
Finish porting KtGeneratorBase
oowekyala Apr 22, 2021
a55bcbc
More things from ASTUtils
oowekyala Apr 22, 2021
ad908e4
Merge remote-tracking branch 'origin/distributed-cycles' into kotlin-…
oowekyala Apr 22, 2021
48f9127
Commit new files
oowekyala Apr 22, 2021
b299a3b
Updated generated stubs in ide package.
lhstrh Apr 22, 2021
cd67ced
Addressed warning.
lhstrh Apr 23, 2021
502c229
Add kotlin and ajdt plugins to oomph
oowekyala Apr 23, 2021
fa42cc0
Cleanup target
oowekyala Apr 23, 2021
380061d
Finish updating eclipse files
oowekyala Apr 23, 2021
d4057ef
Merge remote-tracking branch 'origin/kotlin-with-gradle' into kotlin-…
oowekyala Apr 23, 2021
c98471f
Continue porting KtGeneratorBase
oowekyala Apr 23, 2021
d835e01
Some more progress
oowekyala Apr 23, 2021
eae3522
Introduce supertype to both generators
oowekyala Apr 23, 2021
efc721f
Merge remote-tracking branch 'origin/distributed-cycles' into kotlin-…
oowekyala Apr 23, 2021
2dd37a7
Merge remote-tracking branch 'origin/master' into kotlin-with-gradle
oowekyala Apr 23, 2021
4ba2bfc
Add gradle task to remove files forced on us by Xtext
oowekyala Apr 28, 2021
43e9a41
Remove some kotlin files (KtGeneratorBase)
oowekyala Apr 28, 2021
588a782
Merge remote-tracking branch 'origin/distributed-cycles' into kotlin-…
oowekyala Apr 28, 2021
3f61992
Remove parts of AstExtensions.kt
oowekyala Apr 28, 2021
24b630a
Cleanups
oowekyala Apr 28, 2021
e60f362
Merge branch 'distributed-cycles' into kotlin-with-gradle
lhstrh Apr 28, 2021
96ac783
Fix guice bug
oowekyala Apr 28, 2021
f6007ef
Merge remote-tracking branch 'origin/kotlin-with-gradle' into kotlin-…
oowekyala Apr 28, 2021
6f2ba07
Merge remote-tracking branch 'origin/distributed-cycles' into kotlin-…
oowekyala Apr 28, 2021
f33342e
Merge remote-tracking branch 'origin/master' into kotlin-with-gradle
oowekyala May 5, 2021
a3cfe8c
Fix merge conflict on .gitignore
lhstrh May 16, 2021
f327192
Merge branch 'master' into kotlin-with-gradle
oowekyala May 18, 2021
7e20f14
Fix clean task
oowekyala May 18, 2021
c316c25
Merge branch 'master' into kotlin-with-gradle
oowekyala May 20, 2021
a628c5b
Fix merge conflict in eclipse file
oowekyala May 20, 2021
537bd1c
Minor cleanup
oowekyala May 21, 2021
3ee41fb
Merge branch 'master' into kotlin-with-gradle
oowekyala May 22, 2021
8fbf35f
Fix bug with Jacoco and kotlin 1.5.0
oowekyala May 23, 2021
9ff6764
build: Make maven support kotlin
oowekyala May 27, 2021
2a897e6
build: Fix junit 4 problem another way
oowekyala May 27, 2021
b03a8b2
build: Fix another wrong usage of junit 4
oowekyala May 27, 2021
29ebc6b
Merge branch 'master' into kotlin-with-gradle
cmnrd Jun 2, 2021
8d7ee03
[gradle] Fixup clean task once more
oowekyala Jun 2, 2021
cca6fdc
oomph: Adjusted target platform to include kotlin plugin
a-sr Jun 2, 2021
7eb9d40
Commit LFStandaloneSetup
oowekyala Jun 3, 2021
1665f76
Add kotlin osgi bundle to manifest
oowekyala Jun 3, 2021
8196527
Add src-gen, xtend-gen to clean task
oowekyala Jun 4, 2021
027f0dc
Convert xtend in web module to kotlin/java
oowekyala Jun 4, 2021
74ff692
Merge branch 'master' into kotlin-with-gradle
oowekyala Jun 4, 2021
a5d3623
Revert some changes
oowekyala Jun 4, 2021
39f0816
Upgrade kotlin to 1.5.0
oowekyala Jun 4, 2021
cbd34ac
Test converting standalone setup to kotlin
oowekyala Jun 4, 2021
4c0f025
Use kotlin OSGI bundle directly
oowekyala Jun 4, 2021
4baf706
Merge branch 'master' into kotlin-with-gradle
lhstrh Jun 4, 2021
a35bd10
ASTUtils: bugfix, search all reactor superclasses recursively
cmnrd Jun 8, 2021
fb5d913
Also rename function
oowekyala Jun 8, 2021
caae126
Use kotlin 1.5.10
oowekyala Jun 9, 2021
4853000
Remove gitignore for LFParsingTest
oowekyala Jun 9, 2021
24d73cd
Put xtext cleanup in a doLast
oowekyala Jun 9, 2021
d9699f9
Refresh eclipse files
oowekyala Jun 9, 2021
82bee03
Update osgi bundle version in manifest
oowekyala Jun 9, 2021
b498330
Merge branch 'master' into kotlin-with-gradle
cmnrd Jun 10, 2021
3722fa2
Merge remote-tracking branch 'upstream/master' into kotlin-with-gradle
oowekyala Jun 10, 2021
712a5d0
Merge remote-tracking branch 'upstream/kotlin-with-gradle' into kotli…
oowekyala Jun 10, 2021
dbdaf24
Ignore some files generated by the build
oowekyala Jun 10, 2021
f515c56
Fix the RCA built with mvn (missing kotlin dep)
oowekyala Jun 11, 2021
e673e57
Merge remote-tracking branch 'upstream/master' into kotlin-with-gradle
oowekyala Jun 11, 2021
1bc76c6
Merge branch 'master' into kotlin-with-gradle
oowekyala Jun 14, 2021
0dc42ea
Merge branch 'master' into kotlin-with-gradle
lhstrh Jun 14, 2021
df73dec
Merge branch 'master' into kotlin-with-gradle
oowekyala Jun 16, 2021
d8fa1fc
Merge remote-tracking branch 'upstream/kotlin-with-gradle' into kotli…
oowekyala Jun 16, 2021
b38bfcf
Use bundled-compiler from eclipse project
oowekyala Jun 16, 2021
2c88bac
Commit eclipse files
oowekyala Jun 16, 2021
c0cc5e6
Fix maven build, RCA ok
oowekyala Jun 16, 2021
589b3b3
Revert "Commit eclipse files"
cmnrd Jun 17, 2021
e5fc5da
Revert "Refresh eclipse files"
cmnrd Jun 17, 2021
1ed49cf
add xtend-gen directories to prevent build errors
cmnrd Jun 17, 2021
529918a
remove unused xtend-gen directories
cmnrd Jun 17, 2021
efa2903
Change default target
oowekyala Jun 17, 2021
24c2bd3
add eclipse files after 'Refresh Gradle Project'
cmnrd Jun 17, 2021
c1fe4be
oomph: Added weaving features to target platform
a-sr Jun 18, 2021
7f9767d
Merge branch 'master' into kotlin-with-gradle
cmnrd Jun 23, 2021
69c424a
partially revert commit 4ba2bfce
cmnrd Jun 23, 2021
c1ebd32
fix LFRuntimeModule and LFGenerator
cmnrd Jun 23, 2021
89eed91
revert LFScopeProvider to xtend
cmnrd Jun 23, 2021
dcfa23d
Revert "Port one leaf of the dependency graph to kotlin"
cmnrd Jun 23, 2021
e041bf8
revert LFStandaloneSetup to java
cmnrd Jun 23, 2021
9b86ca5
Revert "Convert xtend in web module to kotlin/java"
cmnrd Jun 23, 2021
944f8fb
add AbstractLinguaFrancaWebModule
cmnrd Jun 23, 2021
cc5c2e4
add missing breaks...
cmnrd Jun 24, 2021
461758f
oomph: remove weaving features
cmnrd Jun 24, 2021
8e20e30
Merge branch 'master' into kotlin-with-gradle
cmnrd Jun 24, 2021
0ef09e6
don't delete generated files in maven and gradle builds
cmnrd Jun 25, 2021
43045bf
provide java stubs so that they are not generated from xtext
cmnrd Jun 25, 2021
e1422a2
src-gen seems to be not needed anymore
cmnrd Jun 25, 2021
7134d2c
Add gradle task to run LFC
oowekyala Jun 22, 2021
7662fab
Removed eclipse project information of root folder to fix oomph setup
a-sr Jun 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?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.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>lingua-franca</name>
<comment>Project lingua-franca created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
32 changes: 28 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
buildscript {
ext.kotlinVersion = "1.4.10" // sync with pom.xml
repositories {
mavenCentral()
}
dependencies {
classpath 'org.xtext:xtext-gradle-plugin:2.0.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}

plugins {
id "com.github.johnrengelman.shadow" version "6.0.0"
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'java'
id 'jacoco'
}
Expand All @@ -19,19 +21,34 @@ subprojects {
mavenCentral()
}

apply plugin: 'java'
apply plugin: 'kotlin'
compileKotlin {
destinationDir = compileJava.destinationDir
kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
implementation platform("org.eclipse.xtext:xtext-dev-bom:${xtextVersion}")
// https://mvnrepository.com/artifact/com.google.inject/guice
implementation group: 'com.google.inject', name: 'guice', version: '5.0.1'
// https://mvnrepository.com/artifact/commons-cli/commons-cli
implementation group: 'commons-cli', name: 'commons-cli', version: '1.4'
}
}
dependencies {
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlinVersion
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlinVersion
}


apply plugin: 'org.xtext.xtend'
apply from: "${rootDir}/gradle/source-layout.gradle"
apply plugin: 'eclipse'


// generate xtend sources before kotlin compilation
compileKotlin.dependsOn("generateXtext")

group = 'org.lflang'
version = '0.1.0-SNAPSHOT'

Expand All @@ -41,4 +58,11 @@ subprojects {
configurations.all {
exclude group: 'asm'
}

// Delete generated sources on `gradle clean`
clean.doFirst {
project.logger.info("Deleting ${projectDir}/xtend-gen, src-gen")
delete "${projectDir}/xtend-gen/"
delete "${projectDir}/src-gen/"
}
}
4 changes: 3 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
/*/test-bin/
/*/src-gen/
my_trace

include
lib
share
3 changes: 3 additions & 0 deletions gradle/source-layout.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ if (name.endsWith(".tests")) {
sourceSets {
main {
java.srcDirs = []
kotlin.srcDirs = []
resources.srcDirs = []
}
test {
java.srcDirs = ['src', 'src-gen']
kotlin.srcDirs = ['src', 'src-gen']
resources.srcDirs = ['src', 'src-gen']
xtendOutputDir = 'xtend-gen'
}
Expand All @@ -14,6 +16,7 @@ if (name.endsWith(".tests")) {
sourceSets {
main {
java.srcDirs = ['src', 'src-gen']
kotlin.srcDirs = ['src', 'src-gen', 'xtend-gen']
resources.srcDirs = ['src', 'src-gen']
xtendOutputDir = 'xtend-gen'
}
Expand Down
22 changes: 22 additions & 0 deletions oomph/LinguaFranca.setup
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,24 @@
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="202103162301.org.eclipse.ajdt"/>
<requirement
name="202103162301.org.eclipse.ajdt.other"/>
<repository
url="http://download.eclipse.org/tools/ajdt/410/dev/update"/>
</setupTask>
<setupTask
xsi:type="setup.p2:P2Task">
<requirement
name="org.jetbrains.kotlin.feature.feature.group"/>
<requirement
name="org.jetbrains.kotlin.gradle.feature.feature.group"/>
<repository
url="https://download.jetbrains.com/kotlin/eclipse-plugin/last"/>
</setupTask>
<setupTask
xsi:type="setup:VariableTask"
name="git.clone.lingua.franca.branch"
Expand Down Expand Up @@ -332,6 +350,8 @@
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 @@ -378,6 +398,8 @@
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"/>
</repositoryList>
</targlet>
</setupTask>
Expand Down
4 changes: 4 additions & 0 deletions org.lflang.diagram/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Loading