Skip to content

Commit

Permalink
Merge pull request #16 from Nuvindu/2201.10.x
Browse files Browse the repository at this point in the history
Add Gradle task for GitHub package publishing
  • Loading branch information
Nuvindu authored Sep 29, 2024
2 parents 2e8b638 + ff3c481 commit c9981e5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "confluent.cregistry"
version = "0.2.0"
version = "0.2.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
Expand Down
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spotbugsPluginVersion=5.0.14
shadowJarPluginVersion=8.1.1
downloadPluginVersion=5.4.0
releasePluginVersion=2.8.0
ballerinaGradlePluginVersion=3.0.0
ballerinaGradlePluginVersion=2.2.6
jacocoVersion=0.8.10

slf4jVersion=1.7.21
Expand Down

0 comments on commit c9981e5

Please sign in to comment.