Skip to content

Commit

Permalink
Merge pull request #50 from atlassian-labs/nlam/release-version-1.1.4
Browse files Browse the repository at this point in the history
Release version 1.1.4
  • Loading branch information
nlam-atlassian authored Oct 23, 2024
2 parents 82104f4 + 383e4b0 commit be462b6
Show file tree
Hide file tree
Showing 14 changed files with 164 additions and 738 deletions.
112 changes: 111 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import java.io.FileInputStream
import java.net.URL
import java.util.Properties

plugins {
Expand All @@ -7,6 +8,8 @@ plugins {
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.ktlint)
alias(libs.plugins.dokka)
id("maven-publish")
id("signing")
}

repositories {
Expand All @@ -27,7 +30,114 @@ versionProperties.load(FileInputStream("version.properties"))

allprojects {
group = "com.atlassian.prosemirror"
version = versionProperties.get("projectVersion") as String
version = versionProperties["projectVersion"] as String
}

subprojects {
apply(plugin = "maven-publish")
apply(plugin = "signing")
apply(plugin = "org.jetbrains.dokka") // TODO: use alias

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"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}

val jvmMain by getting {
sourceLink {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
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"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}

val nativeMain by getting {
sourceLink {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
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"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}
}
}

publishing {
publications {
publications.withType<MavenPublication> {
pom {
name.set(project.name)
description.set(project.ext.get("pomDescription") as String)
url.set(project.ext.get("srcUrl") as String)

scm {
connection.set("[email protected]:atlassian-labs/prosemirror-kotlin.git")
url.set("https://github.com/atlassian-labs/prosemirror-kotlin.git")
}
developers {
developer {
id.set("dmarques")
name.set("Douglas Marques")
email.set("[email protected]")
}
developer {
id.set("achernykh")
name.set("Aleksei Chernykh")
email.set("[email protected]")
}
}
licenses {
license {
name.set("Apache License 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
distribution.set("repo")
}
}
}
}
}

repositories {
maven {
url = uri("https://packages.atlassian.com/maven-central")
credentials {
username = System.getenv("ARTIFACTORY_USERNAME")
password = System.getenv("ARTIFACTORY_API_KEY")
}
}
}
}

signing {
setRequired { System.getenv("SIGNING_KEY") == "" } // only sign if the key is available (usually on CI)
useInMemoryPgpKeys(
System.getenv("SIGNING_KEY"),
System.getenv("SIGNING_PASSWORD"),
)
sign(publishing.publications)
}
}
}

val javaVersion = JavaVersion.VERSION_17
Expand Down
103 changes: 2 additions & 101 deletions collab/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import java.net.URL
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.ktlint)
alias(libs.plugins.dokka)
id("maven-publish")
id("signing")
}

kotlin {
Expand Down Expand Up @@ -46,103 +42,8 @@ kotlin {
implementation(libs.test.assertk)
}
}

tasks.dokkaHtml {
dokkaSourceSets {
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("https://github.com/atlassian-labs/prosemirror-kotlin/collab/src/main/src/commonMain/kotlin"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}

val jvmMain by getting {
sourceLink {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
localDirectory.set(file("src/jvmMain/kotlin"))

// URL showing where the source code can be accessed through the web browser
remoteUrl.set(URL("https://github.com/atlassian-labs/prosemirror-kotlin/collab/src/main/src/jvmMain/kotlin"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}

val nativeMain by getting {
sourceLink {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
localDirectory.set(file("src/nativeMain/kotlin"))

// URL showing where the source code can be accessed through the web browser
remoteUrl.set(URL("https://github.com/atlassian-labs/prosemirror-kotlin/collab/src/main/src/nativeMain/kotlin/"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}
}
}
}

description = "prosemirror-state"

publishing {
publications {
publications.withType<MavenPublication> {
pom {
name.set(project.name)
description.set("Collaborative editing for ProseMirror")
url.set("https://github.com/atlassian-labs/prosemirror-kotlin/tree/collab/")

scm {
connection.set("[email protected]:atlassian-labs/prosemirror-kotlin.git")
url.set("https://github.com/atlassian-labs/prosemirror-kotlin.git")
}
developers {
developer {
id.set("dmarques")
name.set("Douglas Marques")
email.set("[email protected]")
}
developer {
id.set("achernykh")
name.set("Aleksei Chernykh")
email.set("[email protected]")
}
}
licenses {
license {
name.set("Apache License 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
distribution.set("repo")
}
}
}
}
}

repositories {
maven {
url = uri("https://packages.atlassian.com/maven-central")
credentials {
username = System.getenv("ARTIFACTORY_USERNAME")
password = System.getenv("ARTIFACTORY_API_KEY")
}
}
}
}

signing {
useInMemoryPgpKeys(
System.getenv("SIGNING_KEY"),
System.getenv("SIGNING_PASSWORD"),
)
sign(publishing.publications)
}
ext.set("pomDescription", "Collaborative editing for ProseMirror")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/collab/")
103 changes: 2 additions & 101 deletions history/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import java.net.URL
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.ktlint)
alias(libs.plugins.dokka)
id("maven-publish")
id("signing")
}

kotlin {
Expand Down Expand Up @@ -48,103 +44,8 @@ kotlin {
implementation(libs.test.assertk)
}
}

tasks.dokkaHtml {
dokkaSourceSets {
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("https://github.com/atlassian-labs/prosemirror-kotlin/history/src/main/src/commonMain/kotlin"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}

val jvmMain by getting {
sourceLink {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
localDirectory.set(file("src/jvmMain/kotlin"))

// URL showing where the source code can be accessed through the web browser
remoteUrl.set(URL("https://github.com/atlassian-labs/prosemirror-kotlin/history/src/main/src/jvmMain/kotlin"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}

val nativeMain by getting {
sourceLink {
// Unix based directory relative path to the root of the project (where you execute gradle respectively).
localDirectory.set(file("src/nativeMain/kotlin"))

// URL showing where the source code can be accessed through the web browser
remoteUrl.set(URL("https://github.com/atlassian-labs/prosemirror-kotlin/history/src/main/src/nativeMain/kotlin/"))

// Suffix which is used to append the line number to the URL. Use #L for GitHub
remoteLineSuffix.set("#lines-")
}
}
}
}
}

description = "prosemirror-history"

publishing {
publications {
publications.withType<MavenPublication> {
pom {
name.set(project.name)
description.set("Undo history for ProseMirror")
url.set("https://github.com/atlassian-labs/prosemirror-kotlin/tree/history/")

scm {
connection.set("[email protected]:atlassian-labs/prosemirror-kotlin.git")
url.set("https://github.com/atlassian-labs/prosemirror-kotlin.git")
}
developers {
developer {
id.set("dmarques")
name.set("Douglas Marques")
email.set("[email protected]")
}
developer {
id.set("achernykh")
name.set("Aleksei Chernykh")
email.set("[email protected]")
}
}
licenses {
license {
name.set("Apache License 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
distribution.set("repo")
}
}
}
}
}

repositories {
maven {
url = uri("https://packages.atlassian.com/maven-central")
credentials {
username = System.getenv("ARTIFACTORY_USERNAME")
password = System.getenv("ARTIFACTORY_API_KEY")
}
}
}
}

signing {
useInMemoryPgpKeys(
System.getenv("SIGNING_KEY"),
System.getenv("SIGNING_PASSWORD"),
)
sign(publishing.publications)
}
ext.set("pomDescription", "Undo history for ProseMirror")
ext.set("srcUrl", "https://github.com/atlassian-labs/prosemirror-kotlin/tree/main/history/")
Loading

0 comments on commit be462b6

Please sign in to comment.