Skip to content

Commit

Permalink
Merge pull request #206 from modelix/java-generator
Browse files Browse the repository at this point in the history
fix: generate to java instead of kotlin
  • Loading branch information
slisson authored Oct 23, 2024
2 parents 308beda + 858bb91 commit ee11f77
Show file tree
Hide file tree
Showing 45 changed files with 2,126 additions and 4,000 deletions.
16 changes: 14 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ plugins {
`maven-publish`
id("com.palantir.git-version") version "3.1.0"
id("com.dorongold.task-tree") version "4.0.0"
alias(coreLibs.plugins.kotlin.multiplatform) apply false
alias(coreLibs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.serialization) apply false
id("org.jetbrains.intellij") version "1.17.4" apply false
alias(libs.plugins.npm.publish) apply false
}

group = "org.modelix"
Expand Down Expand Up @@ -136,3 +137,14 @@ rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlu
}

copyMps()

// make all 'packJsPackage' tasks depend on all 'kotlinNodeJsSetup' tasks, because gradle complained about this being missing
tasks.register("setupNodeEverywhere") {
dependsOn(":kernelf-apigen:kotlinNodeJsSetup")
dependsOn(":kernelf-editor:kotlinNodeJsSetup")
dependsOn(":parser:kotlinNodeJsSetup")
dependsOn(":projectional-editor:kotlinNodeJsSetup")
dependsOn(":projectional-editor-ssr-client:kotlinNodeJsSetup")
dependsOn(":projectional-editor-ssr-client-lib:kotlinNodeJsSetup")
dependsOn(":projectional-editor-ssr-common:kotlinNodeJsSetup")
}
13 changes: 7 additions & 6 deletions editor-common-mps/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,19 @@ tasks {
outputFolder(defaultDestinationDir.get().resolve(project.name).resolve("languages"))
runtimeJars.forEach {
javaJar(it.name)
kotlinJar(it.name)
// kotlinJar(it.name)
}
kotlinJarFromMPS("util-8.jar")
// kotlinJarFromMPS("util-8.jar")
javaJarFromMPS("util-8.jar")
kotlinJarFromMPS("annotations.jar")
// kotlinJarFromMPS("annotations.jar")
moduleDependency(KnownModuleIds.Annotations)
moduleDependency(KnownModuleIds.JDK)
moduleDependency(KnownModuleIds.MPS_OpenAPI)
moduleDependency(KnownModuleIds.MPS_Core)
moduleDependency(KnownModuleIds.MPS_IDEA)
moduleDependency(KnownModuleIds.jetbrains_mps_kotlin_stdlib)
moduleDependency(KnownModuleIds.jetbrains_mps_kotlin_stdlib_jvm)
moduleDependency(KnownModuleIds.jetbrains_mps_kotlin_stubs)
// moduleDependency(KnownModuleIds.jetbrains_mps_kotlin_stdlib)
// moduleDependency(KnownModuleIds.jetbrains_mps_kotlin_stdlib_jvm)
// moduleDependency(KnownModuleIds.jetbrains_mps_kotlin_stubs)
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
modelix-model-api-gen = { id = "org.modelix.model-api-gen", version.ref = "modelixCore" }
npm-publish = { id = "dev.petuska.npm.publish", version = "3.4.2" }
modelix-mps-buildtools = { id = "org.modelix.mps.build-tools", version.ref = "modelixBuildtools" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

[versions]
modelixCore = "8.16.1"
modelixCore = "9.1.1"
modelixBuildtools="1.7.3"
kotlin = "2.1.0-Beta2"

[libraries]
modelix-model-api = { group = "org.modelix", name = "model-api", version.ref = "modelixCore" }
Expand Down
2 changes: 2 additions & 0 deletions kernelf-editor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,5 @@ tasks.named("packJsPackage") {
.copyTo(packagesDir.resolve("modelix-kernelf-editor.tgz"), overwrite = true)
}
}

tasks.named("packJsPackage") { dependsOn(":setupNodeEverywhere") }
2 changes: 0 additions & 2 deletions mps/.mps/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<project version="4">
<component name="MPSProject">
<projectModules>
<modulePath path="$PROJECT_DIR$/modules/org.modelix.mps.baseLanguage2kotlin/org.modelix.mps.baseLanguage2kotlin.mpl" folder="text" />
<modulePath path="$PROJECT_DIR$/modules/org.modelix.mps.baseLanguageInsideKotlin/org.modelix.mps.baseLanguageInsideKotlin.mpl" folder="text" />
<modulePath path="$PROJECT_DIR$/modules/org.modelix.mps.notation.impl.baseLanguage/org.modelix.mps.notation.impl.baseLanguage.msd" folder="text" />
<modulePath path="$PROJECT_DIR$/modules/org.modelix.mps.notation/org.modelix.mps.notation.mpl" folder="text" />
<modulePath path="$PROJECT_DIR$/modules/org.modelix.mps.react.impl.baseLanguage/org.modelix.mps.react.impl.baseLanguage.msd" folder="react" />
Expand Down
4 changes: 0 additions & 4 deletions mps/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,11 @@ mpsBuild {
publication("editor-languages") {
module("org.modelix.mps.webaspect.devkit")
module("org.modelix.mps.webaspect.genplan")
module("org.modelix.mps.baseLanguage2kotlin")
module("org.modelix.mps.notation")
}
publication("baseLanguage-notation") {
module("org.modelix.mps.notation.impl.baseLanguage")
}
publication("baseLanguageInsideKotlin") {
module("org.modelix.mps.baseLanguageInsideKotlin")
}
publication("react") {
module("org.modelix.mps.react")
}
Expand Down
Loading

0 comments on commit ee11f77

Please sign in to comment.