Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand GitHub Actions workflow to build and run Kotlin samples in CI #3

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
835835b
Add CI target-folder cleanup stage to workflow
datalogics-saharay Jan 17, 2024
5badfce
Add workflow stage to unpack APDFL from the Maven repo
datalogics-saharay Jan 17, 2024
45cd473
Add -e flag to Maven commands to get full log of errors
datalogics-saharay Jan 17, 2024
adf2983
Remove macos-13 from os list in workflow file
datalogics-saharay Jan 18, 2024
a2d5354
Add CI stage to assemble a JAR file of sample with dependencies
datalogics-saharay Jan 18, 2024
6fe555c
Add CI step to run the sample
datalogics-saharay Jan 19, 2024
8eab0b7
Set bash as shell default for run commands in workflow
datalogics-saharay Jan 19, 2024
dba8360
List out files for debugging
datalogics-saharay Jan 26, 2024
db554f6
Add logic to point Windows runner to target/lib folder
datalogics-saharay Jan 26, 2024
29a3017
Try setting Windows system path differently
datalogics-saharay Jan 29, 2024
17a8d31
Set java.library.path to GITHUB_PATH
datalogics-saharay Jan 29, 2024
1816c77
Print system path for Windows runner
datalogics-saharay Jan 29, 2024
b653d4b
Set Windows system PATH in different stage
datalogics-saharay Jan 29, 2024
6e0ac5b
Add print statements
datalogics-saharay Jan 29, 2024
1b31b15
Reformat java.library.path in Windows command
datalogics-saharay Jan 29, 2024
c139465
Add steps to list files and archive sample output file
datalogics-saharay Jan 29, 2024
75ba670
Name sample output archive with OS, so platform-specific output prese…
datalogics-saharay Jan 29, 2024
8f0876d
Adjust artifact path
datalogics-saharay Jan 29, 2024
8c29ea7
Fix node12 warnings by upgrading version of setup-java action
datalogics-saharay Jan 29, 2024
f30babc
Remove PATH print statement
datalogics-saharay Jan 30, 2024
0d8b904
Update pdfl version used for TextExtract sample
datalogics-saharay Jan 30, 2024
aff5e38
Modify README to add instructions on how to run Kotlin samples
datalogics-saharay Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions .github/workflows/test-kotlin-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,50 @@ env:
jobs:
build-and-run-samples:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-13]
os: [windows-latest, ubuntu-latest]
dir: ['TextExtract']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'adopt'
- name: Clean target folder
working-directory: ${{ matrix.dir }}
run: mvn -e clean
- name: Unpack APDFL from Maven Central
working-directory: ${{ matrix.dir }}
run: mvn -e process-resources
- name: Compile and assemble sample JAR files with dependencies
working-directory: ${{ matrix.dir }}
run: mvn -e package
- name: Set up Windows system PATH
working-directory: ${{ matrix.dir }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
echo "${{ github.workspace }}\${{ matrix.dir }}\target\lib" >> $GITHUB_PATH
fi
- name: Run samples
working-directory: ${{ matrix.dir }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
java -Djava.library.path="$PATH" -Dfile.encoding=UTF-8 -jar target/${{ matrix.dir }}-1.0-SNAPSHOT-jar-with-dependencies.jar
elif [ "$RUNNER_OS" == "Linux" ]; then
java -Djava.library.path=./target/lib -Dfile.encoding=UTF-8 -jar target/${{ matrix.dir }}-1.0-SNAPSHOT-jar-with-dependencies.jar
fi
- name: List files
run: |
ls ${{matrix.dir}}
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: sample-output-${{ runner.os }}
path: |
${{matrix.dir}}/*.txt
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# apdfl-kotlin-samples
![Datalogics Adobe PDF Library](https://raw.github.com/datalogics/dl-icons/develop/DLBanner_Nuget.png)

[Documentation](https://docs.datalogics.com/apdfl18/Java/index.html)   |   [Support](https://www.datalogics.com/tech-support-pdfs/)   |   [Release Notes](https://docs.datalogics.com/apdfl18/Release_Notes.html)   |  [Homepage](https://www.datalogics.com)

[![Download a Free Trial](https://img.shields.io/badge/maven%20package-APDFL%20Free%20Trial-blue?style=plastic&logo=apachemaven)](https://central.sonatype.com/artifact/com.datalogics.pdfl/pdfl)

## Adobe PDF Library
Built upon Adobe source code used for Acrobat, Datalogics Adobe PDF Library SDK provides stable, reliable code and the flexibility to develop with Java, C#, VB (VB.NET), or C++. APDFL is the most complete SDK for PDF creation, manipulation and management. Best for enterprise/larger organizations of developers and independent software vendors (ISVs) who need to incorporate Adobe's PDF functionality into their own internal or external applications.

Live support from PDF development experts.

Licensing and Pricing options are customized to your usage and requirements. For OEM and SaaS customers we will provide you with a non-license managed software package for easier distribution embedded within your applications.

## Building and Running Samples
**For 64-bit Intel Windows, 64-bit Intel Linux, or Mac ARM systems:**

Samples can be built and run easily in the IntelliJ Community IDE.

1. Clone or download the repository to your system.
2. Select the sample you would like to try.
3. Open the folder containing the sample in the IntelliJ IDE.
4. Run the sample by clicking on the "Run" button!
32 changes: 27 additions & 5 deletions TextExtract/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,32 @@
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.30.0</version>
<version>18.31.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.30.0</version>
<version>18.31.0</version>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.30.0</version>
<version>18.31.0</version>
<type>zip</type>
<classifier>${jni.classifier}</classifier>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.30.0</version>
<version>18.31.0</version>
<type>zip</type>
<classifier>resources</classifier>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.30.0</version>
<version>18.31.0</version>
<classifier>javadoc</classifier>
</dependency>
</dependencies>
Expand Down Expand Up @@ -194,6 +194,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.datalogics.pdfl.samples.TextExtractKt</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
Expand Down