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

[Code health] Override clean Gradle task to remove generated ground-android/build #2183

Open
gino-m opened this issue Jan 13, 2024 · 3 comments · Fixed by #2185
Open

[Code health] Override clean Gradle task to remove generated ground-android/build #2183

gino-m opened this issue Jan 13, 2024 · 3 comments · Fixed by #2185
Labels
type: code health Improvements to readability or robustness of codebase
Milestone

Comments

@gino-m
Copy link
Collaborator

gino-m commented Jan 13, 2024

The following root build.gradle stopped compiling after upgrading to Gradle 8.5:

task clean(type: Delete) {
    delete rootProject.buildDir
}

Alternate syntaxes were not accepted and not sure of the correct way to add it back. @shobhitagarwal1612 any ideas?

@gino-m gino-m added the type: code health Improvements to readability or robustness of codebase label Jan 13, 2024
@shobhitagarwal1612
Copy link
Member

shobhitagarwal1612 commented Jan 13, 2024

We can probably remove this custom gradle task. I don't think this it's used very often.

@gino-m
Copy link
Collaborator Author

gino-m commented Jan 13, 2024

We can probably remove this custom gradle task. I don't this it's used very often.

That's what I ended up doing in #2181, but then after gradle clean the reports are left behind in /build dir.

@gino-m
Copy link
Collaborator Author

gino-m commented Jan 14, 2024

Unfortunately I still receive the following error when adding a module defined with a Kotlin Gradle build file in #2184:

Build file '/Users/gmiceli/Git/google/ground-android/shared/build.gradle.kts' line: 25

Failed to apply plugin class 'org.gradle.language.base.plugins.LifecycleBasePlugin'.
> Cannot add task 'clean' as a task with that name already exists.
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code health Improvements to readability or robustness of codebase
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants