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

Cleanup gradle and added ported versions for each module #53

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ subprojects {
apply(plugin = "signing")
apply(plugin = "org.jetbrains.dokka") // TODO: use alias

val srcUrl = "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/${project.name}/"
afterEvaluate { // afterEvaluate so that project.ext values will be available
project.tasks.dokkaHtml {
dokkaSourceSets {
val urlPrefix = project.ext.get("srcUrl") as String
val commonMain by getting {
sourceLink {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
localDirectory.set(file("src/commonMain/kotlin"))

// URL showing where the source code can be accessed through the web browser
remoteUrl.set(URL("${urlPrefix}src/main/src/commonMain/kotlin"))
remoteUrl.set(URL("${srcUrl}src/main/src/commonMain/kotlin"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
Expand All @@ -61,7 +61,7 @@ subprojects {
localDirectory.set(file("src/jvmMain/kotlin"))

// URL showing where the source code can be accessed through the web browser
remoteUrl.set(URL("${urlPrefix}src/main/src/jvmMain/kotlin"))
remoteUrl.set(URL("${srcUrl}src/main/src/jvmMain/kotlin"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
Expand All @@ -74,7 +74,7 @@ subprojects {
localDirectory.set(file("src/nativeMain/kotlin"))

// URL showing where the source code can be accessed through the web browser
remoteUrl.set(URL("${urlPrefix}src/main/src/nativeMain/kotlin"))
remoteUrl.set(URL("${srcUrl}src/main/src/nativeMain/kotlin"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
Expand All @@ -89,7 +89,7 @@ subprojects {
pom {
name.set(project.name)
description.set(project.ext.get("pomDescription") as String)
url.set(project.ext.get("srcUrl") as String)
url.set(srcUrl)

scm {
connection.set("[email protected]:atlassian-labs/prosemirror-kotlin.git")
Expand Down
4 changes: 4 additions & 0 deletions collab/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
This module implements an API into which a communication channel for
collaborative editing can be hooked. See
[the guide](/docs/guide/#collab) for more details and an example.

## Versioning
This module is a port of version [1.3.0](https://github.com/ProseMirror/prosemirror-collab/releases/tag/1.3.0)
of prosemirror-collab
5 changes: 2 additions & 3 deletions collab/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kotlin {
}

// iOS
val xcframeworkName = "collab"
val xcframeworkName = project.name
val xcf = XCFramework(xcframeworkName)
listOf(
iosX64(),
Expand Down Expand Up @@ -45,6 +45,5 @@ kotlin {
}
}

description = "prosemirror-state"
description = "prosemirror-collab"
ext.set("pomDescription", "Collaborative editing for ProseMirror")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/collab/")
3 changes: 1 addition & 2 deletions history/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kotlin {
}

// iOS
val xcframeworkName = "history"
val xcframeworkName = project.name
val xcf = XCFramework(xcframeworkName)
listOf(
iosX64(),
Expand Down Expand Up @@ -48,4 +48,3 @@ kotlin {

description = "prosemirror-history"
ext.set("pomDescription", "Undo history for ProseMirror")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/history/")
3 changes: 1 addition & 2 deletions model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kotlin {
}

// iOS
val xcframeworkName = "model"
val xcframeworkName = project.name
val xcf = XCFramework(xcframeworkName)
listOf(
iosX64(),
Expand Down Expand Up @@ -49,4 +49,3 @@ kotlin {

description = "prosemirror-model"
ext.set("pomDescription", "ProseMirror document model")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/model/")
4 changes: 4 additions & 0 deletions state/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ ProseMirror has a plugin system.
@PluginView
@Plugin
@PluginKey

## Versioning
This module is a port of version [1.4.0](https://github.com/ProseMirror/prosemirror-state/releases/tag/1.4.0)
of prosemirror-state
3 changes: 1 addition & 2 deletions state/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kotlin {
}

// iOS
val xcframeworkName = "state"
val xcframeworkName = project.name
val xcf = XCFramework(xcframeworkName)
listOf(
iosX64(),
Expand Down Expand Up @@ -48,4 +48,3 @@ kotlin {

description = "prosemirror-state"
ext.set("pomDescription", "ProseMirror editor state")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/state/")
3 changes: 1 addition & 2 deletions test-builder/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kotlin {
}

// iOS
val xcframeworkName = "test-builder"
val xcframeworkName = project.name
val xcf = XCFramework(xcframeworkName)
listOf(
iosX64(),
Expand Down Expand Up @@ -44,4 +44,3 @@ kotlin {

description = "prosemirror-test-builder"
ext.set("pomDescription", "Document building utilities for writing tests")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/test-builder/")
4 changes: 4 additions & 0 deletions transform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ transformations or determining whether they are even possible.
@joinPoint
@insertPoint
@dropPoint

## Versioning
This module is a port of version [1.6.0](https://github.com/ProseMirror/prosemirror-transform/releases/tag/1.6.0)
of prosemirror-transform
3 changes: 1 addition & 2 deletions transform/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kotlin {
}

// iOS
val xcframeworkName = "transform"
val xcframeworkName = project.name
val xcf = XCFramework(xcframeworkName)
listOf(
iosX64(),
Expand Down Expand Up @@ -46,4 +46,3 @@ kotlin {

description = "prosemirror-transform"
ext.set("pomDescription", "ProseMirror document transformations")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/transform/")
3 changes: 1 addition & 2 deletions util/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kotlin {
}

// iOS
val xcframeworkName = "util"
val xcframeworkName = project.name
val xcf = XCFramework(xcframeworkName)
listOf(
iosX64(),
Expand Down Expand Up @@ -43,4 +43,3 @@ kotlin {

description = "prosemirror-util"
ext.set("pomDescription", "ProseMirror utilities")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/util/")