Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya committed Jun 13, 2023
1 parent e74730e commit ee79488
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ tasks.named(JavaBasePlugin.CHECK_TASK_NAME) {
}

tasks.register('checkCompatibility', CheckCompatibilityTask) {
description('Checks compatibility for all or given components')
description('Checks the compatibility with child components')
}

allprojects { project ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction

import java.nio.file.Paths

class CheckCompatibilityTask extends DefaultTask {

@Input
Expand All @@ -35,12 +37,15 @@ class CheckCompatibilityTask extends DefaultTask {

@TaskAction
void checkCompatibility() {
println("Checking compability for: $repositoryUrls for $ref")
println("Checking compatibility for: $repositoryUrls for $ref")
repositoryUrls.parallelStream().forEach { repositoryUrl ->
def tempDir = File.createTempDir()
def gradleScript = getGradleExec()
try {
if (cloneAndCheckout(repositoryUrl, tempDir)){
if (cloneAndCheckout(repositoryUrl, tempDir)) {
if (repositoryUrl.toString().endsWithAny('notifications','notifications.git')) {
tempDir = Paths.get(tempDir.getAbsolutePath(), 'notifications')
}
project.exec {
workingDir = tempDir
def stdout = new ByteArrayOutputStream()
Expand All @@ -53,7 +58,7 @@ class CheckCompatibilityTask extends DefaultTask {
}
} catch (ex) {
failedComponents.add(repositoryUrl)
logger.info("Gradle assemble failed. Error logs:", ex)
logger.info("Gradle assemble failed for $repositoryUrl", ex)
} finally {
tempDir.deleteDir()
}
Expand Down

0 comments on commit ee79488

Please sign in to comment.