Skip to content

Commit

Permalink
chore: first release
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Jun 11, 2024
1 parent 94b70dc commit 87cbf7e
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 37 deletions.
50 changes: 33 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
jobs:
build-libs:
runs-on: ${{matrix.os}}
name: Build ${{matrix.platform}}-${{matrix.arch}}) library
name: Build ${{matrix.platform}}-${{matrix.arch}} library
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
working-directory: ktreesitter
run: |-
cmake --build .cmake/build --config Release
cmake --install .cmake/build --prefix --config Release .cmake/build
cmake --install .cmake/build --config Release --prefix .cmake/build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -89,24 +89,32 @@ jobs:
include:
- os: ubuntu-latest
platform: common
targets: :ktreesitter:publishKotlinMultiplatformPublicationToLocalRepository
targets: >-
generateGrammarFiles
:ktreesitter:publishKotlinMultiplatformPublicationToLocalRepository
- os: ubuntu-latest
platform: JVM
targets: :ktreesitter:publishJvmPublicationToLocalRepository
targets: >-
:ktreesitter:publishJvmPublicationToLocalRepository
- os: ubuntu-latest
platform: Android
targets: :ktreesitter:publishAndroidReleasePublicationToLocalRepository
targets: >-
:ktreesitter:publishAndroidReleasePublicationToLocalRepository
- os: ubuntu-latest
platform: Linux
targets: >-
generateGrammarFiles
:ktreesitter:publishLinuxX64PublicationToLocalRepository
:ktreesitter:publishLinuxArm64PublicationToLocalRepository
- os: windows-latest
platform: Windows
targets: :ktreesitter:publishMingwX64PublicationToLocalRepository
targets: >-
generateGrammarFiles
:ktreesitter:publishMingwX64PublicationToLocalRepository
- os: macos-latest
platform: macOS/iOS
targets: >-
generateGrammarFiles
:ktreesitter:publishMacosX64PublicationToLocalRepository
:ktreesitter:publishMacosArm64PublicationToLocalRepository
:ktreesitter:publishIosArm64PublicationToLocalRepository
Expand Down Expand Up @@ -154,7 +162,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ktreesitter-${{matrix.platform == 'macOS/iOS' && 'macOS-iOS' || matrix.platform}}
name: ktreesitter-jars-${{matrix.platform == 'macOS/iOS' && 'macOS-iOS' || matrix.platform}}
path: |
ktreesitter/build/repo/**
!ktreesitter/build/repo/**/maven-metadata.*
Expand All @@ -166,8 +174,8 @@ jobs:
permissions:
contents: write
environment:
name: sonatype
url: https://central.sonatype.com/artifact/io.github.treesitter/ktreesitter
name: maven-central
url: https://central.sonatype.com/artifact/io.github.tree-sitter/ktreesitter
env:
SONATYPE_API: https://central.sonatype.com/api/v1/publisher
SONATYPE_AUTH: "Authorization: Bearer ${{secrets.SONATYPE_TOKEN}}"
Expand All @@ -176,7 +184,7 @@ jobs:
uses: actions/download-artifact@v4
with:
path: ktreesitter
pattern: ktreesitter-*
pattern: ktreesitter-jars-*
merge-multiple: true
- name: Upload bundle
run: |-
Expand All @@ -200,10 +208,14 @@ jobs:
run: gh release create $GITHUB_REF_NAME --generate-notes
env:
GH_TOKEN: ${{github.token}}
GH_REPO: ${{github.repository}}
publish-plugin:
runs-on: ubuntu-latest
name: Publish Gradle plugin
name: Publish plugin on Gradle Portal
needs: [build-jars]
environment:
name: gradle-plugin-portal
url: https://plugins.gradle.org/plugin/io.github.tree-sitter.ktreesitter-plugin
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -218,10 +230,14 @@ jobs:
cache-dependency-path: |
gradle/libs.versions.toml
gradle/wrapper/gradle-wrapper.properties
- name: Publish plugin
run: >-
./gradlew --no-daemon :ktreesitter-plugin:publishPlugins
-Pgradle.publish.key=$PUBLISH_KEY -Pgradle.publish.secret=$PUBLISH_SECRET
- name: Restore Kotlin/Native prebuilt
uses: actions/cache/restore@v4
with:
path: ${{runner.tool_cache}}/konan/kotlin-native-prebuilt-*
key: konan-${{runner.os}}-prebuilt-1.9
- name: Publish Gradle plugin
run: ./gradlew --no-daemon :ktreesitter-plugin:publishPlugins
env:
PUBLISH_KEY: ${{secrets.GRADLE_PUBLISH_KEY}}
PUBLISH_SECRET: ${{secrets.GRADLE_PUBLISH_SECRET}}
KONAN_DATA_DIR: ${{runner.tool_cache}}/konan
GRADLE_PUBLISH_KEY: ${{secrets.GRADLE_PUBLISH_KEY}}
GRADLE_PUBLISH_SECRET: ${{secrets.GRADLE_PUBLISH_SECRET}}
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Kotlin Tree-sitter

