Notable changes are documented in this file, whose format follows Keep a Changelog.
- Add IDE completion and navigation for resource paths. (#64)
- Require Java 17 or newer to run the Gradle plugin. (#308)
- Fix native macOS/tvOS/watchOS test task dependency conflict with Compose Multiplatform resource assembly. (#279)
- Make
Resource.pathpublic. (#271)
- Fix JVM resource loading when filenames contain spaces or other URL-special characters. (#272)
- Fix iOS task dependency conflict with Compose Multiplatform resource assembly. (#272)
- Fix Android unit/host tests missing
commonTestresources on the test classpath. (#264)
- Fix Android instrumented/device test resources on AGP 8.2.2+.
- Fix JS/wasmJS resource loading when filenames contain spaces or other URL-special characters
- Fix Android missing common resources in instrumented tests (including
com.android.kotlin.multiplatform.application).
- Proxy Karma urlRoot to
/base/for stable browser resource loading
- WASI support via
wasmWasitarget
- Android instrumented tests support
- BREAKING: Rename
FileReadExceptiontoResourceReadExceptionfor naming consistency
- BREAKING: Add charset parameter to
readText()with UTF-8 as default. Supported charsets: UTF-8, UTF-16, UTF-16BE, UTF-16LE, ISO-8859-1, and US-ASCII. - Wasm support via
wasmJstarget - Support for resources outside the project directory via
srcDir
- Handle all native test binaries instead of just the first
- Compose Multiplatform compatibility on iOS (#141)
- Wrap XHR errors in
ResourceReadExceptionfor JS/Wasm browser environments
- Add watchosDeviceArm64 target
- JS resource loading on Windows hosts
-
BREAKING: Resource paths are now specified relative to the resources folder. (#162 - thanks @egorikftp!)
For example, a file located at
src/commonTest/resources/a-folder/a-file.txtis now accessed usingResource("a-folder/a-file.txt")without thesrc/commonTest/resources/prefix.See README for more details.
-
BREAKING: Task names were changed to be more consistent.
copyResources<Target>was renamed to<target>CopyResourcesfor consistency with how<target>ProcessResourcesis named. Also, we ensure<target>ends with "Test" for test targets (JS was inconsistent in this regard).This is an internal implementation detail, but projects relying on the task names may have to adjust their build scripts.
- Update dependencies
- Migrate to
NodeJsEnvSpecandYarnRootEnvSpec, which fixes Kotlin 2.2.0 compatibility
Important
Version 0.10.0 and higher of kotlinx-resources target Kotlin 2.1 and are incompatible with Kotlin 2.0. Only version 0.9.0 target Kotlin 2.0, and versions below it target older versions.
- Support for Kotlin 2.1.0 (#115 - thanks @chadselph!)
Important
Version 0.9.0 of kotlinx-resources targets Kotlin 2.0 and is incompatible with Kotlin 1.9.
Only lower versions (even if published in the future), alongside the k1 branch, target Kotlin 1.9.
- Support for Kotlin 2.0.0 (#115 - thanks @DRSchlaubi!)
- Re-add watchosX64 target
- Reading resource bytes on POSIX platforms (#106 - thanks @CharlieTap!)
- Support for Kotlin 1.9.0.
- Made
BuildConfiginternal.
- Removed compilation name in task names to avoid colliding with native.cocoapods, an official plugin. Unfortunately, this does mean that
kotlinx-resourcesis currently incompatible withmoko-resources.
- Added compilation name to task names to avoid colliding with moko-resources. E.g.,
copyResourcesDebugTestEtcbecomescopyTestResourcesDebugTestEtc.
- Add
Resource.readBytes()for reading resources as byte arrays.
- Throw
ResourceReadExceptionwhen failing to read resources, instead ofRuntimeException. - Throw
UnsupportedOperationExceptionwhen using unsupported JS runtimes, instead ofRuntimeException.
- Support for Kotlin 1.8 build tools.
- Support for iOS, watchOS, and tvOS simulators.
- Support for Kotlin 1.7 build tools.
- Use invariant separators in path to better support Windows.
- Removed cross-dependency from the library to the plugin.
- Add explicit version to plugin artifact to prevent issues with resolution.
- Automatic cleanup of Karma configuration file for proxying resources.
- Removed dependency on
org.jetbrains.kotlinx:kotlinx-nodejs.
- Initial release.