Skip to content

Commit

Permalink
gradle: remove archived connectors (#35423)
Browse files Browse the repository at this point in the history
  • Loading branch information
postamar authored Feb 19, 2024
1 parent a54b310 commit b339aaf
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,21 @@ cdkPath.eachDir { dir ->
def integrationsPath = rootDir.toPath().resolve('airbyte-integrations/connectors')
integrationsPath.eachDir { dir ->
def buildFiles = file(dir).list { file, name -> name == "build.gradle" }
if (buildFiles.length == 1) {
include ":airbyte-integrations:connectors:${dir.getFileName()}"
if (buildFiles.length != 1) {
// Ignore python and other non-gradle connectors.
return
}
File metadataFile = dir.resolve("metadata.yaml").toFile()
if (!metadataFile.exists()) {
// Don't support connectors without metadata.
return
}
String metadataYaml = metadataFile.getText("UTF-8")
if (metadataYaml =~ /(?m)^\s+supportLevel:\s*["']?archived["']?\s*$/) {
// Ignore archived connectors.
return
}
include ":airbyte-integrations:connectors:${dir.getFileName()}"
}

// Include miscellaneous modules.
Expand Down

0 comments on commit b339aaf

Please sign in to comment.