forked from ballerina-platform/ballerina-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
73 lines (66 loc) · 2 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
plugins {
id 'base'
id 'com.gradle.build-scan' version '2.1'
id "com.github.spotbugs" version "1.6.10"
id "com.dorongold.task-tree" version "1.3.1"
id "com.github.johnrengelman.shadow" version "5.0.0"
id 'maven-publish'
id 'net.researchgate.release' version '2.6.0'
}
allprojects {
group = project.group
version = project.version
task printPath {
doLast{
println projectDir
}
}
}
subprojects {
apply plugin: 'maven-publish'
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.name
version = project.version
}
}
repositories {
maven {
if(project.version.endsWith('-SNAPSHOT') && project.hasProperty('publishToGithub')) {
url = 'https://maven.pkg.github.com/ballerina-platform/ballerina-lang'
} else if(project.version.endsWith('-SNAPSHOT')) {
url "https://maven.wso2.org/nexus/content/repositories/snapshots/"
} else {
url "https://maven.wso2.org/nexus/service/local/staging/deploy/maven2/"
}
credentials {
username System.getenv("NEXUS_USERNAME")
password System.getenv("NEXUS_PASSWORD")
}
}
}
}
release {
// Disable check snapshots temporarily
failOnSnapshotDependencies = false
failOnCommitNeeded = false
tagTemplate = 'v${version}'
git {
// To release from any branch
requireBranch = null
}
}
afterReleaseBuild.dependsOn publishToMavenLocal
afterReleaseBuild.dependsOn publish
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
dependencies {
constraints {
//implementation 'org.springframework:spring-web:5.0.2.RELEASE'
}
}