Skip to content

Commit

Permalink
Add task to unzip SDL2 headers in klang project
Browse files Browse the repository at this point in the history
Added a task 'unzipSDL2' to the build.gradle.kts file in the klang project that unzips SDL2 headers required for testing. Also updated the .gitignore to exclude these unzipped files from version control. This builds a foundation for more extensive integration testing in the future.
  • Loading branch information
Alexandre Mommers committed Jan 6, 2024
1 parent ff39731 commit 722151f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions klang/klang/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ bin/
### Mac OS ###
.DS_Store
/*.log


## use to integration ##
/src/test/c/SDL2/
8 changes: 8 additions & 0 deletions klang/klang/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ dependencies {
testImplementation(libs.kotest)
}

task<Copy>("unzipSDL2") {
val cSourceDir = "$projectDir/src/test/c/"
val zipTree = zipTree(file("${cSourceDir}SDL2-headers.zip"))
from(zipTree)
into(cSourceDir)
}

tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("--enable-preview")
dependsOn("unzipSDL2")
}

tasks.withType<Test>().configureEach {
Expand Down

0 comments on commit 722151f

Please sign in to comment.