-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
66 lines (56 loc) · 1.53 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
plugins {
id 'groovy'
id 'java-gradle-plugin'
id 'maven-publish'
id 'com.gradle.plugin-publish' version '1.2.0'
id "net.researchgate.release" version '2.8.0'
}
repositories {
mavenLocal()
}
dependencies {
implementation gradleApi()
testImplementation gradleTestKit()
}
gradlePlugin {
website = 'https://github.com/ballerina-platform/plugin-gradle'
vcsUrl = 'https://github.com/ballerina-platform/plugin-gradle.git'
plugins {
BallerinaPlugin {
id = 'io.ballerina.plugin'
implementationClass = 'io.ballerina.plugin.BallerinaPlugin'
displayName = 'Ballerina Plugin'
description = 'A plugin for Ballerina projects'
tags.set(['Ballerina', 'Plugin', 'Gradle'])
}
}
}
def moduleVersion = project.version.replace("-SNAPSHOT", "")
release {
failOnPublishNeeded = false
failOnSnapshotDependencies = true
buildTasks = ['build']
versionPropertyFile = 'gradle.properties'
tagTemplate = 'v$version'
git {
requireBranch = "release-${moduleVersion}"
pushToRemote = 'origin'
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ballerina-platform/plugin-gradle")
credentials {
username System.getenv("publishUser")
password System.getenv("publishPAT")
}
}
}
}
test {
useJUnitPlatform()
}
publishToMavenLocal.dependsOn build
publish.dependsOn build