diff --git a/script/uberjar b/script/uberjar index f7c77e1d..13fd82b1 100755 --- a/script/uberjar +++ b/script/uberjar @@ -12,7 +12,8 @@ then export BABASHKA_FEATURE_CORE_ASYNC=false export BABASHKA_FEATURE_CSV=false export BABAHSKA_FEATURE_TRANSIT=false - export BABAHSKA_FEATURE_JAVA_TIME=false + export BABASHKA_FEATURE_JAVA_TIME=false + export BABASHKA_FEATURE_JAVA_NIO=false fi BABASHKA_LEIN_PROFILES="+uberjar" diff --git a/src/babashka/impl/classes.clj b/src/babashka/impl/classes.clj index 6a624d68..87308528 100644 --- a/src/babashka/impl/classes.clj +++ b/src/babashka/impl/classes.clj @@ -135,21 +135,22 @@ ;; java.net.URL, see below java.net.URLEncoder java.net.URLDecoder - java.nio.file.OpenOption - java.nio.file.CopyOption - java.nio.file.FileAlreadyExistsException - java.nio.file.FileSystem - java.nio.file.FileSystems - java.nio.file.Files - java.nio.file.LinkOption - java.nio.file.NoSuchFileException - java.nio.file.Path - java.nio.file.Paths - java.nio.file.StandardCopyOption - java.nio.file.attribute.FileAttribute - java.nio.file.attribute.FileTime - java.nio.file.attribute.PosixFilePermission - java.nio.file.attribute.PosixFilePermissions + ~@(when features/java-nio? + '[java.nio.file.OpenOption + java.nio.file.CopyOption + java.nio.file.FileAlreadyExistsException + java.nio.file.FileSystem + java.nio.file.FileSystems + java.nio.file.Files + java.nio.file.LinkOption + java.nio.file.NoSuchFileException + java.nio.file.Path + java.nio.file.Paths + java.nio.file.StandardCopyOption + java.nio.file.attribute.FileAttribute + java.nio.file.attribute.FileTime + java.nio.file.attribute.PosixFilePermission + java.nio.file.attribute.PosixFilePermissions]) java.security.MessageDigest ~@(when features/java-time? '[java.time.format.DateTimeFormatter diff --git a/src/babashka/impl/features.clj b/src/babashka/impl/features.clj index 88b15581..167defe3 100644 --- a/src/babashka/impl/features.clj +++ b/src/babashka/impl/features.clj @@ -8,6 +8,7 @@ (def csv? (not= "false" (System/getenv "BABASHKA_FEATURE_CSV"))) (def transit? (not= "false" (System/getenv "BABASHKA_FEATURE_TRANSIT"))) (def java-time? (not= "false" (System/getenv "BABASHKA_FEATURE_JAVA_TIME"))) +(def java-nio? (not= "false" (System/getenv "BABASHKA_FEATURE_JAVA_NIO"))) ;; excluded by default (def jdbc? (= "true" (System/getenv "BABASHKA_FEATURE_JDBC")))