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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/java-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
java-gradle-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
cache: gradle
- name: Run Gradle
run: ./gradlew build
cache: maven
- name: Run Maven Build
run: ./mvnw clean package
43 changes: 28 additions & 15 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
name: publish-snapshot
on:
workflow_dispatch:
push:
branches:
- 'main'
jobs:
java-gradle-build:
java-maven-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
cache: gradle
- name: Run Gradle Build
run: ./gradlew build
cache: maven
- name: Run Maven Build
run: ./mvnw clean package
publish-snapshot-jar:
runs-on: ubuntu-latest
needs: java-gradle-build
needs: java-maven-build
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.CLIENT_GPG_KEY }}
passphrase: ${{ secrets.CLIENT_GPG_PASSPHRASE }}
- name: Set up Java for Maven build
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
cache: gradle
- name: Publish Snapshot
cache: maven
server-id: central-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish to Maven Central Repository
run: ./mvnw --batch-mode deploy
env:
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
CLIENT_GPG_PASSPHRASE: ${{ secrets.CLIENT_GPG_PASSPHRASE }}
CLIENT_GPG_KEY: ${{ secrets.CLIENT_GPG_KEY }}
run: ./gradlew publish
MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.CLIENT_GPG_PASSPHRASE }}
43 changes: 29 additions & 14 deletions .github/workflows/release-java-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,49 @@ on:
branches:
- 'main'
jobs:
java-gradle-build:
java-maven-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
cache: gradle
- name: Run Gradle Build
run: ./gradlew build
cache: maven
- name: Run Maven Build
run: ./mvnw clean package
publish-jar:
runs-on: ubuntu-latest
needs: java-gradle-build
needs: java-maven-build
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.CLIENT_GPG_KEY }}
passphrase: ${{ secrets.CLIENT_GPG_PASSPHRASE }}
- name: Set up Java for Maven build
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
cache: gradle
cache: maven
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Set Release Version
if: "${{ github.event.inputs.version != '' }}"
run: ./mvnw versions:set -DnewVersion=${{github.event.inputs.version}} -DgenerateBackupPoms=false
- name: Publish Release Version
if: "${{ github.event.inputs.version != '' }}"
run: ./mvnw --batch-mode deploy -DperformRelease=true
env:
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
CLIENT_GPG_PASSPHRASE: ${{ secrets.CLIENT_GPG_PASSPHRASE }}
CLIENT_GPG_KEY: ${{ secrets.CLIENT_GPG_KEY }}
run: ./gradlew -Pversion=${{inputs.version}} publish
MAVEN_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PORTAL_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.CLIENT_GPG_PASSPHRASE }}
- name: Handle Empty Version
if: "${{ github.event.inputs.version == '' }}"
run: echo Please specify a non empty release version
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ bin/
.gradle/
gradle/
build/
target/
19 changes: 19 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ The Tecton Java client is open source and we welcome any contributions from our
### Prerequisites

* Java 8 or higher
* Gradle
* Maven
* [Google Java Format](https://github.com/google/google-java-format) formatter (can also use as a plugin in your IDE)

### Build the Project

The `tecton-http-client-java` project can be built using Gradle as follows:
The `tecton-http-client-java` project can be built using Maven as follows:

`./gradlew clean build`
`./mvnw clean package`

## Basic end to end testing

In the demo client [repository](https://github.com/tecton-ai/TectonClientDemo) update the `build.gradle` file with the
jar that you generate from this repo using `./gradlew clean build`.
jar that you generate from this repo using `./mvnw clean package`.

1. Change the dependencies target to this and point the files attribute to your java client jar.
2. Add the okhttp3 dependency from `tecton-http-client-java` to `build.gradle` in the demo client repository. This is
Expand Down Expand Up @@ -159,7 +159,7 @@ Update `tecton.properties` with your cluster url and run the Demo file to query
## Before Opening a PR

* Please run pre-commit on your staged files to ensure that the changes are correctly formatted.
* Please run `./gradlew clean build` to ensure that your changes pass the build
* Please run `./mvnw clean package` to ensure that your changes pass the build
* Please add unit tests if possible to test the new code changes

## License
Expand Down
154 changes: 0 additions & 154 deletions build.gradle

This file was deleted.

4 changes: 2 additions & 2 deletions buildkite/buildkite.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- command: ./gradlew clean build
- command: ./mvnw clean package
label: 'Build Java Client'
key: "build"
- wait
- command: ./gradlew publish -i
- command: ./mvnw deploy -i
label: ':rocket: Publish Snapshot Jar'
key: "deploy"
depends_on: "build"
Expand Down
2 changes: 0 additions & 2 deletions gradle.properties

This file was deleted.

Binary file removed gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 0 additions & 5 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading