Skip to content

Commit

Permalink
Merge branch 'main' into nlam/release-version-1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nlam-atlassian committed Oct 17, 2024
2 parents dc62d1e + 46c68f9 commit 8097679
Show file tree
Hide file tree
Showing 191 changed files with 31,955 additions and 2,879 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ indent_size = 4
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
ij_java_class_count_to_use_import_on_demand = 999
ktlint_standard_trailing-comma-on-call-site=disabled
ktlint_standard_trailing-comma-on-declaration-site=disabled
ktlint_function_signature_wrapping_rule_always_with_minimum_parameters = 3

[*.kts]
ij_kotlin_imports_layout = *
Expand All @@ -40,5 +43,5 @@ ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
ij_java_class_count_to_use_import_on_demand = 999

[*.{tf, yml, yaml}]
[*.{tf,yml,yaml}]
indent_size = 2
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
3 changes: 2 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Disable ios simulator tests for some modules for now because they are flaky
- name: Build with Gradle
run: ./gradlew build --no-configuration-cache
run: ./gradlew build -x :history:iosSimulatorArm64Test -x :transform:iosSimulatorArm64Test --no-configuration-cache

# Populates ARTIFACTORY_USERNAME and ARTIFACTORY_API_KEY with
# temporary username/password for publishing to packages.atlassian.com
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ jobs:
with:
output-modes: environment

# Publishes to Artifactory only on push to the "release" branch.
# Publishes to Artifactory only when a tag is pushed
- name: "Publish"
run: ./gradlew assemble --no-configuration-cache && ./gradlew publish --no-configuration-cache --stacktrace
205 changes: 205 additions & 0 deletions .github/workflows/publish_ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
name: Create release and upload iOS artifacts

on:
push:
branches: [ "release" ]

jobs:
build:
runs-on: macos-latest

permissions:
contents: write
id-token: write

env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}

steps:

- name: "Checkout sources"
uses: actions/checkout@v4

- name: "Setup Java"
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'

- name: "Build xcframework"
run: ./gradlew assembleXCFramework

- name: release
uses: actions/create-release@v1
id: create_release
with:
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
body: "Release ${{ github.ref }}"
env:
GITHUB_TOKEN: ${{ github.token }}

- name: "Release data:"
run: echo id ${{steps.create_release.outputs.id}} html_url ${{steps.create_release.outputs.html_url}} upload_url ${{steps.create_release.outputs.upload_url}}

- name: "Prepare xcframework artifacts for collab module"
run: bash ${GITHUB_WORKSPACE}/gradle/pack_xcframework.sh collab ${{steps.create_release.outputs.html_url}}

- name: "Prepare xcframework artifacts for history module"
run: bash ${GITHUB_WORKSPACE}/gradle/pack_xcframework.sh history ${{steps.create_release.outputs.html_url}}

- name: "Prepare xcframework artifacts for model module"
run: bash ${GITHUB_WORKSPACE}/gradle/pack_xcframework.sh model ${{steps.create_release.outputs.html_url}}

- name: "Prepare xcframework artifacts for state module"
run: bash ${GITHUB_WORKSPACE}/gradle/pack_xcframework.sh state ${{steps.create_release.outputs.html_url}}

- name: "Prepare xcframework artifacts for test-builder module"
run: bash ${GITHUB_WORKSPACE}/gradle/pack_xcframework.sh test-builder ${{steps.create_release.outputs.html_url}}

- name: "Prepare xcframework artifacts for transform module"
run: bash ${GITHUB_WORKSPACE}/gradle/pack_xcframework.sh transform ${{steps.create_release.outputs.html_url}}

- name: "Prepare xcframework artifacts for util module"
run: bash ${GITHUB_WORKSPACE}/gradle/pack_xcframework.sh util ${{steps.create_release.outputs.html_url}}

- name: upload xcframework artifacts for collab module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./collab/build/collab.xcframework.zip
asset_name: collab.xcframework.zip
asset_content_type: application/zip

- name: upload Package.swift artifacts for collab module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./collab/build/Package.swift
asset_name: collab.package.swift
asset_content_type: text/plain

- name: upload xcframework artifacts for history module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./history/build/history.xcframework.zip
asset_name: history.xcframework.zip
asset_content_type: application/zip

