Skip to content

Commit

Permalink
Ready for release 0.1.6 (#59)
Browse files Browse the repository at this point in the history
* add micro amper gradle code

* clean and minor tweak deps

* tweak and refactor code

* use SourceReader extension for network

* kotlin (2.0.20) and agp (8.5.2) version bump

* publish script updated

* test script updated

* fix linux target

* charset support flag updated
  • Loading branch information
itboy87 authored Sep 4, 2024
1 parent 38b99d5 commit b2fd289
Show file tree
Hide file tree
Showing 30 changed files with 604 additions and 234 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,14 @@ jobs:
build:
strategy:
matrix:
project:
- "ksoup-engine-common:"

- "ksoup-engine-kotlinx:kotlinx"
- "ksoup:kotlinx"
- "ksoup-network:kotlinx"

- "ksoup-engine-korlibs:korlibs"
- "ksoup:korlibs"
- "ksoup-network-korlibs:korlibs"

- "ksoup-engine-ktor2:ktor2"
- "ksoup:ktor2"
- "ksoup-network-ktor2:ktor2"

- "ksoup-engine-okio:okio"
- "ksoup:okio"

buildType:
- "common"
- "kotlinx"
- "korlibs"
- "ktor2"
- "okio"
runs-on: macos-latest
name: Publish ${{ matrix.project }}
name: Publish ${{ matrix.buildType }}
steps:
- uses: actions/checkout@v3
- name: Setup JDK 17
Expand All @@ -38,11 +26,17 @@ jobs:
- name: Setup gradle
uses: gradle/gradle-build-action@v2

- name: Publish ${{ matrix.project }}
- name: Publish ${{ matrix.buildType }}
run: |
chmod +x ./publishToMaven.sh
./publishToMaven.sh --remote ${{ matrix.project }}
./publishToMaven.sh --remote ${{ matrix.buildType }}
working-directory: ${{ github.workspace }}
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}

- name: Success message
run: echo "Publishing of ${{ matrix.project }} completed successfully."
run: echo "Publishing of ${{ matrix.buildType }} completed successfully."
30 changes: 21 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
strategy:
matrix:
config: [
{ target: android, os: ubuntu-latest, tasks: testDebugUnitTest testReleaseUnitTest, continueOnError: false },
{ target: apple, os: macos-latest, tasks: iosX64Test iosSimulatorArm64Test macosX64Test macosArm64Test tvosX64Test tvosSimulatorArm64Test, continueOnError: false },
{ target: js, os: ubuntu-latest, tasks: jsTest wasmTest, continueOnError: false },
{ target: desktop, os: ubuntu-latest, tasks: jvmTest, continueOnError: false },
{ target: windows, os: windows-latest, tasks: mingwX64Test, continueOnError: false },
{ target: linux, os: windows-latest, tasks: linuxX64Test, continueOnError: false },
]
{ target: android, os: ubuntu-latest, tasks: testDebugUnitTest testReleaseUnitTest, continueOnError: false },
{ target: apple, os: macos-latest, tasks: iosX64Test iosSimulatorArm64Test macosX64Test macosArm64Test tvosX64Test tvosSimulatorArm64Test, continueOnError: false },
{ target: js, os: ubuntu-latest, tasks: jsTest wasmJsTest, continueOnError: false },
{ target: desktop, os: ubuntu-latest, tasks: jvmTest, continueOnError: false },
{ target: windows, os: windows-latest, tasks: mingwX64Test, continueOnError: false },
{ target: linux, os: ubuntu-latest, tasks: linuxX64Test, continueOnError: false },
]
libBuildType: [ "korlibs", "kotlinx", "okio", "ktor2" ]
runs-on: ${{ matrix.config.os }}
name: Build ${{ matrix.config.target }} with libBuildType=${{ matrix.libBuildType }}
Expand All @@ -35,10 +35,22 @@ jobs:
- name: Run tests for ${{ matrix.libBuildType }} on ${{ matrix.config.target }}
continue-on-error: ${{ matrix.config.continueOnError }}
run: |
chmod +x ./runTests.sh
./runTests.sh ${{ matrix.libBuildType }} ${{ matrix.config.tasks }}
if [ "${{ runner.os }}" == "Windows" ]; then
./gradlew mingwX64Test -PlibBuildType=${{ matrix.libBuildType }}
else
chmod +x ./runTests.sh
./runTests.sh ${{ matrix.libBuildType }} ${{ matrix.config.tasks }}
fi
shell: bash
working-directory: ${{ github.workspace }}

- name: Upload test results from ksoup-test module if failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-results-${{ matrix.config.target }}-${{ matrix.libBuildType }}
path: ksoup-test/build/reports/tests/**/*

# deploy:
# if: github.ref == 'refs/heads/release'
#
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Ksoup** is a Kotlin Multiplatform library for working with real-world HTML and XML. It's a port of the renowned Java library, **jsoup**, and offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM and CSS selectors.

[![Kotlin](https://img.shields.io/badge/Kotlin-2.0.10-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/Kotlin-2.0.20-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org)
[![Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.fleeksoft.ksoup/ksoup.svg)](https://central.sonatype.com/artifact/com.fleeksoft.ksoup/ksoup)

Expand Down
Loading

0 comments on commit b2fd289

Please sign in to comment.