-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Added Readme.md to use the clients
- Loading branch information
Ankit Mahato
authored and
Ankit Mahato
committed
Sep 3, 2024
1 parent
9df9c7f
commit fd5c309
Showing
22 changed files
with
212 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
name: Publish java client to GitHub Packages | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: java setup | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'corretto' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
|
||
- name: Publish cac client | ||
run: | | ||
cd clients/java/cac-client | ||
./gradlew build | ||
./gradlew publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish exp client | ||
run: | | ||
cd clients/java/exp-client | ||
./gradlew build | ||
./gradlew publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+368 Bytes
clients/java/cac-client/bin/main/cac_client/CACClientException.class
Binary file not shown.
Binary file added
BIN
+915 Bytes
clients/java/cac-client/bin/main/cac_client/CacClient$RustLib.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'maven-publish' | ||
id 'java' | ||
id 'application' | ||
} | ||
|
||
group 'superposition' | ||
version '1.0.1' | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'com.github.jnr:jnr-ffi:2.2.16' | ||
implementation 'com.github.jnr:jffi:1.3.13' | ||
// Add other dependencies your library needs | ||
} | ||
|
||
// Task to create a fat JAR | ||
tasks.register('fatJar', Jar) { | ||
archiveClassifier.set('fat') | ||
from sourceSets.main.output | ||
dependsOn configurations.runtimeClasspath | ||
from { | ||
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } | ||
} | ||
manifest { | ||
attributes 'Main-Class': 'CAC.Client' | ||
} | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} | ||
|
||
// Make the fatJar task run as part of the build | ||
build.dependsOn fatJar | ||
|
||
group = 'com.yourdomain' | ||
version = '1.0-SNAPSHOT' | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
// publications { | ||
// myLib(MavenPublication) { | ||
// from (components.java) | ||
// artifactId = 'CacClient' | ||
// } | ||
// } | ||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri('https://maven.pkg.github.com/juspay/superposition') | ||
credentials { | ||
username = "Superposition Bot" | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
} | ||
} | ||
|
||
application { | ||
mainClassName = 'example.Demo' | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
clients/java/cac-client/src/main/java/cac_client/CACClientException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package cac_client; | ||
|
||
public class CACClientException extends Exception { | ||
public CACClientException(String message) { | ||
super(message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 5 additions & 11 deletions
16
.../cac-client/src/main/java/CAC/Client.java → ...ac-client/src/main/java/example/Demo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file added
BIN
+368 Bytes
clients/java/exp-client/bin/main/exp_client/EXPClientException.class
Binary file not shown.
Binary file added
BIN
+909 Bytes
clients/java/exp-client/bin/main/exp_client/ExperimentationClient$RustLib.class
Binary file not shown.
Binary file added
BIN
+4.82 KB
clients/java/exp-client/bin/main/exp_client/ExperimentationClient.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,42 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'maven-publish' | ||
id 'java' | ||
id 'application' | ||
} | ||
|
||
group 'superposition' | ||
version '1.0.1' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'com.github.jnr:jnr-ffi:2.2.16' | ||
implementation 'com.github.jnr:jffi:1.3.13' | ||
// Add other dependencies your library needs | ||
} | ||
|
||
application { | ||
mainClassName = 'CAC.Client' | ||
publishing { | ||
// publications { | ||
// myLib(MavenPublication) { | ||
// from (components.java) | ||
// artifactId = 'ExpClient' | ||
// } | ||
// } | ||
repositories { | ||
maven { | ||
name = "GitHubPackages" | ||
url = uri('https://maven.pkg.github.com/juspay/superposition') | ||
credentials { | ||
username = "Superposition Bot" | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
} | ||
} | ||
|
||
run { | ||
standardInput = System.in | ||
application { | ||
mainClassName = 'example.Demo' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 7 additions & 11 deletions
18
.../exp-client/src/main/java/CAC/Client.java → ...xp-client/src/main/java/example/Demo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.