Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Make build Windows compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Oct 8, 2022
1 parent 0124538 commit 77af39c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pre-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:

- name: Run smoke test
run: ./gradlew -p plugin-build testPluginKotlinc
if: ${{ runner.os != 'Windows' }}


- name: Run the compiler plugin
Expand Down
5 changes: 3 additions & 2 deletions plugin-build/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ val unzipKotlinCompiler by tasks.registering(Copy::class) {

val testPluginKotlinc by tasks.registering(RunTestExecutable::class) {
dependsOn(unzipKotlinCompiler, tasks.shadowJar)
executable(file("${unzipKotlinCompiler.get().destinationDir}/kotlinc/bin/kotlinc"))
val targetFile = if (org.apache.tools.ant.taskdefs.condition.Os.isFamily("windows")) "kotlinc.bat" else "kotlinc"
executable(file("${unzipKotlinCompiler.get().destinationDir}/kotlinc/bin/$targetFile"))
args(
listOf(
"$rootDir/src/test/resources/hello.kt",
"-Xplugin=${tasks.shadowJar.get().archiveFile.get().asFile.absolutePath}",
"-P",
"plugin:detekt-compiler-plugin:debug=true"
"\"plugin:detekt-compiler-plugin:debug=true\""
)
)
errorOutput = ByteArrayOutputStream()
Expand Down

0 comments on commit 77af39c

Please sign in to comment.