diff --git a/build.gradle b/build.gradle index 4e133e9e..906e87d7 100644 --- a/build.gradle +++ b/build.gradle @@ -39,6 +39,13 @@ compileJava { options.release = 8 } +sourceSets { + examples { + java { + } + } +} + dependencies { implementation 'io.reactivex.rxjava3:rxjava:3.1.8' testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' diff --git a/src/main/java/examples/ListPrefix.java b/src/examples/java/software/amazon/nio/spi/examples/ListPrefix.java similarity index 94% rename from src/main/java/examples/ListPrefix.java rename to src/examples/java/software/amazon/nio/spi/examples/ListPrefix.java index b1679b04..d08f19b8 100644 --- a/src/main/java/examples/ListPrefix.java +++ b/src/examples/java/software/amazon/nio/spi/examples/ListPrefix.java @@ -1,4 +1,4 @@ -package examples; +package software.amazon.nio.spi.examples; import java.io.IOException; import java.net.URI; diff --git a/src/main/java/examples/Main.java b/src/examples/java/software/amazon/nio/spi/examples/Main.java similarity index 92% rename from src/main/java/examples/Main.java rename to src/examples/java/software/amazon/nio/spi/examples/Main.java index 81b707de..4c671609 100644 --- a/src/main/java/examples/Main.java +++ b/src/examples/java/software/amazon/nio/spi/examples/Main.java @@ -3,9 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package examples; - -import software.amazon.nio.spi.s3.S3Path; +package software.amazon.nio.spi.examples; import java.io.IOException; import java.net.URI; @@ -36,7 +34,7 @@ public static void main(String[] args) throws IOException { final Path path = Paths.get(URI.create(pathString)); // proves that the correct path type is being used - assert path instanceof S3Path; + assert path.getClass().getName().contains("S3Path"); System.out.println("*** READING FROM "+path.toUri()+" ***"); Files.readAllLines(path) diff --git a/src/main/java/examples/WalkFromRoot.java b/src/examples/java/software/amazon/nio/spi/examples/WalkFromRoot.java similarity index 96% rename from src/main/java/examples/WalkFromRoot.java rename to src/examples/java/software/amazon/nio/spi/examples/WalkFromRoot.java index 4f601961..4a6d41c6 100644 --- a/src/main/java/examples/WalkFromRoot.java +++ b/src/examples/java/software/amazon/nio/spi/examples/WalkFromRoot.java @@ -1,4 +1,4 @@ -package examples; +package software.amazon.nio.spi.examples; import java.io.IOException;