Skip to content

Commit

Permalink
Update plugin alias (#5)
Browse files Browse the repository at this point in the history
* Update plugin alias

* Update plugin alias
  • Loading branch information
cloudshiftchris authored Mar 16, 2024
1 parent 88d5ba7 commit e903a08
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
2 changes: 0 additions & 2 deletions api/kprocess.api
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public final class io/cloudshiftdev/kprocess/KProcessKt {
public static final fun exec (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun execToFile (Ljava/io/File;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun execToList (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun main (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static synthetic fun main ([Ljava/lang/String;)V
}

public abstract class io/cloudshiftdev/kprocess/OutputConsumer {
Expand Down
26 changes: 25 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import com.gradle.scan.agent.serialization.scan.serializer.kryo.ja
import com.ncorti.ktfmt.gradle.tasks.KtfmtCheckTask
import com.ncorti.ktfmt.gradle.tasks.KtfmtFormatTask
import com.vanniktech.maven.publish.SonatypeHost
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
Expand All @@ -20,7 +22,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
*/

plugins {
kotlin("jvm") version "1.9.23"
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.ktfmt)
alias(libs.plugins.jetbrains.binaryCompatibilityValidator)
alias(libs.plugins.vanniktech.maven.publish)
Expand Down Expand Up @@ -112,3 +114,25 @@ testing {
}
}
}


val ciBuild = System.getenv("CI") != null

val precommit = tasks.register("precommit") {
group = "verification"
dependsOn("check", "ktfmtFormat", "apiDump")
}

// only check formatting for CI builds
tasks.withType<KtfmtCheckTask>().configureEach {
enabled = ciBuild
}

// always format for non-CI builds
tasks.withType<KtfmtFormatTask>().configureEach {
enabled = !ciBuild
}

tasks.named("apiCheck") {
mustRunAfter("apiDump")
}

0 comments on commit e903a08

Please sign in to comment.