-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract testing library to its own module
- Loading branch information
Martin Azpillaga Aldalur
committed
Feb 22, 2024
1 parent
1182fe7
commit 322336b
Showing
8 changed files
with
90 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,29 +13,9 @@ repositories { | |
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.21") | ||
|
||
implementation("com.strumenta.kolasu:kolasu-core:1.5.31") | ||
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j:0.21.1") | ||
implementation("org.apache.lucene:lucene-core:9.8.0") | ||
|
||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.1") | ||
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.6.0") | ||
} | ||
|
||
tasks.register<Jar>("testingJar") { | ||
from(tasks.getByName("compileTestKotlin")) | ||
archiveBaseName = "library-testing" | ||
} | ||
|
||
tasks.register<Jar>("testingSourcesJar") { | ||
from(tasks.getByName("compileTestKotlin").outputs) | ||
archiveBaseName = "library-testing" | ||
archiveClassifier = "sources" | ||
} | ||
|
||
tasks.register<Jar>("testingJavadocJar") { | ||
archiveBaseName = "library-testing" | ||
archiveClassifier = "javadoc" | ||
} | ||
|
||
java { | ||
|
@@ -52,8 +32,8 @@ publishing { | |
val snapshotRepo = URI("https://oss.sonatype.org/content/repositories/snapshots/") | ||
url = if (isReleaseVersion) releaseRepo else snapshotRepo | ||
credentials { | ||
username = project.properties["ossrhUsername"] as String | ||
password = project.properties["ossrhPassword"] as String | ||
username = project.properties["ossrhUsername"] as? String | ||
password = project.properties["ossrhPassword"] as? String | ||
} | ||
} | ||
} | ||
|
@@ -91,45 +71,10 @@ publishing { | |
developerConnection = "scm:git:ssh:github.com/Strumenta/kolasu-languageserver-library.git" | ||
} | ||
} | ||
create<MavenPublication>("language-server-testing") { | ||
groupId = "com.strumenta.kolasu.languageserver" | ||
artifactId = "testing" | ||
version = project.version as String | ||
|
||
artifact(tasks.getByName("testingJar")) | ||
artifact(tasks.getByName("testingSourcesJar")) | ||
artifact(tasks.getByName("testingJavadocJar")) | ||
|
||
pom { | ||
name = "Kolasu language server testing" | ||
description = "Testing helpers for Kolasu language server library" | ||
inceptionYear = "2023" | ||
url = "https://github.com/Strumenta/kolasu-languageserver-library" | ||
licenses { | ||
license { | ||
name = "Apache License, Version 2.0" | ||
url = "https://opensource.org/license/apache-2-0/" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "martin-azpillaga" | ||
name = "Martin Azpillaga Aldalur" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
url = "https://github.com/Strumenta/kolasu-languageserver-library.git" | ||
connection = "scm:git:git:github.com/Strumenta/kolasu-languageserver-library.git" | ||
developerConnection = "scm:git:ssh:github.com/Strumenta/kolasu-languageserver-library.git" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign(publishing.publications.getByName("language-server-library")) | ||
sign(publishing.publications.getByName("language-server-testing")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
include("library") | ||
include("testing") | ||
include("plugin") | ||
|
||
rootProject.name="kolasu-languageserver" | ||
project(":library").name = "kolasu-languageserver-library" | ||
project(":testing").name = "kolasu-languageserver-testing" | ||
project(":plugin").name = "kolasu-languageserver-plugin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import java.net.URI | ||
|
||
plugins { | ||
id("org.jetbrains.kotlin.jvm") version "1.8.22" | ||
id("org.jlleitschuh.gradle.ktlint") version "11.6.0" | ||
id("maven-publish") | ||
id("signing") | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation(project(":kolasu-languageserver-library")) | ||
implementation("com.strumenta.kolasu:kolasu-core:1.5.31") | ||
implementation("org.eclipse.lsp4j:org.eclipse.lsp4j:0.21.1") | ||
implementation("org.junit.jupiter:junit-jupiter-api:5.7.1") | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
val isReleaseVersion = !(project.version as String).endsWith("SNAPSHOT") | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
val releaseRepo = URI("https://oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
val snapshotRepo = URI("https://oss.sonatype.org/content/repositories/snapshots/") | ||
url = if (isReleaseVersion) releaseRepo else snapshotRepo | ||
credentials { | ||
username = project.properties["ossrhUsername"] as? String | ||
password = project.properties["ossrhPassword"] as? String | ||
} | ||
} | ||
} | ||
publications { | ||
create<MavenPublication>("language-server-testing") { | ||
groupId = "com.strumenta.kolasu.languageserver" | ||
artifactId = "testing" | ||
version = project.version as String | ||
|
||
artifact(tasks.getByName("jar")) | ||
artifact(tasks.getByName("sourcesJar")) | ||
artifact(tasks.getByName("javadocJar")) | ||
|
||
pom { | ||
name = "Kolasu language server testing" | ||
description = "Test Kolasu language servers" | ||
inceptionYear = "2023" | ||
url = "https://github.com/Strumenta/kolasu-languageserver-library" | ||
licenses { | ||
license { | ||
name = "Apache License, Version 2.0" | ||
url = "https://opensource.org/license/apache-2-0/" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "martin-azpillaga" | ||
name = "Martin Azpillaga Aldalur" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
url = "https://github.com/Strumenta/kolasu-languageserver-library.git" | ||
connection = "scm:git:git:github.com/Strumenta/kolasu-languageserver-library.git" | ||
developerConnection = "scm:git:ssh:github.com/Strumenta/kolasu-languageserver-library.git" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign(publishing.publications.getByName("language-server-testing")) | ||
} |
2 changes: 1 addition & 1 deletion
2
...erver/testing/DiagnosticListenerClient.kt → ...otlin/testing/DiagnosticListenerClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...anguageserver/testing/TestKolasuServer.kt → ...c/main/kotlin/testing/TestKolasuServer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters