Coder Social home page Coder Social logo

Comments (6)

JLLeitschuh avatar JLLeitschuh commented on June 17, 2024 1

For the time:

tasks.getByName("ktlint")

should work I think.

from ktlint-gradle.

JLLeitschuh avatar JLLeitschuh commented on June 17, 2024 1

I'm thinking of renaming the task to ktlintCheck. But this will necessitate releasing 2.0.0

from ktlint-gradle.

jeremymailen avatar jeremymailen commented on June 17, 2024 1

This also works:

check.dependsOn tasks.ktlint

👍 for ktlintCheck. Thanks for the plugin.

from ktlint-gradle.

erikthered avatar erikthered commented on June 17, 2024

Yeah this definitely causes failures for things like:

check.dependsOn ktlint

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':check'.
> Cannot convert org.jlleitschuh.gradle.ktlint.KtlintExtension_Decorated@6402d76e to a task.
  The following types/formats are supported:
    - A String or CharSequence task name or path
    - A TaskReference instance
    - A Task instance
    - A Buildable instance
    - A TaskDependency instance
    - A Closure instance that returns any of the above types
    - A Callable instance that returns any of the above types
    - An Iterable, Collection, Map or array instance that contains any of the above types

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.514 secs

from ktlint-gradle.

erikthered avatar erikthered commented on June 17, 2024

Thanks! I couldn't figure out the right way to do that.

from ktlint-gradle.

JLLeitschuh avatar JLLeitschuh commented on June 17, 2024

I should really fix this.

from ktlint-gradle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.