Skip to content

Commit

Permalink
Merge pull request #329 from ballerina-platform/revamp-2023
Browse files Browse the repository at this point in the history
Add release configurations to gradle.build
  • Loading branch information
sahanHe authored Feb 28, 2024
2 parents ff74484 + 6dff06b commit 54b9cb0
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ allprojects {

repositories {
mavenLocal()
maven {
url = 'https://maven.wso2.org/nexus/content/repositories/releases/'
}

maven {
url = 'https://mvnrepository.com/artifact/org.testng/testng'
}

maven {
url = 'https://maven.wso2.org/nexus/content/groups/wso2-public/'
Expand All @@ -44,7 +51,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 All @@ -59,6 +66,8 @@ allprojects {
}
}

def moduleVersion = project.version.replace("-SNAPSHOT", "")

def executeBalCommand(String command, String dir) {
try {
exec {
Expand All @@ -79,3 +88,14 @@ task build {
dependsOn("${project.packageName}-native:build")
dependsOn("${project.packageName}-ballerina:build")
}

release {
buildTasks = ['build']
failOnSnapshotDependencies = true
versionPropertyFile = 'gradle.properties'
tagTemplate = 'v${version}'
git {
requireBranch = "release-${moduleVersion}"
pushToRemote = 'origin'
}
}

0 comments on commit 54b9cb0

Please sign in to comment.