Skip to content

Commit dd14350

Browse files
committed
Add build scripts
Add build scripts to gradle build the jars, and copy them into build-jars folder. This will simplify iteration and building the jars, instead of previous multi-step approach
1 parent 5de5a03 commit dd14350

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ google-services.json
3333
*.hprof
3434

3535
.DS_Store
36+
37+
build-jars/

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ The REST API documentation can be found on [llama-stack](https://docs.llama-sta
1919
In your terminal, under the `llama-stack-client-kotlin` directory, run the following command:
2020

2121
```
22-
export SKIP_MOCK_TESTS=true
23-
./gradlew build
22+
sh build-libs.sh
2423
```
2524

26-
Output: .jar files located in the build/libs directory of the respective client folders (llama-stack-client-kotlin, llama-stack-client-kotlin-client-okhttp, llama-stack-client-kotlin-core)
25+
Output: .jar files located in the build-jars directory
2726

2827

2928
Note: Maven dependencies are not available at the moment. We will made it available in the near future once the SDK stabilizes. For now, build the Kotlin SDK jars manually and include them in your projects.

build-libs.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Skip Prism mock test. If you want to enable this (SKIP_MOCK_TESTS=false), you will need to setup Prism server.
2+
# You can follow the error instructions on how to setup and run a server prism
3+
export SKIP_MOCK_TESTS=true
4+
5+
# Code linting
6+
./gradlew :llama-stack-client-kotlin-core:spotlessApply
7+
./gradlew :llama-stack-client-kotlin-client-okhttp:spotlessApply
8+
./gradlew :llama-stack-client-kotlin:spotlessApply
9+
10+
./gradlew build
11+
12+
# Copy jars
13+
mkdir -p build-jars
14+
BUILD_JARS_DIR=$(pwd)/build-jars
15+
export BUILD_JARS_DIR
16+
echo $BUILD_JARS_DIR
17+
cp -a llama-stack-client-kotlin/build/libs/. $BUILD_JARS_DIR
18+
cp -a llama-stack-client-kotlin-client-okhttp/build/libs/. $BUILD_JARS_DIR
19+
cp -a llama-stack-client-kotlin-core/build/libs/. $BUILD_JARS_DIR

0 commit comments

Comments
 (0)