Skip to content

Commit

Permalink
fix publications and tests in example projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Azpillaga Aldalur committed Oct 27, 2023
1 parent dca81e7 commit 5924033
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion examples/entity
2 changes: 1 addition & 1 deletion examples/rpg
Submodule rpg updated from 589f8f to eb7479
5 changes: 3 additions & 2 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ tasks.test {

tasks.register<Jar>("createTestJar") {
archiveBaseName = "library-test"
from(Paths.get("src", "test", "kotlin"))
exclude("com/strumenta/languageserver/test/rpg*")
from(Paths.get("build", "classes", "kotlin", "test"))
exclude("com/strumenta/languageserver/testing/rpg*")
dependsOn(tasks.getByName("compileTestKotlin"))
}

publishing {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.strumenta.languageserver.test
package com.strumenta.languageserver.testing

import org.eclipse.lsp4j.MessageActionItem
import org.eclipse.lsp4j.MessageParams
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.strumenta.languageserver.test
package com.strumenta.languageserver.testing

import com.google.gson.JsonObject
import com.strumenta.kolasu.model.Node
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.strumenta.languageserver.test.rpg
package com.strumenta.languageserver.testing.rpg

import com.strumenta.kolasu.model.Node
import com.strumenta.languageserver.SymbolResolver
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.strumenta.languageserver.test.rpg
package com.strumenta.languageserver.testing.rpg

import com.strumenta.kolasu.parsing.ASTParser
import com.strumenta.languageserver.SymbolResolver
import com.strumenta.languageserver.test.TestKolasuServer
import com.strumenta.languageserver.testing.TestKolasuServer
import com.strumenta.rpgparser.RPGKolasuParser
import com.strumenta.rpgparser.model.CompilationUnit
import org.eclipse.lsp4j.Position
Expand Down
8 changes: 1 addition & 7 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ gradlePlugin {
plugins {
create("language-server-plugin") {
group = "com.strumenta"
id = "language-server-plugin"
id = "com.strumenta.language-server-plugin"
version = "0.0.0"
implementationClass = "com.strumenta.languageserver.LanguageServerPlugin"
}
Expand All @@ -36,10 +36,4 @@ publishing {
}
}
}
publications {
create<MavenPublication>("language-server-plugin") {
artifactId = "language-server-plugin"
from(components["java"])
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ class LanguageServerPlugin : Plugin<Project?> {
project.dependencies.add("implementation", "org.apache.lucene:lucene-core:9.8.0")
project.dependencies.add("implementation", "org.apache.lucene:lucene-codecs:9.8.0")
project.dependencies.add("implementation", "org.apache.lucene:lucene-queryparser:9.8.0")
project.dependencies.add("testImplementation", "org.jetbrains.kotlin:kotlin-test-junit:1.8.22")

project.dependencies.add("testImplementation", "com.strumenta:language-server-test:0.0.0")
project.dependencies.add("testImplementation", "org.junit.jupiter:junit-jupiter:5.+")

val projectPath = project.projectDir.toString()
val language = project.rootProject.name
Expand Down Expand Up @@ -93,6 +94,9 @@ class LanguageServerPlugin : Plugin<Project?> {
shadowJar.archiveFileName.set("$language.jar")
shadowJar.excludes.add("org/apache/lucene/**/*")

val testTask = project.tasks.getByName("test") as org.gradle.api.tasks.testing.Test
testTask.useJUnitPlatform()

addCreateVscodeExtensionTask(project)
addLaunchVscodeEditorTask(project)
}
Expand Down

0 comments on commit 5924033

Please sign in to comment.