Skip to content

Commit d99a53b

Browse files
committed
feat: add all suites and examples for kotlin API
Signed-off-by: peefy <[email protected]>
1 parent f538c97 commit d99a53b

22 files changed

+1012
-13
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,36 @@ main();
163163

164164
### Kotlin
165165

166+
Refer to [this](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#authenticating-to-github-packages) to configure your Maven; set up your GitHub account and Token in the `settings.xml`.
167+
168+
#### Maven
169+
170+
In your project's pom.xml, configure our repository as follows:
171+
172+
```xml
173+
<repositories>
174+
<repository>
175+
<id>github</id>
176+
<url>https://maven.pkg.github.com/kcl-lang/*</url>
177+
<snapshots>
178+
<enabled>true</enabled>
179+
</snapshots>
180+
</repository>
181+
</repositories>
182+
```
183+
184+
This way you'll be able to import the above dependency to use the SDK.
185+
186+
```xml
187+
<dependency>
188+
<groupId>com.kcl</groupId>
189+
<artifactId>kcl-lib</artifactId>
190+
<version>0.10.0-alpha.2-SNAPSHOT</version>
191+
</dependency>
192+
```
193+
194+
Write the code
195+
166196
```kotlin
167197
import com.kcl.api.API
168198
import com.kcl.api.execProgramArgs

java/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,9 @@ public class ExecProgramTest {
5050
## Developing
5151

5252
- Install `Java 8+`
53+
- Install `Maven`
5354
- Install `cargo` and `Python` (for Rust code building)
5455

55-
```shell
56-
pnpm install
57-
```
58-
5956
### Building
6057

6158
```shell

java/src/test/java/com/kcl/ListOptionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
public class ListOptionsTest {
1111
@Test
12-
public void testParseProgram() throws Exception {
12+
public void testListOptionsApi() throws Exception {
1313
ParseProgram_Args args = ParseProgram_Args.newBuilder().addPaths("./src/test_data/option/main.k").build();
1414

1515
API apiInstance = new API();

java/src/test/java/com/kcl/LoadSettingsFileTest.java renamed to java/src/test/java/com/kcl/LoadSettingsFilesTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import com.kcl.api.Spec.LoadSettingsFiles_Args;
88
import com.kcl.api.Spec.LoadSettingsFiles_Result;
99

10-
public class LoadSettingsFileTest {
10+
public class LoadSettingsFilesTest {
1111
@Test
1212
public void testLoadSettingsFile() throws Exception {
1313
API api = new API();

java/src/test/java/com/kcl/TestingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
public class TestingTest {
1111
@Test
12-
public void testLintPathApi() throws Exception {
12+
public void testTestingApi() throws Exception {
1313
API apiInstance = new API();
1414
Test_Args args = Test_Args.newBuilder().addPkgList("./src/test_data/testing/...").build();
1515
Test_Result result = apiInstance.test(args);

0 commit comments

Comments
 (0)