[![CI][ci]](https://github.com/tree-sitter/kotlin-tree-sitter/actions/workflows/ci.yml)
[![central][central]](https://central.sonatype.com/artifact/io.github.tree-sitter/ktreesitter)
[![docs][docs]](https://tree-sitter.github.io/kotlin-tree-sitter/)

Kotlin bindings to the [tree-sitter] parsing library.
Expand All @@ -10,10 +9,14 @@ Kotlin bindings to the [tree-sitter] parsing library.

### ktreesitter

[![central][central]](https://central.sonatype.com/artifact/io.github.tree-sitter/ktreesitter)

The KTreeSitter library module.

### ktreesitter-plugin

[![portal][portal]](https://plugins.gradle.org/plugin/io.github.tree-sitter.ktreesitter-plugin)

The plugin responsible for generating source files for languages.

### languages
Expand All @@ -23,4 +26,5 @@ Some bundled languages that are relevant to Kotlin development.
[tree-sitter]: https://tree-sitter.github.io/tree-sitter/
[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/kotlin-tree-sitter/ci.yml?logo=github&label=CI
[central]: https://img.shields.io/maven-central/v/io.github.tree-sitter/ktreesitter?logo=sonatype&label=Maven%20Central
[docs]: https://img.shields.io/github/deployments/tree-sitter/kotlin-tree-sitter/github-pages?logo=kotlin&label=Docs
[portal]: https://img.shields.io/gradle-plugin-portal/v/io.github.treesitter.ktreesitter-plugin?logo=gradle&label=Gradle%20Plugin%20Portal
[docs]: https://img.shields.io/github/deployments/tree-sitter/kotlin-tree-sitter/github-pages?logo=kotlin&label=API%20Docs
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The version of the project.
project.version=0.1.0
project.version=0.22.4

# The Android SDK version that is used to compile the project.
sdk.version.compile=34
Expand Down
39 changes: 23 additions & 16 deletions ktreesitter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -158,33 +158,40 @@ publishing {
publications.withType(MavenPublication::class) {
artifact(tasks["javadocJar"])
pom {
name.set("KTreeSitter")
description.set("Kotlin bindings to the Tree-sitter parsing library")
url.set("https://tree-sitter.github.io/kotlin-tree-sitter/")
inceptionYear.set("2024")
name = "KTreeSitter"
description = "Kotlin bindings to the Tree-sitter parsing library"
url = "https://tree-sitter.github.io/kotlin-tree-sitter/"
inceptionYear = "2024"
organization {
name = "tree-sitter"
url = "https://github.com/tree-sitter"
}
licenses {
license {
name.set("MIT License")
url.set("https://spdx.org/licenses/MIT.html")
name = "MIT License"
url = "https://spdx.org/licenses/MIT.html"
}
}
developers {
developer {
id.set("ObserverOfTime")
email.set("[email protected]")
url.set("https://github.com/ObserverOfTime")
id = "ObserverOfTime"
name = "ObserverOfTime"
email = "[email protected]"
url = "https://github.com/ObserverOfTime"
}
}
scm {
url.set("https://github.com/tree-sitter/kotlin-tree-sitter")
connection.set("scm:git:git://github.com/tree-sitter/kotlin-tree-sitter.git")
developerConnection.set(
"scm:git:ssh://github.com/tree-sitter/kotlin-tree-sitter.git"
)
url = "https://github.com/tree-sitter/kotlin-tree-sitter"
connection = "scm:git:git://github.com/tree-sitter/kotlin-tree-sitter.git"
developerConnection = "scm:git:ssh://github.com/tree-sitter/kotlin-tree-sitter.git"
}
issueManagement {
system = "GitHub Issues"
url = "https://github.com/tree-sitter/kotlin-tree-sitter/issues"
}
ciManagement {
system.set("GitHub Actions")
url.set("https://github.com/tree-sitter/kotlin-tree-sitter/actions")
system = "GitHub Actions"
url = "https://github.com/tree-sitter/kotlin-tree-sitter/actions"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tree-sitter
Submodule tree-sitter updated 62 files
+3 −3 .github/workflows/build.yml
+226 −255 Cargo.lock
+9 −9 Cargo.toml
+3 −3 build.zig
+4 −6 cli/Cargo.toml
+1 −0 cli/benches/benchmark.rs
+2 −16 cli/loader/src/lib.rs
+0 −3 cli/npm/package.json
+0 −122 cli/src/fuzz/allocations.rs
+0 −147 cli/src/fuzz/corpus_test.rs
+0 −60 cli/src/fuzz/edits.rs
+0 −349 cli/src/fuzz/mod.rs
+18 −37 cli/src/generate/dsl.js
+32 −93 cli/src/generate/grammar_files.rs
+11 −30 cli/src/generate/mod.rs
+16 −10 cli/src/generate/render.rs
+5 −5 cli/src/generate/templates/.editorconfig
+47 −0 cli/src/generate/templates/Package.swift
+2 −39 cli/src/generate/templates/__init__.py
+0 −9 cli/src/generate/templates/__init__.pyi
+0 −9 cli/src/generate/templates/binding_test.js
+1 −4 cli/src/generate/templates/cargo.toml
+1 −1 cli/src/generate/templates/gitattributes
+0 −1 cli/src/generate/templates/gitignore
+1 −1 cli/src/generate/templates/js-binding.cc
+12 −11 cli/src/generate/templates/lib.rs
+10 −9 cli/src/generate/templates/package.json
+0 −60 cli/src/generate/templates/package.swift
+1 −1 cli/src/generate/templates/py-binding.c
+3 −3 cli/src/generate/templates/pyproject.toml
+3 −5 cli/src/generate/templates/setup.py
+0 −11 cli/src/generate/templates/test_binding.py
+0 −12 cli/src/generate/templates/tests.swift
+67 −89 cli/src/highlight.rs
+0 −1 cli/src/lib.rs
+27 −66 cli/src/main.rs
+7 −1 cli/src/parse.rs
+36 −40 cli/src/test.rs
+8 −6 cli/src/test_highlight.rs
+8 −6 cli/src/test_tags.rs
+224 −36 cli/src/tests/corpus_test.rs
+55 −0 cli/src/tests/helpers/edits.rs
+1 −1 cli/src/tests/helpers/fixtures.rs
+33 −2 cli/src/tests/helpers/mod.rs
+0 −0 cli/src/tests/helpers/random.rs
+0 −0 cli/src/tests/helpers/scope_sequence.rs
+0 −7 cli/src/tests/mod.rs
+4 −4 cli/src/tests/node_test.rs
+3 −4 cli/src/tests/parser_test.rs
+2 −4 cli/src/tests/query_test.rs
+2 −2 cli/src/tests/tree_test.rs
+2 −4 docs/Gemfile.lock
+4 −5 highlight/src/lib.rs
+1 −2 lib/Cargo.toml
+2 −1 lib/binding_rust/build.rs
+6 −21 lib/binding_rust/lib.rs
+1 −1 lib/binding_web/test/language-test.js
+0 −14 lib/language/Cargo.toml
+0 −20 lib/language/language.rs
+1 −1 lib/src/clock.h
+9 −10 lib/src/wasm_store.c
+1 −1 tags/src/lib.rs

0 comments on commit 87cbf7e

Please sign in to comment.