Skip to content

Commit 3fbe648

Browse files
authored
Set up Kotlin wrapper for test server (#63)
* Set up Kotlin wrapper for test server * Add headers & Build gradle package
1 parent fa0f734 commit 3fbe648

11 files changed

Lines changed: 831 additions & 0 deletions

File tree

scripts/update-sdk-checksums/main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ var sdksToUpdate = []SDKConfig{
6969
ChecksumsJSONFile: "checksums.json",
7070
VersionVarName: "TEST_SERVER_VERSION",
7171
},
72+
{
73+
Name: "Kotlin",
74+
SDKDir: "sdks/kotlin",
75+
InstallScriptFile: []string{"src/main/kotlin/com/google/testserver/BinaryInstaller.kt"},
76+
ChecksumsJSONFile: "checksums.json",
77+
VersionVarName: "TEST_SERVER_VERSION",
78+
},
7279
}
7380

7481
func fetchChecksumsTxt(version string) (string, error) {

sdks/kotlin/build.gradle.kts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright 2026 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
kotlin("jvm") version "1.9.22"
19+
kotlin("plugin.serialization") version "1.9.22"
20+
}
21+
22+
kotlin {
23+
jvmToolchain(21)
24+
}
25+
26+
group = "com.google.testserver"
27+
28+
version = "0.1.0-SNAPSHOT"
29+
30+
repositories { mavenCentral() }
31+
32+
dependencies {
33+
implementation("org.yaml:snakeyaml:2.2")
34+
35+
testImplementation(kotlin("test"))
36+
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
37+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
38+
}
39+
40+
tasks.test {
41+
useJUnitPlatform()
42+
testLogging {
43+
events("passed", "skipped", "failed", "standardOut", "standardError")
44+
showExceptions = true
45+
showCauses = true
46+
showStackTraces = true
47+
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
48+
}
49+
}

sdks/kotlin/checksums.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
47.8 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

sdks/kotlin/gradlew

Lines changed: 248 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)