Skip to content

JarJarFeature.enable forces the jarJar task to be configured #243

@SquidDev

Description

@SquidDev

The JarJarFeature provides a method to disable inheriting classes from the main jar.

However, as enable() uses findByPath (rather than named), this means that it's very easily to accidentally cause the jarJar task to be prematurely configured, and in turn causing disableDefaultSources to silently no-op.

For instance, none of the following will work:

jarJar {
  enable()
  disableDefaultSources()
}
dependencies { jarJar(libs.fooBar) } // Causes jarJar to be enabled.
jarJar.disableDefautSources()

This can be worked around by moving jarJar.disableDefautSources() further up the build script. However, it would be nice if either:

  • This worked by default OR
  • This didn't silently fail.

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