diff --git a/ffm/build.gradle.kts b/ffm/build.gradle.kts index 77baebf..99e07df 100644 --- a/ffm/build.gradle.kts +++ b/ffm/build.gradle.kts @@ -65,12 +65,24 @@ tasks.withType { 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) } diff --git a/jna/build.gradle.kts b/jna/build.gradle.kts index 57ddcab..1fce35d 100644 --- a/jna/build.gradle.kts +++ b/jna/build.gradle.kts @@ -61,12 +61,24 @@ java { tasks.withType { 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) } diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index 3b924d4..94f7036 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -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) } diff --git a/regex/build.gradle.kts b/regex/build.gradle.kts index 8fa9f9b..67b82b6 100644 --- a/regex/build.gradle.kts +++ b/regex/build.gradle.kts @@ -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) }