Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) pass pcre2.library.* system-properties for tests #55

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ffm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,24 @@ tasks.withType<JavaCompile> {
tasks.test {
useJUnitPlatform()
jvmArgs("--enable-preview")

systemProperty(
"java.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("java.library.path")
).joinToString(":")
)

val pcre2LibraryName = System.getProperty("pcre2.library.name")
if (pcre2LibraryName != null) {
systemProperty("pcre2.library.name", pcre2LibraryName)
}

val pcre2FunctionSuffix = System.getProperty("pcre2.function.suffix")
if (pcre2FunctionSuffix != null) {
systemProperty("pcre2.function.suffix", pcre2FunctionSuffix)
}

finalizedBy(tasks.jacocoTestReport)
}

Expand Down
12 changes: 12 additions & 0 deletions jna/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,24 @@ java {

tasks.withType<Test> {
useJUnitPlatform()

systemProperty(
"jna.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("jna.library.path")
).joinToString(":")
)

val pcre2LibraryName = System.getProperty("pcre2.library.name")
if (pcre2LibraryName != null) {
systemProperty("pcre2.library.name", pcre2LibraryName)
}

val pcre2FunctionSuffix = System.getProperty("pcre2.function.suffix")
if (pcre2FunctionSuffix != null) {
systemProperty("pcre2.function.suffix", pcre2FunctionSuffix)
}

finalizedBy(tasks.jacocoTestReport)
}

Expand Down
13 changes: 13 additions & 0 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,31 @@ java {
tasks.test {
useJUnitPlatform()
jvmArgs("--enable-preview")

systemProperty(
"jna.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("jna.library.path")
).joinToString(":")
)

systemProperty(
"java.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("java.library.path")
).joinToString(":")
)

val pcre2LibraryName = System.getProperty("pcre2.library.name")
if (pcre2LibraryName != null) {
systemProperty("pcre2.library.name", pcre2LibraryName)
}

val pcre2FunctionSuffix = System.getProperty("pcre2.function.suffix")
if (pcre2FunctionSuffix != null) {
systemProperty("pcre2.function.suffix", pcre2FunctionSuffix)
}

finalizedBy(tasks.jacocoTestReport)
}

Expand Down
13 changes: 13 additions & 0 deletions regex/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,31 @@ java {
tasks.test {
useJUnitPlatform()
jvmArgs("--enable-preview")

systemProperty(
"jna.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("jna.library.path")
).joinToString(":")
)

systemProperty(
"java.library.path", listOf(
System.getProperty("pcre2.library.path"),
System.getProperty("java.library.path")
).joinToString(":")
)

val pcre2LibraryName = System.getProperty("pcre2.library.name")
if (pcre2LibraryName != null) {
systemProperty("pcre2.library.name", pcre2LibraryName)
}

val pcre2FunctionSuffix = System.getProperty("pcre2.function.suffix")
if (pcre2FunctionSuffix != null) {
systemProperty("pcre2.function.suffix", pcre2FunctionSuffix)
}

finalizedBy(tasks.jacocoTestReport)
}

Expand Down