File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,22 @@ For example:
7878 implementation("software.amazon.nio.s3:aws-java-nio-spi-for-s3:2.3.0")
7979```
8080
81+ > [ !TIP]
82+ > If your application only uses standard Java NIO APIs and doesn't directly reference S3-specific classes,
83+ > you can use ` runtimeOnly ` instead of ` implementation ` . This allows the S3 provider to be discovered
84+ > automatically via Java's ServiceLoader mechanism:
85+ > ``` groovy
86+ > runtimeOnly("software.amazon.nio.s3:aws-java-nio-spi-for-s3:2.3.0")
87+ > ```
88+ > This approach is cleaner as it keeps the S3 provider as a pure runtime dependency that's loaded dynamically.
89+ >
90+ > You can also use `latest.release` to automatically get the most recent stable version:
91+ > ```groovy
92+ > runtimeOnly("software.amazon.nio.s3:aws-java-nio-spi-for-s3:latest.release")
93+ > ```
94+ > **Note**: Using `latest.release` can lead to unexpected behavior if new versions introduce breaking changes.
95+ > Specifying exact versions is recommended for reproducible builds.
96+
8197The library heavily relies on the `crt` client from aws. It uses the [`uber`
8298version](https://github.com/awslabs/aws-crt-java?tab=readme-ov-file#platform-specific-jars) for simplicity
8399and wide range of supported platforms.
You can’t perform that action at this time.
0 commit comments