Shadow project gradle file doesn't compile

Adi

while working with shadow plugin I tried to execute my Gradle code:

import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer

shadow {
    transformer(AppendingTransformer) {
        resource = 'META-INF/spring.handlers'
    }
    transformer(AppendingTransformer) {
        resource = 'META-INF/spring.schemas'
    }
}

As a result i received the folloqing error:

Could not find method transformer() for arguments [class com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer, build_bdpgdpxcevq273h2385je07ue$_run_closure2_closure5@1452aad2] on project ':ProjectX'.

Am i missing something? where does the 'transformer' function should be defined?

Boaz

Your question lack some information, but from the error you pasted it looks like the shadow extension does not really contain a transformer method (thus trying to find it on the owner object - project). To me it means that you are probably using one of the latest (latest being the 1.2.2 version) versions of the shadow plugin whilst trying to configure it in some old not-supported way.

In the newer versions you should configure the plugin via the

shadowJar {
    transform(AppendingTransformer) {
          resource = 'NOTICE'
    }
}

Configuration closure and not the old notiation

shadow {}

See here the new README file, and here the old README file.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Gradle doesn't compile classes in war project

From Dev

Can't compile gradle vaadin project in Intellij

From Dev

Gradle Jar doesn't compile the .jar correctly?

From Dev

Gradle/Groovy/Shadow project to create executable jar file

From Dev

Javafx project doesn't compile with maven

From Dev

Cordova Android project doesn't compile

From Dev

How to compile source C++ code that doesn't have a project file?

From Dev

Importing gradle project doesn't copy contents

From Dev

Can't compile Android project with gradle after adding a library

From Dev

Can't compile Android project with gradle after adding a library

From Dev

Android Studio gradle doesn't compile the specified version

From Dev

maven paho-releases doesn't compile in gradle

From Dev

Every time i compile my project everything outside the while loop doesn't show up (input comes from file)

From Dev

Gradle doesn't import jsoup into jar file

From Dev

Gradle doesn't import jsoup into jar file

From Dev

gmp strange behaviour that doesn't let me compile new project

From Dev

Compile scala project with gradle: MissingRequirementError

From Dev

Unity Project doesn't have solution file

From Dev

shadowRadius doesn't blur the shadow

From Dev

shadowRadius doesn't blur the shadow

From Dev

node compile.js doesn't generate combined css file

From Dev

Why cron job doesn't compile a python file?

From Dev

Py file doesn't auto compile on Tornado Server

From Dev

Progress Developer Studio 11.6 doesn't auto compile cls file

From Dev

withUnsafeMutablePointer doesn't compile

From Dev

Gradle compile generated java file

From Dev

Gradle cannot compile .aar file

From Java

Gradle can't copy png file in java project

From Dev

Can't compile new project with upgraded android studio due to gradle dependencies

Related Related

  1. 1

    Gradle doesn't compile classes in war project

  2. 2

    Can't compile gradle vaadin project in Intellij

  3. 3

    Gradle Jar doesn't compile the .jar correctly?

  4. 4

    Gradle/Groovy/Shadow project to create executable jar file

  5. 5

    Javafx project doesn't compile with maven

  6. 6

    Cordova Android project doesn't compile

  7. 7

    How to compile source C++ code that doesn't have a project file?

  8. 8

    Importing gradle project doesn't copy contents

  9. 9

    Can't compile Android project with gradle after adding a library

  10. 10

    Can't compile Android project with gradle after adding a library

  11. 11

    Android Studio gradle doesn't compile the specified version

  12. 12

    maven paho-releases doesn't compile in gradle

  13. 13

    Every time i compile my project everything outside the while loop doesn't show up (input comes from file)

  14. 14

    Gradle doesn't import jsoup into jar file

  15. 15

    Gradle doesn't import jsoup into jar file

  16. 16

    gmp strange behaviour that doesn't let me compile new project

  17. 17

    Compile scala project with gradle: MissingRequirementError

  18. 18

    Unity Project doesn't have solution file

  19. 19

    shadowRadius doesn't blur the shadow

  20. 20

    shadowRadius doesn't blur the shadow

  21. 21

    node compile.js doesn't generate combined css file

  22. 22

    Why cron job doesn't compile a python file?

  23. 23

    Py file doesn't auto compile on Tornado Server

  24. 24

    Progress Developer Studio 11.6 doesn't auto compile cls file

  25. 25

    withUnsafeMutablePointer doesn't compile

  26. 26

    Gradle compile generated java file

  27. 27

    Gradle cannot compile .aar file

  28. 28

    Gradle can't copy png file in java project

  29. 29

    Can't compile new project with upgraded android studio due to gradle dependencies

HotTag

Archive