Skip to content

Multiplatform protokt - gradle task dependencies #206

Open
@dronda-t

Description

@dronda-t

The following gradle config fails for me without adding explicit task dependencies:
On gradle 8.4

plugins {
    kotlin("multiplatform") version "1.9.10"
    id("com.toasttab.protokt") version "1.0.0-alpha.10"
}
repositories {
    mavenCentral()
}

kotlin {
    jvmToolchain(17)
    jvm {
        withJava()
    }

    js(IR) {
        browser()
    }
}

If I add:

tasks.named("allMetadataJar").get().dependsOn("extractProto")
tasks.named("jvmJar").get().dependsOn("extractProto")
tasks.named("jsJar").get().dependsOn("extractProto")

it passes.

I believe protokt should be able to handle this internally. I'm not sure if it's the case here, but I have solved a similar problem by adding the output providers to the kotlin source set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions