Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 5 additions & 8 deletions .github/workflows/initiate_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
version:
description: "The new version number. Example: 1.40.1"
required: true
type: string
pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$"

jobs:
init_release:
Expand All @@ -21,19 +23,14 @@ jobs:
VERSION: ${{ github.event.inputs.version }}
run: |
npx --yes standard-version@9.3.2 --release-as "$VERSION" --skip.tag --skip.commit --tag-prefix=
echo "version=$VERSION" > gradle.properties
git config --global user.name 'github-actions'
git config --global user.email 'release@getstream.io'
git checkout -q -b "release-$VERSION"
git add CHANGELOG.md gradle.properties
git commit -am "chore(release): $VERSION"
git push -q -u origin "release-$VERSION"

- name: Get changelog diff
uses: actions/github-script@v6
with:
script: |
const get_change_log_diff = require('./scripts/get_changelog_diff.js')
core.exportVariable('CHANGELOG', get_change_log_diff())

- name: Open pull request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -44,4 +41,4 @@ jobs:
Make sure to use squash & merge when merging!
Once this is merged, another job will kick off automatically and publish the package.
# :memo: Changelog
${{ env.CHANGELOG }}"
$(cat CHANGELOG.md)"
55 changes: 25 additions & 30 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
name: javadoc
on:
push:
branches:
- main
jobs:
javadoc:
runs-on: ubuntu-latest
concurrency: docs-${{ github.ref }}
name: 📚 Docs
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Node.js 14
uses: actions/setup-node@v3
with:
node-version: 14

- name: Generate doc
run: ./gradlew --no-daemon javadoc

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build/docs/javadoc/
#name: javadoc
#on:
# push:
# branches:
# - main
#jobs:
# javadoc:
# runs-on: ubuntu-latest
# concurrency: docs-${{ github.ref }}
# name: 📚 Docs
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# persist-credentials: false
#
# - name: Generate doc
# run: ./gradlew --no-daemon javadoc
#
# - name: Deploy
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# BRANCH: gh-pages
# FOLDER: build/docs/javadoc/
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
- uses: actions/github-script@v6
with:
script: |
const get_change_log_diff = require('./scripts/get_changelog_diff.js')
core.exportVariable('CHANGELOG', get_change_log_diff())

// Getting the release version from the PR source branch
// Source branch looks like this: release-1.0.0
const version = context.payload.pull_request.head.ref.split('-')[1]
Expand All @@ -45,6 +42,5 @@ jobs:
- name: Create release on GitHub
uses: ncipollo/release-action@v1
with:
body: ${{ env.CHANGELOG }}
tag: ${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/scheduled_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ on:

jobs:
test:
environment: ci
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run tests
env:
STREAM_BASE_URL: ${{ vars.STREAM_BASE_URL }}
STREAM_API_KEY: ${{ vars.STREAM_API_KEY }}
STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }}
run: |
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 0.1.0 (2025-02-12)
73 changes: 36 additions & 37 deletions lib/build.gradle.kts → build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,29 @@ import java.io.FileInputStream
import java.util.*

plugins {
// Apply the java-library plugin for API and implementation separation.
`java-library`
`maven-publish`
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
signing
`maven-publish`
`java-library`
id("com.diffplug.spotless") version "7.0.2"
}

group = "io.getstream"
version = "0.0.1"
description = "Stream official Java SDK"

repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
gradlePluginPortal()
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

dependencies {
// Use JUnit Jupiter for testing.
Expand Down Expand Up @@ -75,18 +74,6 @@ tasks.named<Test>("test") {

val generatedVersionDir = layout.buildDirectory.dir("generated-version")

sourceSets {
main {
output.dir(mapOf("builtBy" to "generateVersionProperties"), generatedVersionDir)
}
}

spotless {
java {
googleJavaFormat()
}
}

tasks.register("generateVersionProperties") {
doLast {
val f = layout.buildDirectory.file("generated-version/version.properties")
Expand All @@ -98,8 +85,16 @@ tasks.register("generateVersionProperties") {
}
}

tasks.named("processResources").configure {
dependsOn("generateVersionProperties")
sourceSets {
main {
output.dir(mapOf("builtBy" to "generateVersionProperties"), generatedVersionDir)
}
}

spotless {
java {
googleJavaFormat()
}
}

extra["ossrhUsername"] = ""
Expand All @@ -125,10 +120,6 @@ if (secretPropsFile.exists()) {
extra["sonatypeStagingProfileId"] = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: ""
}

signing {
sign(publishing.publications)
}

publishing {
publications {
create<MavenPublication>("maven") {
Expand Down Expand Up @@ -162,15 +153,23 @@ publishing {
}
}
}
}

signing {
useInMemoryPgpKeys(
extra["signing.keyId"] as String,
extra["signing.secretKeyRingFile"] as String,
extra["signing.password"] as String
)
sign(publishing.publications)
}

nexusPublishing {
repositories {
maven {
name = "ossrh"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = extra["ossrhUsername"] as String? ?: ""
password = extra["ossrhPassword"] as String? ?: ""
}
sonatype {
username = extra["ossrhUsername"] as String
password = extra["ossrhPassword"] as String
stagingProfileId = extra["sonatypeStagingProfileId"] as String
}
}
}
}
2 changes: 1 addition & 1 deletion generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
set -ex

# cd in API repo, generate new spec and then generate code from it
( cd $SOURCE_PATH ; make openapi ; go run ./cmd/chat-manager openapi generate-client --language java --spec ./releases/v2/serverside-api.yaml --output ../stream-sdk-java/lib/src/main/java/io/getstream )
( cd $SOURCE_PATH ; make openapi ; go run ./cmd/chat-manager openapi generate-client --language java --spec ./releases/v2/serverside-api.yaml --output ../stream-sdk-java/src/main/java/io/getstream )

# format generated code
./gradlew spotlessApply
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=0.1.0
Binary file removed lib/src/main/java/io/getstream/.DS_Store
Binary file not shown.
Loading
Loading