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

Tree format requires Gradle 7.4 or higher #40

Closed
mezpahlan opened this issue Jun 8, 2022 · 3 comments
Closed

Tree format requires Gradle 7.4 or higher #40

mezpahlan opened this issue Jun 8, 2022 · 3 comments
Milestone

Comments

@mezpahlan
Copy link

mezpahlan commented Jun 8, 2022

Hi team!

I wanted to play around with the tree format described in the README and came across the following error:

java.lang.NoClassDefFoundError: org/gradle/configurationcache/extensions/CharSequenceExtensionsKt
	at com.dropbox.gradle.plugins.dependencyguard.internal.DependencyTreeDiffTaskNames.createDependencyTreeTaskNameForConfiguration(DependencyTreeDiffTaskNames.kt:8)
	at com.dropbox.gradle.plugins.dependencyguard.DependencyGuardPlugin$registerTreeDiffTasks$1.execute(DependencyGuardPlugin.kt:108)
	at com.dropbox.gradle.plugins.dependencyguard.DependencyGuardPlugin$registerTreeDiffTasks$1.execute(DependencyGuardPlugin.kt:16)

I'm using version 0.3.0 of the plugin with Gradle 7.2 in our project.

I think this is because it relies on the CharSequence.capitalized() extension defined in /src/main/kotlin/org/gradle/configurationcache/extensions/CharSequenceExtensions.kt which only landed in Gradle 7.4.

image

Perhaps a small update to the README to point this out might be useful? Alternatively there is probably a Kotlin extension that does something similar?

Cheers.

@mezpahlan mezpahlan changed the title Tree format requires Gradle 7.3 or higher Tree format requires Gradle 7.4 or higher Jun 8, 2022
@handstandsam
Copy link
Collaborator

Interesting. Thanks for calling this out. If it's an easy if/else I'm happy to take a fix. Otherwise, I think 7.4+ for this option seems reasonable. (since it's non-default)

Thoughts?

@handstandsam
Copy link
Collaborator

I downgraded to 7.2 and am able to replicate:

e: /Users/samedwards/src/dependency-guard/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/DependencyTreeDiffTaskNames.kt: (3, 49): Unresolved reference: capitalized
e: /Users/samedwards/src/dependency-guard/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/DependencyTreeDiffTaskNames.kt: (8, 55): Unresolved reference: capitalized
e: /Users/samedwards/src/dependency-guard/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/DependencyTreeDiffTaskNames.kt: (12, 63): Unresolved reference: capitalized
e: /Users/samedwards/src/dependency-guard/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/utils/Tasks.kt: (9, 13): Unresolved reference: doNotTrackState
e: /Users/samedwards/src/dependency-guard/dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/utils/Tasks.kt: (16, 13): Unresolved reference: notCompatibleWithConfigurationCache```

@mezpahlan
Copy link
Author

Sorry, I'm late picking up these messages. Yup, I'm in full agreement with your PR fix.

Many thanks for the quick turn around ☺️.

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

No branches or pull requests

2 participants