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

Release 0.2.0 #97

Merged
merged 8 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ allprojects {
sourceCompatibility = JDK_VERSION
targetCompatibility = JDK_VERSION
}
compileSdk = 34
compileSdk = 35
namespace = "com.fleeksoft.${project.name.replace("-", ".")}"
defaultConfig {
minSdk = 21
Expand Down
5 changes: 4 additions & 1 deletion common.module-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ settings:
kotlin:
apiVersion: 1.9
languageVersion: 1.9
jvm:
release: 17
android:
compileSdk: 34
compileSdk: 35
minSdk: 21
namespace: "com.fleeksoft.ksoup"

test-dependencies:
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[versions]
agp = "8.5.2"
agp = "8.7.1"
kotlin = "2.0.21"
compileSdk = "34"
compileSdk = "35"
minSdk = "21"
libraryVersion = "0.1.9"
ktor = "3.0.0"
libraryVersion = "0.2.0"
ktor = "3.0.1"
ktor2 = "2.3.12"
coroutines = "1.9.0"
kotlinxDatetime = "0.6.1"
Expand All @@ -15,7 +15,7 @@ kotlinx-benchmark = "0.4.12"

#korlibs = "999.0.0.999" # 999.0.0.999 is local version
korlibs = "6.0.1"
mavenPublish = "0.29.0"
mavenPublish = "0.30.0"

stately = "2.1.0"
jsoup = "1.18.1"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
2 changes: 1 addition & 1 deletion ksoup-engine-common/module.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
product:
type: lib
platforms: [jvm, js, wasm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64]
platforms: [jvm, js, wasm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64]

apply: [ ../common.module-template.yaml ]

Expand Down
2 changes: 1 addition & 1 deletion ksoup-engine-kotlinx/module.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
product:
type: lib
platforms: [ jvm, js, wasm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
platforms: [ jvm, js, wasm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

Expand Down
4 changes: 2 additions & 2 deletions ksoup-engine-ktor2/module.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
product:
type: lib
platforms: [jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64]
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

aliases:
- jvmAndAndroid: [jvm, android]
- jvmAndAndroid: [ jvm, android ]

dependencies:
- ../ksoup-engine-common
Expand Down
2 changes: 1 addition & 1 deletion ksoup-engine-lite/module.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
product:
type: lib
platforms: [ jvm, js, wasm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
platforms: [ jvm, js, wasm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

Expand Down
4 changes: 2 additions & 2 deletions ksoup-engine-okio/module.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
product:
type: lib
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

aliases:
- jvmAndAndroid: [ jvm, android ]
- concurrent: [ jvm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
- concurrent: [ jvm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

dependencies:
- ../ksoup-engine-common
Expand Down
4 changes: 2 additions & 2 deletions ksoup-network-korlibs/module.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
product:
type: lib
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

aliases:
- jvmAndAndroid: [ jvm, android ]
- concurrent: [ jvm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
- concurrent: [ jvm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

repositories:
- mavenLocal
Expand Down
4 changes: 2 additions & 2 deletions ksoup-network-ktor2/module.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
product:
type: lib
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

aliases:
- jvmAndAndroid: [ jvm, android ]
- concurrent: [ jvm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
- concurrent: [ jvm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

repositories:
- mavenLocal
Expand Down
10 changes: 7 additions & 3 deletions ksoup-network/module.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
product:
type: lib
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
platforms: [ wasm, jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

aliases:
- jvmAndAndroid: [ jvm, android ]
- concurrent: [ jvm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
- concurrent: [ jvm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

repositories:
- mavenLocal
Expand All @@ -32,4 +32,8 @@ dependencies@mingw:
- $libs.ktor.client.win

dependencies@linux:
- $libs.ktor.client.cio
- $libs.ktor.client.cio

test-dependencies:
- $libs.kotlinx.coroutines.test
- ../ksoup
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ import com.fleeksoft.ksoup.io.from
import io.ktor.client.statement.*
import io.ktor.utils.io.*

suspend fun HttpResponse.asSourceReader() = SourceReader.from(this.bodyAsChannel().readBuffer)
suspend fun HttpResponse.asSourceReader() = SourceReader.from(this.bodyAsChannel().readBuffer())
2 changes: 1 addition & 1 deletion ksoup-test/module.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
product:
type: lib
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

Expand Down
2 changes: 1 addition & 1 deletion ksoup/module.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
product:
type: lib
platforms: [ jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64 ]
platforms: [jvm, js, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, mingwX64, watchosArm32, watchosArm64, watchosDeviceArm64, watchosSimulatorArm64 ]

apply: [ ../common.module-template.yaml ]

Expand Down
2 changes: 1 addition & 1 deletion ksoup/src/com/fleeksoft/ksoup/internal/SoftPool.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SoftPool<T>(private val initializer: () -> T) {
fun borrow(): T {
val stack: ArrayDeque<T> = stack
if (!stack.isEmpty()) {
return stack.removeFirst()
return stack.removeAt(0)
}
return initializer()
}
Expand Down
2 changes: 1 addition & 1 deletion ksoup/src/com/fleeksoft/ksoup/nodes/Node.kt
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ public abstract class Node protected constructor() : KCloneable<Node> {
val nodesToProcess: LinkedList<Node> = mutableListOf()
nodesToProcess.add(thisClone)
while (nodesToProcess.isNotEmpty()) {
val currParent: Node = nodesToProcess.removeFirst()
val currParent: Node = nodesToProcess.removeAt(0)
val size = currParent.childNodeSize()
for (i in 0 until size) {
val childNodes = currParent.ensureChildNodes()
Expand Down
4 changes: 2 additions & 2 deletions ksoup/src/com/fleeksoft/ksoup/parser/StreamParser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,14 @@ class StreamParser(private val parser: Parser) {

// drain the current queue before stepping to get more
if (!emitQueue.isEmpty()) {
next = emitQueue.removeFirst()
next = emitQueue.removeAt(0)
return
}

// step the parser, which will hit the node listeners to add to the queue:
while (treeBuilder.stepParser()) {
if (!emitQueue.isEmpty()) {
next = emitQueue.removeFirst()
next = emitQueue.removeAt(0)
return
}
}
Expand Down
Loading