Skip to content

Commit

Permalink
Add Gradle task for GitHub package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuvindu committed Sep 29, 2024
1 parent 56fadae commit 6d9713a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,29 @@ task commitTomlFiles {
}
}

publishing {
publications {
maven(MavenPublication) {
artifact source: createArtifactZip, extension: 'zip'
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ballerina-platform/module-${packageOrg}-${packageName}")
credentials {
username = System.getenv("publishUser")
password = System.getenv("publishPAT")
}
}
}
}

clean {
delete 'build'
}

build.dependsOn "generatePomFileForMavenPublication"
updateTomlFiles.dependsOn copyStdlibs
build.dependsOn copyToLib

Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ allprojects {
}

maven {
url = 'https://maven.pkg.github.com/ballerina-platform/ballerina-lang'
url = 'https://maven.pkg.github.com/ballerina-platform/*'
credentials {
username System.getenv("packageUser")
password System.getenv("packagePAT")
Expand Down Expand Up @@ -78,6 +78,8 @@ subprojects {
ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIoVersion}"
ballerinaStdLibs "io.ballerina.lib:avro-ballerina:${stdlibAvroVersion}"
ballerinaStdLibs "io.ballerina.stdlib:http-ballerina:${stdlibHttpVersion}"
ballerinaStdLibs "io.ballerina.lib:confluent.cregistry-ballerina:0.2.1"

}
}

Expand Down

0 comments on commit 6d9713a

Please sign in to comment.