Giter Club home page Giter Club logo

Comments (8)

Habitats avatar Habitats commented on July 20, 2024 1

Tested with 1.16.2 now, and it seems to be working :)

Thanks for resolving!

from gradle-scalafmt.

augi avatar augi commented on July 20, 2024

Released in 1.15.0, please check it out.

from gradle-scalafmt.

Habitats avatar Habitats commented on July 20, 2024

@augi I upgraded to 1.16.1 but now I get this error instead:

Selected primary task 'scalafmtAll' from project :

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':scalafmtAll'.
> Could not create task ':scalafmt'.
   > Could not create task of type 'ScalafmtTask'.
      > Could not initialize class cz.alenkacz.gradle.scalafmt.ScalafmtTask_Decorated

from gradle-scalafmt.

augi avatar augi commented on July 20, 2024

How do you please include this plugin to your project?

from gradle-scalafmt.

Habitats avatar Habitats commented on July 20, 2024

like this

plugins {
  id "scala"
  id "java-library"
  id "idea"
  id 'cz.alenkacz.gradle.scalafmt' version "1.16.1"
}

apply plugin: "cz.alenkacz.gradle.scalafmt"

from gradle-scalafmt.

augi avatar augi commented on July 20, 2024

It looks like your are mixing old and new style of plugin import. Please check it here.

I'm not saying this will fix your issue but it could move us further.

from gradle-scalafmt.

Habitats avatar Habitats commented on July 20, 2024

The reason I'm doing it like that is because I have a multi module build, so the setup is actually more like

plugins {
  id "scala"
  id "java-library"
  id "idea"
  id "cz.augi.gradle.wartremover" version "0.13.2"
  id "com.github.jk1.dependency-license-report" version "1.12" apply true
  id "com.github.johnrengelman.shadow" version "5.1.0" apply false
  id "com.github.maiflai.scalatest" version "0.25" apply false
  id "io.github.cosmicsilence.scalafix" version "0.1.8" apply false
  id "cz.alenkacz.gradle.scalafmt" version "1.16.1"
  id "com.lightbend.akka.grpc.gradle" version "1.0.0" apply false
}

allprojects {
  apply plugin: "scala"
  apply plugin: "java-library"
  apply plugin: "idea"
  apply plugin: "project-report"
  apply plugin: "maven-publish"
  apply plugin: "io.github.cosmicsilence.scalafix"
  apply plugin: "com.github.maiflai.scalatest"
  apply plugin: "cz.alenkacz.gradle.scalafmt"
  apply plugin: "com.github.johnrengelman.shadow"

  ...
}

However, I've now tried using both 100% the legacy way, and 100% the "new way" (by defining all plugins in submodule/build.gradle ) and I still get the same error.

I've had this setup for years, without issues, until Gradle 7.

from gradle-scalafmt.

augi avatar augi commented on July 20, 2024

Hello, sorry about that 😢 Let's solve this in the following issue: #42

from gradle-scalafmt.

Related Issues (13)

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.