File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ swift run --disable-sandbox
88
99# explicitly invoke resolve without explicit path or dependency
1010# the dependencies should be uses from the --swift-module
11- .build/plugins/tools/debug/SwiftJavaTool-tool resolve \
11+ swift run swift-java resolve \
1212 Sources/JavaCommonsCSV/swift-java.config \
1313 --swift-module JavaCommonsCSV \
1414 --output-directory .build/plugins/outputs/javadependencysampleapp/JavaCommonsCSV/destination/SwiftJavaPlugin/
Original file line number Diff line number Diff line change 99export PATH=" ${PATH} :/usr/lib/jvm/jdk-24/bin"
1010
1111# check if we can compile a plain Example file that uses the generated Java bindings that should be in the generated jar
12- MYLIB_CLASSPATH=" $( ls bin/default/build/libs/* .jar) "
12+ SWIFTKIT_CLASSPATH=" $( pwd) /$( ls ../../SwiftKit/build/libs/* .jar | head -n1 | xargs dirname) "
13+ MYLIB_CLASSPATH=" $( pwd) /$( ls bin/default/build/libs/* .jar | head -n1 | xargs dirname) "
14+ CLASSPATH=" $( pwd) :${SWIFTKIT_CLASSPATH} :${MYLIB_CLASSPATH} "
15+ echo " CLASSPATH = ${CLASSPATH} "
16+
1317javac -cp " ${MYLIB_CLASSPATH} " Example.java
1418
1519if [ " $( uname -s) " = ' Linux' ]
1923elif [ " $( uname -s) " = ' Darwin' ]
2024then
2125 SWIFT_LIB_PATHS=$( find " $( swiftly use --print-location) " | grep dylib$ | grep libswiftCore | grep macos | xargs dirname)
22- SWIFT_LIB_PATHS=" ${SWIFT_LIB_PATHS} :$( find . | grep libMySwiftLibrary.dylib$ | sort | head -n1 | xargs dirname) "
26+ SWIFT_LIB_PATHS=" ${SWIFT_LIB_PATHS} :$( pwd ) / $( find . | grep libMySwiftLibrary.dylib$ | sort | head -n1 | xargs dirname) "
2327fi
28+ echo " SWIFT_LIB_PATHS = ${SWIFT_LIB_PATHS} "
2429
2530# Can we run the example?
26- SWIFTKIT_CLASSPATH=" $( ls ../../SwiftKit/build/libs/* .jar) "
2731java --enable-native-access=ALL-UNNAMED \
28- -Djava.library.path=" ${SWIFT_LIB_PATHS } " \
29- -cp " .: ${MYLIB_CLASSPATH} : ${SWIFTKIT_CLASSPATH }" \
32+ -Djava.library.path=" ${SWIFT_LIB_PATHSSWIFT_LIB_PATHS } " \
33+ -cp " ${CLASSPATH }" \
3034 Example
You can’t perform that action at this time.
0 commit comments