Skip to content

Commit

Permalink
Merge pull request #16 from ty1824/actionJavaVersion8
Browse files Browse the repository at this point in the history
Update github action Java version to 8, add README information
  • Loading branch information
ty1824 authored Jan 27, 2023
2 parents ddf96de + 03f5ea6 commit 28d7b4d
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 8

- name: Build and Publish Package
uses: gradle/gradle-build-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 8

- name: Build and Test
uses: gradle/gradle-build-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 8

- name: Build and Publish to Maven Central
uses: gradle/gradle-build-action@v2
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# dialector
A language workbench for anyone.

Dialector provides a series of libraries designed to simplify development of language servers & other language tooling.

## Consumer Quick Start (For Kotlin projects using Gradle)

Add dialector-kt and dialector-kt-processor to your dependencies:
```
val dialectorVersion = "0.2.0
dependencies {
...
api("dev.dialector:dialector-kt:${dialectorVersion}")
ksp("dev.dialector:dialector-kt-processor:${dialectorVersion}")
...
}
```

Add the Kotlin Symbol Processor (KSP) plugin to your gradle build
```
plugins {
...
kotlin("jvm") version("1.7.10")
id("com.google.devtools.ksp") version("1.7.10-1.0.6") // Be sure to use a KSP version that is compatible with your Kotlin version!!
...
}
```

Add KSP configuration to set the output package for your generated code
```
ksp {
arg("dev.dialector.targetPackage", "org.example.output") // Replace "org.example.output" with a package relevant to your project
}
```

If you are using IntelliJ, add the following to ensure your generated code is indexed:
```
sourceSets.getByName("main").java
srcDir("build/generated/ksp/main/kotlin")
}
```

At this point, you can start using Dialector! Running a gradle build will generate sources and include them in compilation automatically.
A more thorough introduction of how Dialector works and common use cases will be provided soon.
6 changes: 2 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,17 @@ fun getVersionTimestamp(): String = with(LocalDateTime.now()) {
}

allprojects {
// If the version hasn't been specified
if (version.toString().isNullOrBlank()) {
// If the version hasn't been specified, set it to a timestamped default
version = "LOCAL-${getVersionTimestamp()}"
} else if (version.toString().startsWith("v")) {
// TODO: Probably should do this before passing as a parameter
version = version.toString().drop(1)
}
}

subprojects {
repositories {
mavenCentral()
maven {
url = URI("https://jitpack.io")
}
}
}
3 changes: 3 additions & 0 deletions dialector-kt-processor/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# dialector-kt-processor

A Kotlin Symbol Processor for dialector-kt that generates Node implementations and builders for annotated Node interfaces.

0 comments on commit 28d7b4d

Please sign in to comment.