Skip to content

Commit 3c5528d

Browse files
committed
chore: fix windows xlog path
1 parent aaf1337 commit 3c5528d

File tree

7 files changed

+26
-11
lines changed

7 files changed

+26
-11
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
- name: Run Java App on OpenJDK ${{ matrix.jdk }} container image
203203
if: always()
204204
run: |
205-
java --show-version src/main/java/JavaApp.java
205+
java -ea --show-version src/main/java/JavaApp.java
206206
env:
207207
RUNNER_CONTEXT: ${{ toJson(runner) }}
208208

build.gradle.kts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import gg.jte.*
22
import org.gradle.api.tasks.testing.logging.*
3-
import org.gradle.internal.os.OperatingSystem
43
import org.jetbrains.dokka.gradle.*
54
import org.jetbrains.kotlin.config.*
65
import org.jetbrains.kotlin.gradle.tasks.*
@@ -42,8 +41,6 @@ val appMainClass: String by project
4241

4342
application {
4443
mainClass.set(appMainClass)
45-
46-
val tmp = if (OperatingSystem.current().isWindows) "c:/TEMP" else "/tmp"
4744
applicationDefaultJvmArgs += listOf(
4845
"--show-version",
4946
"--enable-preview",
@@ -52,7 +49,7 @@ application {
5249
"-Xmx128M",
5350
"-XX:+PrintCommandLineFlags",
5451
"-XX:+UseZGC",
55-
"-Xlog:gc*:\"$tmp/$name-gc-%p-%t.log\":time,uptime,level,tid,tags:filecount=5,filesize=10m",
52+
"-Xlog:gc*:$xQuote$tmp/$name-gc-%p-%t.log$xQuote:time,uptime,level,tid,tags:filecount=5,filesize=10m",
5653
"-XX:StartFlightRecording:filename=$tmp/$name.jfr,settings=default.jfc,name=$name,maxsize=100m,dumponexit=true",
5754
"-XX:FlightRecorderOptions:stackdepth=128",
5855
"-XX:+HeapDumpOnOutOfMemoryError",

buildSrc/src/Config.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.gradle.api.*
2+
import org.gradle.internal.os.*
23
import org.gradle.jvm.toolchain.*
34
import org.slf4j.*
45
import java.io.*
@@ -51,6 +52,12 @@ sealed class Repo(val name: String, val url: String) {
5152
)
5253
}
5354

55+
// OS temp location
56+
val tmp = if (OperatingSystem.current().isWindows) "c:/TEMP" else "/tmp"
57+
58+
// Quote for -Xlog file
59+
val xQuote = if (OperatingSystem.current().isWindows) """\"""" else """""""
60+
5461
/**
5562
* Check if it's a non stable (RC) version.
5663
*/
@@ -101,7 +108,7 @@ fun Project.appRunCmd(jarPath: Path, args: List<String>): String {
101108
// Escape the globstar
102109
"$indent$it $lineCont"
103110
.replace("*", """\*""")
104-
.replace("\"", "\\\"")
111+
.replace(""""""", """\"""")
105112
}
106113
}
107114

buildSrc/src/Deps.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ object Deps {
194194

195195
object ApiService {
196196
const val sdmv1 =
197-
"com.google.apis:google-api-services-smartdevicemanagement:v1-rev20210213-1.31.0"
197+
"com.google.apis:google-api-services-smartdevicemanagement:v1-rev20210604-1.31.0"
198198
}
199199

200200
const val re2j = "com.google.re2j:re2j:1.5"
@@ -256,7 +256,7 @@ object Deps {
256256
const val stringTemplate = "org.antlr:ST4:4.3.1"
257257

258258
object Jte {
259-
const val version = "1.9.0"
259+
const val version = "1.11.0"
260260
const val jte = "gg.jte:jte:$version"
261261
const val kotlin = "gg.jte:jte-kotlin:$version"
262262
}
@@ -634,7 +634,7 @@ inline val PluginDependenciesSpec.dokka get() = id("org.jetbrains.dokka") versio
634634

635635
inline val PluginDependenciesSpec.exposed get() = id("com.jetbrains.exposed.gradle.plugin") version "0.1.1-SNAPSHOT"
636636
inline val PluginDependenciesSpec.kotlinxAtomicfu get() = id("kotlinx-atomicfu") version "0.16.1"
637-
inline val PluginDependenciesSpec.binCompatValidator get() = id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.5.0"
637+
inline val PluginDependenciesSpec.binCompatValidator get() = id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.6.0"
638638

639639
// Google Plugins
640640
inline val PluginDependenciesSpec.ksp get() = id("com.google.devtools.ksp") version Deps.Kotlin.Ksp.version

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ systemProp.javaVersion=17
4949
systemProp.kotlinVersion=1.5.10
5050
systemProp.kotlinJvmTarget=16
5151
systemProp.kotlinLangVersion=1.5
52-
systemProp.gradleRelease=7.1-rc-2
52+
systemProp.gradleRelease=7.1
5353
systemProp.githubProject=https://github.com/sureshg/openjdk-playground
5454
systemProp.jvmArguments=--enable-preview
5555

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-rc-2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/JavaApp.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.util.Arrays;
1313
import java.util.HexFormat;
1414
import java.util.Locale;
15+
import java.util.stream.Stream;
1516
import javax.net.ssl.TrustManagerFactory;
1617
import javax.net.ssl.X509TrustManager;
1718

@@ -97,6 +98,16 @@ public static void main(String[] args) throws Exception {
9798

9899
out.println(stats);
99100

101+
out.printf("%n✧✧✧✧✧ Streams ✧✧✧✧✧%n");
102+
Stream.of("java", "kotlin", "scala")
103+
.map(String::toUpperCase)
104+
.mapMulti(
105+
(s, consumer) -> {
106+
consumer.accept(s);
107+
consumer.accept(s.toLowerCase());
108+
})
109+
.forEach(out::println);
110+
100111
out.printf("%n✧✧✧✧✧ Additional info in exception ✧✧✧✧✧%n");
101112
Security.setProperty("jdk.includeInExceptions", "hostInfo,jar");
102113
try (var s = new Socket()) {

0 commit comments

Comments
 (0)