Skip to content

Commit 2d3e264

Browse files
authored
Merge pull request #772 from cqse/ts/44139_installer
TS-44139 Fixed installer module incorrectly configured
2 parents c963c65 + 1508b16 commit 2d3e264

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ We use [semantic versioning](http://semver.org/):
77
# Next version
88
- [breaking fix] _teamscale-gradle-plugin_: Adjusted to breaking API changes in Gradle 9.0
99
- [feature] Reduced dependencies and hence the size of all artifacts
10+
- [fix] _installer_: `InaccessibleObjectException` at startup
1011

1112
# 35.2.2
1213
- [fix] _teamscale-gradle-plugin_: TeamscaleUpload task did not properly validate `revision` argument

installer/build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ tasks.jar {
2121
}
2222
}
2323

24+
// Workaround for https://youtrack.jetbrains.com/issue/KT-55389
25+
tasks.compileJava {
26+
val mainSourceSetOutput = sourceSets.main.get().output
27+
options.compilerArgumentProviders.add(CommandLineArgumentProvider {
28+
listOf(
29+
"--patch-module",
30+
"com.teamscale.profiler.installer=${mainSourceSetOutput.asPath}"
31+
)
32+
})
33+
}
34+
2435
tasks.withType<JavaCompile> {
2536
options.release = 21
2637
}

installer/src/main/java/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
// used e.g. by teamscale.io
99
requires jdk.crypto.ec;
1010
requires kotlin.stdlib;
11+
12+
exports com.teamscale.profiler.installer to info.picocli;
13+
opens com.teamscale.profiler.installer to info.picocli;
1114
}
1215

installer/src/main/kotlin/com/teamscale/profiler/installer/InstallCommand.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ class InstallCommand : Callable<Int> {
1414
converter = [HttpUrlTypeConverter::class],
1515
description = ["The URL of your Teamscale instance."]
1616
)
17-
private val teamscaleUrl: HttpUrl? = null
17+
private var teamscaleUrl: HttpUrl? = null
1818

1919
@CommandLine.Parameters(
2020
index = "1",
2121
description = ["The user used to access your Teamscale instance and upload coverage to your projects."]
2222
)
23-
private val userName: String? = null
23+
private var userName: String? = null
2424

2525
@CommandLine.Parameters(index = "2", description = ["The access key of the given user. NOT the password!"])
26-
private val accessKey: String? = null
26+
private var accessKey: String? = null
2727

2828
override fun call(): Int {
2929
try {

0 commit comments

Comments
 (0)