- name: upload Package.swift artifacts for history module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./history/build/Package.swift
asset_name: history.package.swift
asset_content_type: text/plain

- name: upload xcframework artifacts for model module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./model/build/model.xcframework.zip
asset_name: model.xcframework.zip
asset_content_type: application/zip

- name: upload Package.swift artifacts for model module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./model/build/Package.swift
asset_name: model.package.swift
asset_content_type: text/plain

- name: upload xcframework artifacts for state module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./state/build/state.xcframework.zip
asset_name: state.xcframework.zip
asset_content_type: application/zip

- name: upload Package.swift artifacts for state module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./state/build/Package.swift
asset_name: state.package.swift
asset_content_type: text/plain

- name: upload xcframework artifacts for test-builder module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./test-builder/build/test_builder.xcframework.zip
asset_name: test-builder.xcframework.zip
asset_content_type: application/zip

- name: upload Package.swift artifacts for test-builder module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./test-builder/build/Package.swift
asset_name: test-builder.package.swift
asset_content_type: text/plain

- name: upload xcframework artifacts for transform module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./transform/build/transform.xcframework.zip
asset_name: transform.xcframework.zip
asset_content_type: application/zip

- name: upload Package.swift artifacts for transform module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./transform/build/Package.swift
asset_name: transform.package.swift
asset_content_type: text/plain

- name: upload xcframework artifacts for util module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./util/build/util.xcframework.zip
asset_name: util.xcframework.zip
asset_content_type: application/zip

- name: upload Package.swift artifacts for util module
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./util/build/Package.swift
asset_name: util.package.swift
asset_content_type: text/plain
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ Prior to accepting your contributions we ask that you please follow the appropri

* [CLA for corporate contributors](https://opensource.atlassian.com/corporate)
* [CLA for individuals](https://opensource.atlassian.com/individual)

## Releases
To create a release, follow these steps:
1. Update the version in the `build.gradle.kts` file.
2. Create a PR with these changes, targeting the `main` branch.
3. Once the PR is merged, create a PR to merge `main` into `release` branch.
4. Once the 2nd PR is merged, the CI/CD pipeline will create a release, upload iOS assets and publish Android binaries to Artifactory.
5. Create a new tag with the format `v*` (e.g. `v1.1.0`) on the `release` branch.
4. Once the release is created, edit the release in the Github UI to add release notes for this release (using `Generate release notes`).
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ Java/Kotlin implementation of [Prosemirror](https://prosemirror.net/)

Contributions to prosemirror-kotlin are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## Maven / Gradle dependency
Add prosemirror-kotlin dependencies using prosemirror.<moduleIdentifier> in place of the normal artifact specifier.

Check the latest packages at Maven central on: https://packages.atlassian.com/maven-central/com/atlassian/prosemirror/<moduleIdentifier>.

### Maven:
```xml
<dependency>
<groupId>com.atlassian.prosemirror</groupId>
<artifactId>{moduleIdentifier}</artifactId>
<version>{latest}</version>
</dependency>
```

### Gradle:
```kotlin
implementation("com.atlassian.prosemirror:{moduleIdentifier}:{latest}") // this version number should be updated to update the version of prosemirror-kotlin
```

## License

Copyright (c) 2024 Atlassian and others.
Expand Down
12 changes: 12 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 1.0.0 | :x: |
| > 1.0.0 | :white_check_mark: |

## Reporting a Vulnerability

Please report Vulnerability on the issues section.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.kotlinMultiplatform).apply(false)
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.ktlint)
alias(libs.plugins.dokka)
}
Expand All @@ -20,7 +21,7 @@ dependencies {

allprojects {
group = "com.atlassian.prosemirror"
version = "1.0.4"
version = "1.1.1"
}

val javaVersion = JavaVersion.VERSION_17
Expand Down
18 changes: 0 additions & 18 deletions collab/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
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.

## Maven / Gradle dependency

Check the latest package at Maven central on: https://packages.atlassian.com/maven-central/com/atlassian/prosemirror/collab.

### Maven:
```xml
<dependency>
<groupId>com.atlassian.prosemirror</groupId>
<artifactId>collab</artifactId>
<version>1.0.2</version>
</dependency>
```

### Gradle:
```kotlin
implementation("com.atlassian.prosemirror:collab:1.0.2")
```
Loading

0 comments on commit 8097679

Please sign in to comment.