Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building with Gradle 5.0 #54

Closed
vayan opened this issue Nov 27, 2018 · 8 comments · Fixed by #64
Closed

Error building with Gradle 5.0 #54

vayan opened this issue Nov 27, 2018 · 8 comments · Fixed by #64

Comments

@vayan
Copy link

vayan commented Nov 27, 2018

I have an issue building my project with the latest 5.0 update from Gradle

dependencies {
    classpath("com.dicedmelon.gradle:jacoco-android:0.1.3") {
        exclude(group = "org.codehaus.groovy", module = "groovy-all")
    }
}
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project 'foo'.
Caused by: groovy.lang.MissingPropertyException: No such property: dir for class: org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
	at com.dicedmelon.gradle.jacoco.android.JacocoAndroidPlugin.logTaskAdded(JacocoAndroidPlugin.groovy:103)
	at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:479)
	at org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.java:191)
	at org.gradle.internal.metaobject.ConfigureDelegate.invokeMethod(ConfigureDelegate.java:78)
	at com.dicedmelon.gradle.jacoco.android.JacocoAndroidPlugin$_apply_closure1.doCall
@tobiasKaminsky
Copy link

This is also happening for me with 4.x.
Strange is that it is only happening in a subproject of my library, but nowhere else…

@phatnhse
Copy link

How about this ticket?

@brianguertin
Copy link

Looks like the offending code is just a log statement:

logger.info("  classDirectories: $reportTask.classDirectories.dir.path")

So, an easy work around would be to skip logging. Of course, it would be better would to not use internal APIs.

@mrfatstrat
Copy link

+1 any plans for Gradle 5.x support soon?

@tobiasKaminsky
Copy link

Strange thing is that in AS 3.3, e.g. either sync gradle, or even execute assemble in grade tab, it does not work:

* What went wrong:
A problem occurred configuring root project 'android-library'.
> groovy.lang.MissingPropertyException: No such property: dir for class: org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection

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

But when I use "./gradlew assemble" or any other task from console, I do not get an error and it builds just fine.

@stephanenicolas
Copy link

Same here, we are actually removing the plugin from a project because it's not updated for gradle 5.

@arturdm
Copy link
Owner

arturdm commented Feb 26, 2019

Fixed in 0.1.4 release.

@Taylor004
Copy link

how to fixed that error...I don't know hot to fix my project....same build error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants