Skip to content

Tapmoc ignores kotlin.stdlib.default.dependency=false in a sub-project's gradle.properties #101

Description

@OliverO2

When setting kotlin.stdlib.default.dependency=false in a non-root Gradle project, Tapmoc nevertheless adds the stdlib to the project dependencies. This is undesirable when creating a shadow Jar in one sub-project and the stdlib dependency should be disabled just there.

This code honors the root project's gradle.properties only:

val isStdlibDefaultDependencyEnabled =
providers.gradleProperty("kotlin.stdlib.default.dependency")
.map { it.toBooleanStrictOrNull() != false }
.getOrElse(true)

Replacing it with the following code would make it work for root and non-root gradle.properties:

val isStdlibDefaultDependencyEnabled =
    project.findProperty("kotlin.stdlib.default.dependency")?.toString()?.toBooleanStrictOrNull() != false

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