Hii, I'm facing this error while running gradle 4....
# gradle
s
Hii, I'm facing this error while running gradle 4.4.1 on kotlin:
Copy code
* Where:
Build file '/home/samyak/gsoc/kotlin/kotlin-1.3.30/kotlin-1.3.30/prepare/compiler-embeddable/build.gradle' line: 30

* What went wrong:
A problem occurred evaluating project ':kotlin-compiler-embeddable'.
> No signature of method: static EmbeddableKt.compilerDummyForDependenciesRewriting() is applicable for argument types: (java.lang.String, build_3iru8x0j1kdz5fc4ppmd4bywe$_run_closure2) values: [compilerDummy, build_3iru8x0j1kdz5fc4ppmd4bywe$_run_closure2@51ac48b3]
  Possible solutions: compilerDummyForDependenciesRewriting(org.gradle.api.Project, java.lang.String, kotlin.jvm.functions.Function1)

* Try:
Run with --debug option to get more log output. Run with --scan to get full insights.
I'm not able to debug this bit, any help is appreciated.
n
what this is telling you is that instead of calling
compilerDummyForDependenciesRewriting(String, closure)
, you should call
compilerDummyForDependenciesRewriting(Project, String, closure)
i.e., you are missing the first argument, project, when calling that function
s
Here's how the function is called:
Copy code
EmbeddableKt.compilerDummyJar(project, jar, EmbeddableKt.compilerDummyForDependenciesRewriting(project, "compilerDummy") {
   it.classifier = "dummy"
})
It throws error:
Copy code
> No signature of method: static EmbeddableKt.compilerDummyJar() is applicable for argument types: (org.gradle.api.internal.project.DefaultProject_Decorated, org.gradle.api.tasks.bundling.Jar_Decorated, com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar_Decorated) values: [project ':kotlin-compiler-embeddable', task ':kotlin-compiler-embeddable:jar', ...]
  Possible solutions: compilerDummyJar(org.gradle.api.Project, org.gradle.jvm.tasks.Jar, kotlin.jvm.functions.Function1)
n
it looks like the last argument you are passing in is
com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar_Decorated
instead of
kotlin.jvm.functions.Function1
from what the error message says.