Move uri-reference-kmp to version catalog. Remove swift bridge(was a nice run).
This commit is contained in:
@@ -58,6 +58,7 @@ torAndroid = "0.4.9.5.1"
|
|||||||
translate = "17.0.3"
|
translate = "17.0.3"
|
||||||
jetbrainsCompose = "1.10.3"
|
jetbrainsCompose = "1.10.3"
|
||||||
unifiedpush = "3.0.10"
|
unifiedpush = "3.0.10"
|
||||||
|
uriReferenceKmp = "1.0"
|
||||||
vico-charts-compose = "3.0.3"
|
vico-charts-compose = "3.0.3"
|
||||||
zelory = "3.0.1"
|
zelory = "3.0.1"
|
||||||
zoomable = "2.11.1"
|
zoomable = "2.11.1"
|
||||||
@@ -128,6 +129,7 @@ coil-okhttp = { group = "io.coil-kt.coil3", name = "coil-network-okhttp", versio
|
|||||||
coil-video = { group = "io.coil-kt.coil3", name = "coil-video", version.ref = "coil" }
|
coil-video = { group = "io.coil-kt.coil3", name = "coil-video", version.ref = "coil" }
|
||||||
commons-imaging = { group = "org.apache.commons", name = "commons-imaging", version.ref = "commonsImaging" }
|
commons-imaging = { group = "org.apache.commons", name = "commons-imaging", version.ref = "commonsImaging" }
|
||||||
slf4j-nop = { module = "org.slf4j:slf4j-nop", version.ref = "slf4j" }
|
slf4j-nop = { module = "org.slf4j:slf4j-nop", version.ref = "slf4j" }
|
||||||
|
uri-reference-kmp = { module = "io.github.kotlingeekdev:uri-reference-kmp", version.ref = "uriReferenceKmp" }
|
||||||
vlcj = { group = "uk.co.caprica", name = "vlcj", version.ref = "vlcj" }
|
vlcj = { group = "uk.co.caprica", name = "vlcj", version.ref = "vlcj" }
|
||||||
dev-whyoleg-cryptography-provider-apple-optimal = { module = "dev.whyoleg.cryptography:cryptography-provider-optimal", version.ref = "devWhyolegCryptography" }
|
dev-whyoleg-cryptography-provider-apple-optimal = { module = "dev.whyoleg.cryptography:cryptography-provider-optimal", version.ref = "devWhyolegCryptography" }
|
||||||
drfonfon-geohash = { group = "com.github.drfonfon", name = "android-kotlin-geohash", version.ref = "androidKotlinGeohash" }
|
drfonfon-geohash = { group = "com.github.drfonfon", name = "android-kotlin-geohash", version.ref = "androidKotlinGeohash" }
|
||||||
|
|||||||
+1
-21
@@ -1,9 +1,5 @@
|
|||||||
@file:OptIn(ExperimentalSpmForKmpFeature::class)
|
|
||||||
|
|
||||||
import com.vanniktech.maven.publish.KotlinMultiplatform
|
import com.vanniktech.maven.publish.KotlinMultiplatform
|
||||||
import com.vanniktech.maven.publish.SourcesJar
|
import com.vanniktech.maven.publish.SourcesJar
|
||||||
import io.github.frankois944.spmForKmp.swiftPackageConfig
|
|
||||||
import io.github.frankois944.spmForKmp.utils.ExperimentalSpmForKmpFeature
|
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
|
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
|
||||||
|
|
||||||
@@ -13,7 +9,6 @@ plugins {
|
|||||||
alias(libs.plugins.androidKotlinMultiplatformLibrary)
|
alias(libs.plugins.androidKotlinMultiplatformLibrary)
|
||||||
alias(libs.plugins.serialization)
|
alias(libs.plugins.serialization)
|
||||||
alias(libs.plugins.vanniktech.mavenPublish)
|
alias(libs.plugins.vanniktech.mavenPublish)
|
||||||
alias(libs.plugins.frankois944.spmForKmp)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
@@ -121,21 +116,6 @@ kotlin {
|
|||||||
dependsOn(libsodiumDefFileGeneration)
|
dependsOn(libsodiumDefFileGeneration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
target.swiftPackageConfig(cinteropName = "swiftbridge") {
|
|
||||||
minIos = "17"
|
|
||||||
minMacos = "14"
|
|
||||||
dependency {
|
|
||||||
remotePackageVersion(
|
|
||||||
url = uri("https://github.com/swift-standards/swift-rfc-3986.git"),
|
|
||||||
packageName = "swift-rfc-3986",
|
|
||||||
products = {
|
|
||||||
add("RFC 3986")
|
|
||||||
},
|
|
||||||
version = "0.1.0",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iosArm64 {
|
iosArm64 {
|
||||||
@@ -331,7 +311,7 @@ kotlin {
|
|||||||
implementation(libs.dev.whyoleg.cryptography.provider.apple.optimal)
|
implementation(libs.dev.whyoleg.cryptography.provider.apple.optimal)
|
||||||
implementation("io.github.andreypfau:kotlinx-crypto-hmac:0.0.4")
|
implementation("io.github.andreypfau:kotlinx-crypto-hmac:0.0.4")
|
||||||
implementation("io.github.andreypfau:kotlinx-crypto-sha2:0.0.4")
|
implementation("io.github.andreypfau:kotlinx-crypto-sha2:0.0.4")
|
||||||
implementation("io.github.kotlingeekdev:uri-reference-kmp:1.0")
|
implementation(libs.uri.reference.kmp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
//
|
|
||||||
// Created by NullDev on 31/12/2025.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import RFC_3986
|
|
||||||
|
|
||||||
@objcMembers public class Rfc3986UriBridge: NSObject {
|
|
||||||
public func normalizeUrl(url: String) throws -> String {
|
|
||||||
let uri = try RFC_3986.URI(url)
|
|
||||||
let normalized = uri.normalized()
|
|
||||||
return normalized.value
|
|
||||||
}
|
|
||||||
|
|
||||||
public func isUrlValid(url: String) -> Bool {
|
|
||||||
return RFC_3986.isValidURI(url)
|
|
||||||
}
|
|
||||||
|
|
||||||
public func hostFromUri(url: String) throws -> String {
|
|
||||||
let actualUri = try RFC_3986.URI(url)
|
|
||||||
return actualUri.host!
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
//
|
|
||||||
// Created by NullDev on 20/01/2026.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
|
|
||||||
@objcMembers public class UrlDetector: NSObject {
|
|
||||||
public func findURLs(text: String) -> [String] {
|
|
||||||
var links = [String]()
|
|
||||||
let detector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue)
|
|
||||||
let matches = detector.matches(in: text, options: [], range: NSRange(location: 0, length: text.utf16.count))
|
|
||||||
|
|
||||||
for match in matches {
|
|
||||||
guard let range = Range(match.range, in: text) else { continue }
|
|
||||||
let url = text[range]
|
|
||||||
links.append(String(url))
|
|
||||||
}
|
|
||||||
|
|
||||||
return links
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user