Skip to content

Commit

Permalink
Restructure build task depedencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Aug 6, 2024
1 parent a45b7c3 commit 1d7b800
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ class BallerinaPlugin implements Plugin<Project> {
}

project.tasks.register('unpackStdLibs') {
dependsOn(project.unpackJballerinaTools)

if (ballerinaExtension.isConnector) {
return
}

dependsOn(project.unpackJballerinaTools)
doLast {
project.configurations.ballerinaStdLibs.resolvedConfiguration.resolvedArtifacts.each { artifact ->
project.copy {
Expand All @@ -150,12 +151,13 @@ class BallerinaPlugin implements Plugin<Project> {
}

project.tasks.register('copyStdlibs') {
dependsOn(project.unpackStdLibs)

if (ballerinaExtension.isConnector) {
println("[Warning] skip downloading jBallerinaTools dependency: project uses locally installed Ballerina distribution to build the module")
return
}

dependsOn(project.unpackStdLibs)
doLast {
/* Standard Libraries */
project.configurations.ballerinaStdLibs.resolvedConfiguration.resolvedArtifacts.each { artifact ->
Expand Down

0 comments on commit 1d7b800

Please sign in to comment.