Skip to content
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
32 changes: 2 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,9 @@
# Gradle files
.gradle/
.kotlin/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof
local.properties
.kotlin/

gh-pages/*
!gh-pages/publish.sh
281 changes: 123 additions & 158 deletions .kotlin-js-store/yarn.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![badge-kotlin]][url-kotlin]
[![badge-coroutines]][url-coroutines]
[![badge-endians]][url-endians]
[![badge-bitops]][url-bitops]
[![badge-immutable]][url-immutable]
[![badge-kmp-file]][url-kmp-file]

Expand Down Expand Up @@ -227,11 +227,11 @@ dependencies {
[badge-license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat

<!-- TAG_DEPENDENCIES -->
[badge-coroutines]: https://img.shields.io/badge/kotlinx.coroutines-1.8.1-blue.svg?logo=kotlin
[badge-endians]: https://img.shields.io/badge/kotlincrypto.endians-0.3.1-blue.svg?style=flat
[badge-immutable]: https://img.shields.io/badge/immutable-0.1.4-blue.svg?style=flat
[badge-kmp-file]: https://img.shields.io/badge/kmp--file-0.1.1-blue.svg?style=flat
[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.24-blue.svg?logo=kotlin
[badge-coroutines]: https://img.shields.io/badge/kotlinx.coroutines-1.10.1-blue.svg?logo=kotlin
[badge-bitops]: https://img.shields.io/badge/kotlincrypto.bitops-0.1.2-blue.svg?style=flat
[badge-immutable]: https://img.shields.io/badge/immutable-0.2.0-blue.svg?style=flat
[badge-kmp-file]: https://img.shields.io/badge/kmp--file-0.2.0-blue.svg?style=flat
[badge-kotlin]: https://img.shields.io/badge/kotlin-2.1.10-blue.svg?logo=kotlin

<!-- TAG_PLATFORMS -->
[badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat
Expand All @@ -254,7 +254,7 @@ dependencies {
[url-latest-release]: https://github.com/05nelsonm/kmp-process/releases/latest
[url-license]: https://www.apache.org/licenses/LICENSE-2.0
[url-coroutines]: https://github.com/Kotlin/kotlinx.coroutines
[url-endians]: https://github.com/KotlinCrypto/endians
[url-bitops]: https://github.com/KotlinCrypto/bitops
[url-immutable]: https://github.com/05nelsonm/immutable
[url-kmp-file]: https://github.com/05nelsonm/kmp-file
[url-kotlin]: https://kotlinlang.org
Expand Down
4 changes: 1 addition & 3 deletions build-logic/src/main/kotlin/-KmpConfigurationExtension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
import io.matthewnelson.kmp.configuration.ExperimentalKmpConfigurationApi
import io.matthewnelson.kmp.configuration.extension.KmpConfigurationExtension
import io.matthewnelson.kmp.configuration.extension.container.target.KmpConfigurationContainerDsl
import org.gradle.api.Action
Expand Down Expand Up @@ -41,10 +40,9 @@ fun KmpConfigurationExtension.configureShared(
compileTargetCompatibility = JavaVersion.VERSION_1_8

// windows always throws a fit if not using Java 11. This disables
// compilations of module-info.java. Nobody deploys from Windows
// compilation of module-info.java. Nobody deploys from Windows
// anyway...
if (!HostManager.hostIsMingw) {
@OptIn(ExperimentalKmpConfigurationApi::class)
java9ModuleInfoName = java9ModuleName
}
}
Expand Down
32 changes: 18 additions & 14 deletions build-logic/src/main/kotlin/dokka.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,38 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
import org.jetbrains.dokka.DokkaConfiguration.Visibility
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.dokka.gradle.DokkaExtension
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
import java.net.URI

plugins {
id("org.jetbrains.dokka")
}

tasks.withType<DokkaTaskPartial>().configureEach {
suppressInheritedMembers = true
rootProject.dependencies { dokka(project(project.path)) }

extensions.configure<DokkaExtension> {
dokkaPublications.configureEach {
suppressInheritedMembers.set(true)
}

dokkaSourceSets.configureEach {
includes.from("README.md")
noStdlibLink = true
enableKotlinStdLibDocumentationLink.set(false)

externalDocumentationLink {
url = URI("https://kmp-file.matthewnelson.io/").toURL()
externalDocumentationLinks.create("kmp-file") {
url.set(URI("https://kmp-file.matthewnelson.io/"))
}

sourceLink {
localDirectory = rootDir
remoteUrl = URI("https://github.com/05nelsonm/kmp-process/tree/master").toURL()
remoteLineSuffix = "#L"
localDirectory.set(rootDir)
remoteUrl.set(URI("https://github.com/05nelsonm/kmp-process/tree/master"))
remoteLineSuffix.set("#L")
}

documentedVisibilities.set(setOf(
Visibility.PUBLIC,
Visibility.PROTECTED,
))
documentedVisibilities(
VisibilityModifier.Public,
VisibilityModifier.Protected,
)
}
}
17 changes: 9 additions & 8 deletions gh-pages/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@
set -e

readonly DIR_SCRIPT="$( cd "$( dirname "$0" )" >/dev/null && pwd )"
readonly REPO_NAME="kmp-process"

trap 'rm -rf "$DIR_SCRIPT/kmp-process"' EXIT
trap 'rm -rf "$DIR_SCRIPT/$REPO_NAME"' EXIT

cd "$DIR_SCRIPT"
git clone -b gh-pages --single-branch https://github.com/05nelsonm/kmp-process.git
rm -rf "$DIR_SCRIPT/kmp-process/"*
echo "kmp-process.matthewnelson.io" > "$DIR_SCRIPT/kmp-process/CNAME"
git clone -b gh-pages --single-branch https://github.com/05nelsonm/$REPO_NAME.git
rm -rf "$DIR_SCRIPT/$REPO_NAME/"*
echo "$REPO_NAME.matthewnelson.io" > "$DIR_SCRIPT/$REPO_NAME/CNAME"

cd ..
./gradlew clean -DKMP_TARGETS_ALL
./gradlew dokkaHtmlMultiModule --no-build-cache -DKMP_TARGETS_ALL
cp -aR build/dokka/htmlMultiModule/* gh-pages/kmp-process
./gradlew dokkaGenerate --no-build-cache -DKMP_TARGETS_ALL
cp -aR build/dokka/html/* gh-pages/$REPO_NAME

cd "$DIR_SCRIPT/kmp-process"
sed -i "s|module:process|module:library/process|g" "package-list"
cd "$DIR_SCRIPT/$REPO_NAME"
sed -i "s|module:|module:library/|g" "package-list"

git add --all
git commit -S --message "Update dokka docs"
Expand Down
9 changes: 6 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ kotlin.mpp.applyDefaultHierarchyTemplate=false
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.stability.nowarn=true
kotlin.native.ignoreDisabledTargets=true
kotlin.native.ignoreIncorrectDependencies=true
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning

org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true
Expand All @@ -33,10 +36,10 @@ POM_DEVELOPER_ID=05nelsonm
POM_DEVELOPER_NAME=Matthew Nelson
POM_DEVELOPER_URL=https://github.com/05nelsonm/

VERSION_NAME=0.1.3-SNAPSHOT
VERSION_NAME=0.2.0-SNAPSHOT
# 0.1.0-alpha01 = 00 01 00 11
# 0.1.0-beta01 = 00 01 00 41
# 0.1.0-rc01 = 00 01 00 71
# 0.1.0 = 00 01 00 99
# 1.1.0 = 01 01 00 99
VERSION_CODE=00010399
VERSION_CODE=00020099
61 changes: 31 additions & 30 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
[versions]
androidx-test-core = "1.5.0"
androidx-test-runner = "1.5.2"
#noinspection GradleDependency
androidx-test-core = "1.5.0" # Do not upgrade. Tests run for API 15+, where next version requires minSdk 19+
#noinspection GradleDependency
androidx-test-runner = "1.5.2" # Do not upgrade. Tests run for API 15+, where next version requires minSdk 19+

gradle-android = "8.2.2"
gradle-binary-compat = "0.16.3"
gradle-dokka = "1.9.20"
gradle-kmp-configuration = "0.3.2"
gradle-kotlin = "1.9.24"
gradle-publish-maven = "0.29.0"
gradle-android = "8.7.3"
gradle-binary-compat = "0.17.0"
gradle-dokka = "2.0.0"
gradle-kmp-configuration = "0.4.0"
gradle-kotlin = "2.1.10"
gradle-publish-maven = "0.30.0"

immutable = "0.1.4"
immutable = "0.2.0-SNAPSHOT"

kmp-file = "0.1.1"
kmp-tor-resource = "408.13.0"
kotlincrypto-endians = "0.3.1"
kotlinx-coroutines = "1.8.1"
kmp-file = "0.2.0-SNAPSHOT"
kmp-tor-resource = "408.13.1"
kotlincrypto-catalog = "0.6.1" # Utilized from settings.gradle.kts
kotlinx-coroutines = "1.10.1"

[libraries]
gradle-android = { module = "com.android.tools.build:gradle", version.ref = "gradle-android" }
gradle-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradle-dokka" }
gradle-kmp-configuration = { module = "io.matthewnelson:gradle-kmp-configuration-plugin", version.ref = "gradle-kmp-configuration" }
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "gradle-kotlin" }
gradle-publish-maven = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradle-publish-maven" }
gradle-android = { module = "com.android.tools.build:gradle", version.ref = "gradle-android" }
gradle-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "gradle-dokka" }
gradle-kmp-configuration = { module = "io.matthewnelson:gradle-kmp-configuration-plugin", version.ref = "gradle-kmp-configuration" }
gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "gradle-kotlin" }
gradle-publish-maven = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradle-publish-maven" }

immutable-collections = { module = "io.matthewnelson.immutable:collections", version.ref = "immutable" }
immutable-collections = { module = "io.matthewnelson.immutable:collections", version.ref = "immutable" }

kmp-file = { module = "io.matthewnelson.kmp-file:file", version.ref = "kmp-file" }
kotlincrypto-endians = { module = "org.kotlincrypto.endians:endians", version.ref = "kotlincrypto-endians" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kmp-file = { module = "io.matthewnelson.kmp-file:file", version.ref = "kmp-file" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }

# tests
androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test-core" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" }
androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test-core" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" }
kmp-tor-resource-android-unit-test-tor = { module = "io.matthewnelson.kmp-tor:resource-android-unit-test-tor", version.ref = "kmp-tor-resource" }
kmp-tor-resource-exec-tor = { module = "io.matthewnelson.kmp-tor:resource-exec-tor", version.ref = "kmp-tor-resource" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
kmp-tor-resource-exec-tor = { module = "io.matthewnelson.kmp-tor:resource-exec-tor", version.ref = "kmp-tor-resource" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }

[plugins]
android-library = { id = "com.android.library", version.ref = "gradle-android" }
binary-compat = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "gradle-binary-compat" }
dokka = { id = "org.jetbrains.dokka", version.ref = "gradle-dokka" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "gradle-kotlin" }
android-library = { id = "com.android.library", version.ref = "gradle-android" }
binary-compat = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "gradle-binary-compat" }
dokka = { id = "org.jetbrains.dokka", version.ref = "gradle-dokka" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "gradle-kotlin" }
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

# https://gradle.org/release-checksums/
distributionSha256Sum=f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
distributionSha256Sum=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds

@Suppress("DEPRECATION")
@Suppress("DEPRECATION", "UnusedReceiverParameter")
abstract class ProcessBaseTest {

protected open val IsAndroidInstrumentTest: Boolean = false
Expand Down Expand Up @@ -213,6 +213,11 @@ abstract class ProcessBaseTest {

@Test
fun givenFeed_whenExceptionHandler_thenNotifies() = runTest(timeout = 5.seconds) {
if (IsWindows) {
println("Skipping...")
return@runTest
}

val shouldThrow = !IsAndroidInstrumentTest && !IsNodeJs

var invocationError = 0
Expand All @@ -233,7 +238,7 @@ abstract class ProcessBaseTest {
.stderr(Stdio.Pipe)
.spawn()
} catch (e: IOException) {
if (IsDarwinMobile || IsWindows) {
if (IsDarwinMobile) {
println("Skipping...")
return@runTest
}
Expand Down
14 changes: 2 additions & 12 deletions library/process/api/process.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ abstract fun interface io.matthewnelson.kmp.process/OutputFeed { // io.matthewne
abstract fun onOutput(kotlin/String?) // io.matthewnelson.kmp.process/OutputFeed.onOutput|onOutput(kotlin.String?){}[0]

sealed class Handler : io.matthewnelson.kmp.process/Blocking { // io.matthewnelson.kmp.process/OutputFeed.Handler|null[0]
constructor <init>(io.matthewnelson.kmp.process/Stdio.Config) // io.matthewnelson.kmp.process/OutputFeed.Handler.<init>|<init>(io.matthewnelson.kmp.process.Stdio.Config){}[0]

final var isDestroyed // io.matthewnelson.kmp.process/OutputFeed.Handler.isDestroyed|{}isDestroyed[0]
final fun <get-isDestroyed>(): kotlin/Boolean // io.matthewnelson.kmp.process/OutputFeed.Handler.isDestroyed.<get-isDestroyed>|<get-isDestroyed>(){}[0]
final fun <set-isDestroyed>(kotlin/Boolean) // io.matthewnelson.kmp.process/OutputFeed.Handler.isDestroyed.<set-isDestroyed>|<set-isDestroyed>(kotlin.Boolean){}[0]
Expand All @@ -50,8 +48,6 @@ abstract fun interface io.matthewnelson.kmp.process/OutputFeed { // io.matthewne
}

sealed class Waiter : io.matthewnelson.kmp.process/Blocking.Waiter { // io.matthewnelson.kmp.process/OutputFeed.Waiter|null[0]
constructor <init>(io.matthewnelson.kmp.process/Process, kotlin/Boolean) // io.matthewnelson.kmp.process/OutputFeed.Waiter.<init>|<init>(io.matthewnelson.kmp.process.Process;kotlin.Boolean){}[0]

final suspend fun awaitStopAsync(): io.matthewnelson.kmp.process/Process // io.matthewnelson.kmp.process/OutputFeed.Waiter.awaitStopAsync|awaitStopAsync(){}[0]
}
}
Expand Down Expand Up @@ -223,11 +219,7 @@ final value class io.matthewnelson.kmp.process/ReadBuffer { // io.matthewnelson.
}

sealed class io.matthewnelson.kmp.process/Blocking { // io.matthewnelson.kmp.process/Blocking|null[0]
constructor <init>() // io.matthewnelson.kmp.process/Blocking.<init>|<init>(){}[0]

sealed class Waiter { // io.matthewnelson.kmp.process/Blocking.Waiter|null[0]
constructor <init>(io.matthewnelson.kmp.process/Process) // io.matthewnelson.kmp.process/Blocking.Waiter.<init>|<init>(io.matthewnelson.kmp.process.Process){}[0]

final val process // io.matthewnelson.kmp.process/Blocking.Waiter.process|{}process[0]
final fun <get-process>(): io.matthewnelson.kmp.process/Process // io.matthewnelson.kmp.process/Blocking.Waiter.process.<get-process>|<get-process>(){}[0]

Expand Down Expand Up @@ -276,8 +268,8 @@ sealed class io.matthewnelson.kmp.process/Stdio { // io.matthewnelson.kmp.proces
final fun hashCode(): kotlin/Int // io.matthewnelson.kmp.process/Stdio.File.hashCode|hashCode(){}[0]

final object Companion { // io.matthewnelson.kmp.process/Stdio.File.Companion|null[0]
final fun of(io.matthewnelson.kmp.file/File, kotlin/Boolean =...): io.matthewnelson.kmp.process/Stdio.File // io.matthewnelson.kmp.process/Stdio.File.Companion.of|of(io.matthewnelson.kmp.file.File;kotlin.Boolean){}[0]
final fun of(kotlin/String, kotlin/Boolean =...): io.matthewnelson.kmp.process/Stdio.File // io.matthewnelson.kmp.process/Stdio.File.Companion.of|of(kotlin.String;kotlin.Boolean){}[0]
final fun of(io.matthewnelson.kmp.file/File, kotlin/Boolean = ...): io.matthewnelson.kmp.process/Stdio.File // io.matthewnelson.kmp.process/Stdio.File.Companion.of|of(io.matthewnelson.kmp.file.File;kotlin.Boolean){}[0]
final fun of(kotlin/String, kotlin/Boolean = ...): io.matthewnelson.kmp.process/Stdio.File // io.matthewnelson.kmp.process/Stdio.File.Companion.of|of(kotlin.String;kotlin.Boolean){}[0]
}
}

Expand Down Expand Up @@ -307,8 +299,6 @@ final class io.matthewnelson.kmp.process/AsyncWriteStream : io.matthewnelson.kmp

// Targets: [native]
sealed class io.matthewnelson.kmp.process/BufferedWriteStream { // io.matthewnelson.kmp.process/BufferedWriteStream|null[0]
constructor <init>(io.matthewnelson.kmp.process.internal/WriteStream) // io.matthewnelson.kmp.process/BufferedWriteStream.<init>|<init>(io.matthewnelson.kmp.process.internal.WriteStream){}[0]

final fun close() // io.matthewnelson.kmp.process/BufferedWriteStream.close|close(){}[0]
final fun flush() // io.matthewnelson.kmp.process/BufferedWriteStream.flush|flush(){}[0]
final fun write(kotlin/ByteArray) // io.matthewnelson.kmp.process/BufferedWriteStream.write|write(kotlin.ByteArray){}[0]
Expand Down
Loading