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

Change project name to kmp-process #21

Merged
merged 1 commit into from
Feb 8, 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# process
# kmp-process
[![badge-license]][url-license]
[![badge-latest-release]][url-latest-release]

Expand Down Expand Up @@ -107,7 +107,7 @@ p.sigkill()
[badge-support-js-ir]: https://img.shields.io/badge/support-[js--IR]-AAC4E0.svg?style=flat
[badge-support-linux-arm]: http://img.shields.io/badge/support-[LinuxArm]-2D3F6C.svg?style=flat

[url-latest-release]: https://github.com/05nelsonm/process/releases/latest
[url-latest-release]: https://github.com/05nelsonm/kmp-process/releases/latest
[url-license]: https://www.apache.org/licenses/LICENSE-2.0
[url-kotlin]: https://kotlinlang.org
[url-coroutines]: https://github.com/Kotlin/kotlinx.coroutines
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ kotlin.native.ignoreDisabledTargets=true
SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true

GROUP=io.matthewnelson.process
GROUP=io.matthewnelson.kmp-process

POM_INCEPTION_YEAR=2024

POM_URL=https://github.com/05nelsonm/process/
POM_SCM_URL=https://github.com/05nelsonm/process/
POM_SCM_CONNECTION=scm:git:git://github.com/05nelsonm/process.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/05nelsonm/process.git
POM_URL=https://github.com/05nelsonm/kmp-process/
POM_SCM_URL=https://github.com/05nelsonm/kmp-process/
POM_SCM_CONNECTION=scm:git:git://github.com/05nelsonm/kmp-process.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/05nelsonm/kmp-process.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
Expand Down
82 changes: 41 additions & 41 deletions library/process/api/process.api
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
public abstract class io/matthewnelson/process/Process {
public abstract class io/matthewnelson/kmp/process/Process {
public final field args Ljava/util/List;
public final field command Ljava/lang/String;
public final field environment Ljava/util/Map;
public final field stdio Lio/matthewnelson/process/Stdio$Config;
public final field stdio Lio/matthewnelson/kmp/process/Stdio$Config;
public abstract fun exitCode ()I
public final fun isAlive ()Z
public abstract fun sigkill ()Lio/matthewnelson/process/Process;
public abstract fun sigterm ()Lio/matthewnelson/process/Process;
public abstract fun sigkill ()Lio/matthewnelson/kmp/process/Process;
public abstract fun sigterm ()Lio/matthewnelson/kmp/process/Process;
public abstract fun waitFor ()I
public abstract fun waitFor-LRDsOJo (J)Ljava/lang/Integer;
public final fun waitForAsync (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public final fun waitForAsync-VtjQ1oo (JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public final class io/matthewnelson/process/Process$Builder {
public final class io/matthewnelson/kmp/process/Process$Builder {
public final field command Ljava/lang/String;
public fun <init> (Ljava/io/File;)V
public fun <init> (Ljava/lang/String;)V
public final fun args (Ljava/lang/String;)Lio/matthewnelson/process/Process$Builder;
public final fun args (Ljava/util/List;)Lio/matthewnelson/process/Process$Builder;
public final fun args ([Ljava/lang/String;)Lio/matthewnelson/process/Process$Builder;
public final fun environment (Ljava/lang/String;Ljava/lang/String;)Lio/matthewnelson/process/Process$Builder;
public final fun spawn ()Lio/matthewnelson/process/Process;
public final fun stderr (Lio/matthewnelson/process/Stdio;)Lio/matthewnelson/process/Process$Builder;
public final fun stdin (Lio/matthewnelson/process/Stdio;)Lio/matthewnelson/process/Process$Builder;
public final fun stdout (Lio/matthewnelson/process/Stdio;)Lio/matthewnelson/process/Process$Builder;
public final fun withEnvironment (Lkotlin/jvm/functions/Function1;)Lio/matthewnelson/process/Process$Builder;
public final fun args (Ljava/lang/String;)Lio/matthewnelson/kmp/process/Process$Builder;
public final fun args (Ljava/util/List;)Lio/matthewnelson/kmp/process/Process$Builder;
public final fun args ([Ljava/lang/String;)Lio/matthewnelson/kmp/process/Process$Builder;
public final fun environment (Ljava/lang/String;Ljava/lang/String;)Lio/matthewnelson/kmp/process/Process$Builder;
public final fun spawn ()Lio/matthewnelson/kmp/process/Process;
public final fun stderr (Lio/matthewnelson/kmp/process/Stdio;)Lio/matthewnelson/kmp/process/Process$Builder;
public final fun stdin (Lio/matthewnelson/kmp/process/Stdio;)Lio/matthewnelson/kmp/process/Process$Builder;
public final fun stdout (Lio/matthewnelson/kmp/process/Stdio;)Lio/matthewnelson/kmp/process/Process$Builder;
public final fun withEnvironment (Lkotlin/jvm/functions/Function1;)Lio/matthewnelson/kmp/process/Process$Builder;
}

public abstract class io/matthewnelson/process/Stdio {
public static final field Companion Lio/matthewnelson/process/Stdio$Companion;
public static final fun Null ()Lio/matthewnelson/process/Stdio$File;
public abstract class io/matthewnelson/kmp/process/Stdio {
public static final field Companion Lio/matthewnelson/kmp/process/Stdio$Companion;
public static final fun Null ()Lio/matthewnelson/kmp/process/Stdio$File;
public final fun toString ()Ljava/lang/String;
}

public final class io/matthewnelson/process/Stdio$Companion {
public final fun Null ()Lio/matthewnelson/process/Stdio$File;
public final class io/matthewnelson/kmp/process/Stdio$Companion {
public final fun Null ()Lio/matthewnelson/kmp/process/Stdio$File;
}

public final class io/matthewnelson/process/Stdio$Config : java/lang/Iterable, kotlin/jvm/internal/markers/KMappedMarker {
public final field stderr Lio/matthewnelson/process/Stdio;
public final field stdin Lio/matthewnelson/process/Stdio;
public final field stdout Lio/matthewnelson/process/Stdio;
public synthetic fun <init> (Lio/matthewnelson/process/Stdio;Lio/matthewnelson/process/Stdio;Lio/matthewnelson/process/Stdio;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final class io/matthewnelson/kmp/process/Stdio$Config : java/lang/Iterable, kotlin/jvm/internal/markers/KMappedMarker {
public final field stderr Lio/matthewnelson/kmp/process/Stdio;
public final field stdin Lio/matthewnelson/kmp/process/Stdio;
public final field stdout Lio/matthewnelson/kmp/process/Stdio;
public synthetic fun <init> (Lio/matthewnelson/kmp/process/Stdio;Lio/matthewnelson/kmp/process/Stdio;Lio/matthewnelson/kmp/process/Stdio;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public fun iterator ()Ljava/util/Iterator;
public fun toString ()Ljava/lang/String;
}

public final class io/matthewnelson/process/Stdio$File : io/matthewnelson/process/Stdio {
public static final field Companion Lio/matthewnelson/process/Stdio$File$Companion;
public final class io/matthewnelson/kmp/process/Stdio$File : io/matthewnelson/kmp/process/Stdio {
public static final field Companion Lio/matthewnelson/kmp/process/Stdio$File$Companion;
public final field append Z
public final field file Ljava/io/File;
public synthetic fun <init> (Ljava/io/File;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public static final fun of (Ljava/io/File;)Lio/matthewnelson/process/Stdio$File;
public static final fun of (Ljava/io/File;Z)Lio/matthewnelson/process/Stdio$File;
public static final fun of (Ljava/lang/String;)Lio/matthewnelson/process/Stdio$File;
public static final fun of (Ljava/lang/String;Z)Lio/matthewnelson/process/Stdio$File;
public static final fun of (Ljava/io/File;)Lio/matthewnelson/kmp/process/Stdio$File;
public static final fun of (Ljava/io/File;Z)Lio/matthewnelson/kmp/process/Stdio$File;
public static final fun of (Ljava/lang/String;)Lio/matthewnelson/kmp/process/Stdio$File;
public static final fun of (Ljava/lang/String;Z)Lio/matthewnelson/kmp/process/Stdio$File;
}

public final class io/matthewnelson/process/Stdio$File$Companion {
public final fun of (Ljava/io/File;)Lio/matthewnelson/process/Stdio$File;
public final fun of (Ljava/io/File;Z)Lio/matthewnelson/process/Stdio$File;
public final fun of (Ljava/lang/String;)Lio/matthewnelson/process/Stdio$File;
public final fun of (Ljava/lang/String;Z)Lio/matthewnelson/process/Stdio$File;
public static synthetic fun of$default (Lio/matthewnelson/process/Stdio$File$Companion;Ljava/io/File;ZILjava/lang/Object;)Lio/matthewnelson/process/Stdio$File;
public static synthetic fun of$default (Lio/matthewnelson/process/Stdio$File$Companion;Ljava/lang/String;ZILjava/lang/Object;)Lio/matthewnelson/process/Stdio$File;
public final class io/matthewnelson/kmp/process/Stdio$File$Companion {
public final fun of (Ljava/io/File;)Lio/matthewnelson/kmp/process/Stdio$File;
public final fun of (Ljava/io/File;Z)Lio/matthewnelson/kmp/process/Stdio$File;
public final fun of (Ljava/lang/String;)Lio/matthewnelson/kmp/process/Stdio$File;
public final fun of (Ljava/lang/String;Z)Lio/matthewnelson/kmp/process/Stdio$File;
public static synthetic fun of$default (Lio/matthewnelson/kmp/process/Stdio$File$Companion;Ljava/io/File;ZILjava/lang/Object;)Lio/matthewnelson/kmp/process/Stdio$File;
public static synthetic fun of$default (Lio/matthewnelson/kmp/process/Stdio$File$Companion;Ljava/lang/String;ZILjava/lang/Object;)Lio/matthewnelson/kmp/process/Stdio$File;
}

public final class io/matthewnelson/process/Stdio$Inherit : io/matthewnelson/process/Stdio {
public static final field INSTANCE Lio/matthewnelson/process/Stdio$Inherit;
public final class io/matthewnelson/kmp/process/Stdio$Inherit : io/matthewnelson/kmp/process/Stdio {
public static final field INSTANCE Lio/matthewnelson/kmp/process/Stdio$Inherit;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
}

public final class io/matthewnelson/process/Stdio$Pipe : io/matthewnelson/process/Stdio {
public static final field INSTANCE Lio/matthewnelson/process/Stdio$Pipe;
public final class io/matthewnelson/kmp/process/Stdio$Pipe : io/matthewnelson/kmp/process/Stdio {
public static final field INSTANCE Lio/matthewnelson/kmp/process/Stdio$Pipe;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
}
Expand Down
4 changes: 2 additions & 2 deletions library/process/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
POM_ARTIFACT_ID=process
POM_NAME=Process
POM_DESCRIPTION=Process
POM_NAME=Kotlin Multiplatform Process
POM_DESCRIPTION=Process for Kotlin Multiplatform
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package io.matthewnelson.process
package io.matthewnelson.kmp.process

import io.matthewnelson.immutable.collections.toImmutableList
import io.matthewnelson.immutable.collections.toImmutableMap
import io.matthewnelson.kmp.file.*
import io.matthewnelson.process.internal.STDIO_NULL
import io.matthewnelson.process.internal.PlatformBuilder
import io.matthewnelson.process.internal.commonWaitFor
import io.matthewnelson.kmp.process.internal.STDIO_NULL
import io.matthewnelson.kmp.process.internal.PlatformBuilder
import io.matthewnelson.kmp.process.internal.commonWaitFor
import kotlinx.coroutines.delay
import kotlin.jvm.JvmField
import kotlin.jvm.JvmName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package io.matthewnelson.process
package io.matthewnelson.kmp.process

import io.matthewnelson.immutable.collections.immutableListOf
import io.matthewnelson.kmp.file.path
import io.matthewnelson.kmp.file.toFile
import io.matthewnelson.process.internal.STDIO_NULL
import io.matthewnelson.kmp.process.internal.STDIO_NULL
import kotlin.jvm.*

/**
Expand Down Expand Up @@ -52,7 +51,7 @@ public sealed class Stdio private constructor() {
* */
@JvmStatic
@get:JvmName("Null")
public val Null: File get() = File.of(STDIO_NULL)
public val Null: File get() = File.Companion.of(STDIO_NULL)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.kmp.file.File

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
**/
@file:Suppress("KotlinRedundantDiagnosticSuppress")

package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.process.Process
import io.matthewnelson.kmp.file.IOException
import io.matthewnelson.kmp.process.Process
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.InvocationKind
import kotlin.contracts.contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
**/
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")

package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.kmp.file.IOException
import io.matthewnelson.process.Process
import io.matthewnelson.process.Stdio
import io.matthewnelson.kmp.process.Process
import io.matthewnelson.kmp.process.Stdio

internal expect class PlatformBuilder internal constructor() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package io.matthewnelson.process
package io.matthewnelson.kmp.process

import io.matthewnelson.kmp.file.IOException
import io.matthewnelson.kmp.file.SysTempDir
Expand All @@ -33,7 +33,7 @@ import kotlin.time.measureTime
abstract class ProcessBaseTest {

private companion object {
private val installer = TorResources(installationDir = SysTempDir.resolve("process"))
private val installer = TorResources(installationDir = SysTempDir.resolve("kmp_process"))
}

protected abstract val isUnixDesktop: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -15,9 +15,8 @@
**/
@file:Suppress("KotlinRedundantDiagnosticSuppress")

package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.process.*
import kotlinx.cinterop.*
import platform.Foundation.NSProcessInfo
import platform.posix.pid_tVar
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
/*
* Copyright (c) 2024 Matthew Nelson
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")

package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.kmp.file.IOException
import io.matthewnelson.process.posix_spawnattr_destroy
import io.matthewnelson.process.posix_spawnattr_init
import io.matthewnelson.process.posix_spawnattr_tVar
import kotlinx.cinterop.*

@OptIn(ExperimentalForeignApi::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -15,10 +15,9 @@
**/
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")

package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.kmp.file.IOException
import io.matthewnelson.process.*
import kotlinx.cinterop.*

@OptIn(ExperimentalForeignApi::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.kmp.file.File
import io.matthewnelson.kmp.file.SysPathSep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.kmp.file.InterruptedException
import io.matthewnelson.kmp.file.IOException
import io.matthewnelson.process.Process
import io.matthewnelson.process.Stdio
import io.matthewnelson.kmp.process.Process
import io.matthewnelson.kmp.process.Stdio
import kotlin.time.Duration

internal class JvmProcess private constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
**/
@file:Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")

package io.matthewnelson.process.internal
package io.matthewnelson.kmp.process.internal

import io.matthewnelson.process.Process
import io.matthewnelson.kmp.file.IOException
import io.matthewnelson.process.Stdio
import java.io.File
import io.matthewnelson.kmp.process.Process
import io.matthewnelson.kmp.process.Stdio

// jvmMain
internal actual class PlatformBuilder internal actual constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package io.matthewnelson.process
package io.matthewnelson.kmp.process

import io.matthewnelson.kmp.file.SysPathSep

Expand Down
Loading
Loading