Skip to content

Commit 3502cac

Browse files
Merge pull request #28 from azinneera/repo-restructure
Add extracted bala in the zip artifact
2 parents e87b149 + 7e5c587 commit 3502cac

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

regex-ballerina/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ description = 'Ballerina - Regex Ballerina Generator'
2121

2222
def packageName = "regex"
2323
def packageOrg = "ballerina"
24+
def platform = "java11"
2425
def snapshotVersion = "-SNAPSHOT"
2526
def tomlVersion = project.version.replace("${snapshotVersion}", "")
2627
def ballerinaConfigFile = new File("$project.projectDir/Ballerina.toml")
@@ -149,9 +150,12 @@ task ballerinaBuild {
149150
commandLine 'sh', '-c', "$balJavaDebugParam $distributionBinPath/bal build ${testParams} ${debugParams}"
150151
}
151152
}
152-
copy {
153-
from file("$project.projectDir/target/bala")
154-
into file("$artifactCacheParent/bala/${packageOrg}/${packageName}/${tomlVersion}")
153+
// extract bala file to artifact cache directory
154+
file("$project.projectDir/target/bala").eachFileMatch(~/.*.bala/) { balaFile ->
155+
copy {
156+
from zipTree(balaFile)
157+
into file("$artifactCacheParent/bala/${packageOrg}/${packageName}/${tomlVersion}/${platform}")
158+
}
155159
}
156160
copy {
157161
from file("$project.projectDir/target/cache")

0 commit comments

Comments
 (0)