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

build: improve comprehensiveness of gradle clean #5003

Merged
merged 9 commits into from
Jul 15, 2022
2 changes: 1 addition & 1 deletion datahub-web-react/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ clean {
delete 'build'
delete 'just'
delete 'src/types.generated.ts'
delete 'src/graphql/*.generated.ts'
delete fileTree(dir: 'src/graphql', include: '*.generated.ts')
}

configurations {
Expand Down
3 changes: 3 additions & 0 deletions docs-website/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ clean {
delete 'tmp'
delete 'build'
delete 'just'
delete fileTree(dir: 'genDocs', exclude: '.gitignore')
delete fileTree(dir: 'docs', exclude: '.gitignore')
delete 'graphql/combined.graphql'
yarnClear
}

Expand Down
2 changes: 1 addition & 1 deletion metadata-ingestion-modules/airflow-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ task testFull(type: Exec, dependsOn: [testQuick, installDevTest]) {
}

task cleanPythonCache(type: Exec) {
commandLine 'bash', '-x', '-c',
commandLine 'bash', '-c',
"find src -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete"
}

Expand Down
7 changes: 5 additions & 2 deletions metadata-ingestion/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ task docGen(type: Exec, dependsOn: [codegen, installDevTest]) {


task cleanPythonCache(type: Exec) {
commandLine 'bash', '-x', '-c',
"find src -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete"
commandLine 'bash', '-c',
"find src tests -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete -o -type d -empty -delete"
}

build.dependsOn install
Expand All @@ -140,5 +140,8 @@ clean {
delete 'dist'
delete 'src/datahub/metadata'
delete '../docs/generated'
delete 'generated'
delete '.mypy_cache'
delete '.pytest_cache'
}
clean.dependsOn cleanPythonCache
1 change: 0 additions & 1 deletion metadata-integration/java/datahub-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ if (project.hasProperty("releaseVersion")) {
try {
// apply this plugin in a try-catch block so that we can handle cases without .git directory
apply plugin: "com.palantir.git-version"
println("In else section")
def details = versionDetails()
detailedVersionString = gitVersion()
version = details.lastTag
Expand Down
1 change: 0 additions & 1 deletion metadata-integration/java/spark-lineage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ if (project.hasProperty("releaseVersion")) {
try {
// apply this plugin in a try-catch block so that we can handle cases without .git directory
apply plugin: "com.palantir.git-version"
println("In else section")
def details = versionDetails()
detailedVersionString = gitVersion()
version = details.lastTag
Expand Down