From eed8572344d2a4ab9219e8dd5f430950f0edd11c Mon Sep 17 00:00:00 2001 From: owaineevans <8429109+owaineevans@users.noreply.github.com> Date: Sat, 22 Apr 2023 21:53:05 +0800 Subject: [PATCH] Make settings.gradle work on windows and linux/mac Make the `meshLibPath` slashes match the OS that it's running on. --- example/android/settings.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/example/android/settings.gradle b/example/android/settings.gradle index c83f91822..7579ee5d8 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -33,8 +33,14 @@ object.plugins.android.each { androidPlugin -> if(androidPlugin.name == 'nordic_nrf_mesh'){ println 'should include forked Nordic\'s ADK v3' def meshLibPath = androidPlugin.path.replace('android', '') + 'Android-nRF-Mesh-Library-1\\mesh\\' + if (System.properties['os.name'].toLowerCase().contains('windows')) { + println "detected running on Windows" + } else { + println "detected running on non Windows (linux or mac)" + meshLibPath = meshLibPath.replace('\\', '/') + } println 'meshLibPath = ' + meshLibPath include ':mesh' project(':mesh').projectDir = file(meshLibPath) } -} \ No newline at end of file +}