All Versions
61
Latest Version
Avg Release Cycle
-
Latest Release
-

Changelog History
Page 1

  • v3.2.0 Changes

    2022-06-26

    • Fix: Configure the multiplatform artifact (com.squareup.okio:okio:3.x.x) to depend on the JVM artifact (com.squareup.okio:okio-jvm:3.x.x) for Maven builds. This should work-around an issue where Maven doesn't interpret Gradle metadata.
    • Fix: Change CipherSource and CipherSink to recover if the cipher doesn't support streaming. This should work around a crash with AES/GCM ciphers on Android.
    • New: Enable compatibility with non-hierarchical projects.
  • v3.1.0 Changes

    2022-04-19

    • Upgrade: [Kotlin 1.6.20][kotlin_1_6_20].
    • New: Support [Hierarchical project structure][hierarchical_projects]. If you're using Okio in a multiplatform project please upgrade your project to Kotlin 1.6.20 (or newer) to take advantage of this. With hierarchical projects it's easier to use properties like FileSystem.SYSTEM that are available on most Okio platforms but not all of them.
    • New: ForwardingSource is now available on all platforms.
    • New: The watchosX64 platform is now supported.
    • Fix: Don't crash in `NSData.toByteString()' when the input is empty.
    • Fix: Support empty ZIP files in FileSystem.openZip().
    • Fix: Throw in canonicalize() of ZIP file systems if the path doesn't exist.
    • Fix: Don't require ZIP files start with a local file header.
    • New: okio.ProtocolException is a new exception type for multiplatform users. (It is aliased to java.net.ProtocolException on JVM platforms).
  • v3.0.0 Changes

    2021-10-28

    🚀 This is the first stable release of Okio 3.x. This release is strongly backwards-compatible with Okio 2.x, and the new major version signifies new capabilities more than it does backwards incompatibility.

    ⬆️ Most users should be able to upgrade from 2.x by just changing the version. If you're using Okio in a Kotlin Multiplatform project, you'll need to drop the -multiplatform suffix in your Gradle dependencies.

    • New: Remove @ExperimentalFileSystem. This annotation is no longer necessary as the file system is no longer experimental!
    • New: Path no longer aggressively normalizes .. segments. Use Path.normalize() to apply these based on the content of the path, or FileSystem.canonicalize() to do it honoring any symlinks on a particular file system.
    • New: Publish a [bill of materials (BOM)][bom] for Okio. Depend on this from Gradle or Maven to keep all of your Okio artifacts on the same version, even if they're declared via transitive dependencies. You can even omit versions when declaring other Okio dependencies.
       dependencies {
          api(platform("com.squareup.okio:okio-bom:3.0.0"))
          api("com.squareup.okio:okio")                // No version!
          api("com.squareup.okio:okio-fakefilesystem") // No version!
       }
    
    • New: FileSystem.delete() silently succeeds when deleting a file that doesn't exist. Use the new mustExist parameter to trigger an exception instead.
    • New: FileSystem.createDirectories() silently succeeds when creating a directory that already exists. Use the new mustCreate parameter to trigger an exception instead.
    • New: FileSystem offers Java-language overloads where appropriate. Previously functions that had default parameters were potentially awkward to invoke from Java.
    • New: Timeout.intersectWith() returns a value instead of Unit. This is a binary-incompatible change. We expect that this public API is very rarely used outside of Okio itself.
    • Fix: Change BufferedSource.readDecimalLong() to fail if the input value is just -. Previously Okio incorrectly returned 0 for this.
  • v3.0.0-alpha.9 Changes

    2021-08-01

    • New: ByteString.copyInto() saves an allocation when extracting data from a ByteString.
    • Fix: Create FileHandle.protectedSize() to match other abstract functions.
    • Fix: Open files in binary mode on Windows. Without this, files that contain 0x1a will be truncated prematurely.
  • v3.0.0-alpha.8 Changes

    2021-07-13

    • Fix: Don't crash on duplicate entries in a .zip file.
    • Fix: Change FileSystem.RESOURCES to initialize itself lazily.
  • v3.0.0-alpha.7 Changes

    2021-07-12

    • Fix: Change ResourceFileSystem to load roots eagerly. We had a bug where list() on the root returned an empty list even if resources were present.
    • New: FileHandle.reposition() can seek on a source or sink returned by that FileHandle.
    • New: Move the system resources instance to FileSystem.RESOURCES.
    • Upgrade: [Kotlin 1.5.20][kotlin_1_5_20].
  • v3.0.0-alpha.6 Changes

    2021-06-01

    • New: FileHandle supports random access reads, writes, and resizes on files. Create an instance with FileSystem.openReadOnly() or FileSystem.openReadWrite().
    • New: Remove Cursor which is obsoleted by FileHandle. (UnsafeCursor is still around!)
    • New: Add support for the new intermediate representation (IR) artifacts in Kotlin/JS. We still support the legacy artifact format.
    • New: Support tvOS (tvosArm64, tvosX64) in multiplatform.
    • New: Change ResourceFileSystem to omit .class files when indexing .zip files. We expect this to lower the memory footprint of ResourceFileSystem.
    • Fix: Don't crash on background thread access in Kotlin/Native. We had to apply @SharedImmutable and run our test suite on a background thread.
  • v3.0.0-alpha.5 Changes

    2021-04-27

    • New: Promote the ZipFileSystem and ResourceFileSystem to the main Okio module. These are currently JVM-only. The okio-zipfilesystem module is no longer published.
  • v3.0.0-alpha.4 Changes

    2021-04-14

    • Fix: Rename internal classes to avoid name collisions. We were seeing problems due to having multiple files named -Platform.kt.
  • v3.0.0-alpha.3 Changes

    2021-04-06

    • New: Move NodeJsFileSystem into its own module. Having it built-in prevented Okio from working in a browser where there's no synchronous file system API. This is in the okio-nodefilesystem artifact.